PINE64

Full Version: Consistent boot from SSD? Is it possible?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I also posted this to the Armbian forum.

I can never seem to get the Rock64 to boot consistently from the SSD. Sometimes it comes up, sometimes it just "hangs". About once out of every 6 or seven times can I SSH into it - this is regardless of distro whether it's Bionic or Stretch. This is of course after flashing it to allow for USB boot.
 
On the Pi, I was able to solve this 100% of the time by using a small microSD card with nothing but "bootcode.bin" and an empty file called "timeout" which tells the boot to hang for a bit while things "spin up" and the SSD (or HD) mass storage come available. Once I did this, all my Pi's work great. In addition with the Pi I am able to do all of this completely "headless" where I can restore an .img onto the SSD, copy over a wpa_supplicant.conf file and touch an ssh file and "boom", I can always get to it consistently without having to prep it by plugging in a monitor and keyboard to make manual changes before booting it headless. 
 
Are there any steps to make this a similar possibility with the Rock64? Is there some image I can put on an SD card that will accomplish the same thing and then let bootup happen and continue on the image restored to the SSD that is hanging off the USB 3.0 port? Personally I don't care if it has a microSD in it or not - as long as it boots consistently 100% of the time and all of the real I/O occurs on the SSD drive. 
 
Thanks!
 
Ryan
So to add to this, what I have done so far is to flash the following image using etcher to both a 16GB microSD and to an external SSD (that is connected via the USB 3.0 interface on the Rock64)

Code:
bionic-minimal-rock64-0.8.0rc6-1111-arm64.img

And as always, it boots perfectly from the SD. When I do an lsblk command I get the following:

Code:
rock64@rock64:~$ lsblk -T
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 223.6G  0 disk
|-sda1        8:1    0   3.9M  0 part
|-sda2        8:2    0    64K  0 part
|-sda3        8:3    0     4M  0 part
|-sda4        8:4    0     4M  0 part
|-sda5        8:5    0     4M  0 part
|-sda6        8:6    0   112M  0 part /boot/efi
`-sda7        8:7    0   1.9G  0 part
mtdblock0    31:0    0     4M  0 disk
mmcblk1     179:0    0  14.4G  0 disk
|-mmcblk1p1 179:1    0   3.9M  0 part
|-mmcblk1p2 179:2    0    64K  0 part
|-mmcblk1p3 179:3    0     4M  0 part
|-mmcblk1p4 179:4    0     4M  0 part
|-mmcblk1p5 179:5    0     4M  0 part
|-mmcblk1p6 179:6    0   112M  0 part
`-mmcblk1p7 179:7    0  14.3G  0 part /
zram0       252:0    0 498.5M  0 disk [SWAP]
zram1       252:1    0 498.5M  0 disk [SWAP]
zram2       252:2    0 498.5M  0 disk [SWAP]
zram3       252:3    0 498.5M  0 disk [SWAP]

In my extlinux.conf I have:

Code:
rock64@rock64:~$ cat /boot/efi/extlinux/extlinux.conf
timeout 10
default kernel-latest
menu title select kernel

label kernel-latest
   kernel /Image
   initrd /initrd.img
   fdt /dtb
   append rw root=LABEL=linux-root rootwait rootfstype=ext4 panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1

label kernel-previous
   kernel /Image.bak
   initrd /initrd.img.bak
   fdt /dtb.bak
   append rw root=LABEL=linux-root rootwait rootfstype=ext4 panic=10 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1

I'm trying to follow some of the other notes on the forum here on how to edit the extlinux.conf so as to boot continue the boot via the SSD and where the SSD becomes the primary/root filesystem. 

I tried editing the "root=LABEL=linux-root" to be something like "root=/dev/sda" and even /dev/sda6 and others, but it doesn't seem to want to let me in at the ssh prompt anymore when I modify the extlinux.conf file.

Any ideas? I'm not worried about binding to a specific UUID or something as I will only ever use the single SSD that is connected that I imaged above. No other USB devices (storage or other) will be plugged in for what I am using these for. I
d prefer to keep it super-simple for whenever I create another one, I can just modify the SD card the exact same way and always have it work right out of the box/headless without having to dork with plugging in monitors and keyboards.

Any pointers would be VERY welcome! Thanks!