PINE64
Root FS on usb3 drive - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: ROCK64 (https://forum.pine64.org/forumdisplay.php?fid=85)
+--- Forum: Linux on Rock64 (https://forum.pine64.org/forumdisplay.php?fid=88)
+--- Thread: Root FS on usb3 drive (/showthread.php?tid=5466)



Root FS on usb3 drive - eloranta - 12-16-2017

I have set up extlinux.conf (on sd card) such that it will obtain the root filesystem from my USB drive. Everything works OK when I connect the drive to USB 2 port (I get the message during the boot that the drive is spinning up, the kernel waits for that and then the boot proceeds normally). This is a USB 3 drive and, of course, it would be better to connect it to the USB 3 port in rock64. When I do this, the system starts booting but then gets stuck before it says anything about waiting for the drive to spin up. I was randomly playing with the cables back and forth and somehow I managed to get it to boot once from USB 3 but I am not sure what I did exactly.

Has anyone gotten rootfs on USB 3 drive to work correctly when loading the kernel from sdcard? I know that the drive works on USB 3 port (PC) and it has its own power supply, so there should not be any power issues.


RE: Root FS on usb3 drive - eloranta - 12-16-2017

If I boot the system without the usb3 drive connected (boot code & kernel on sd), it will proceed and eventually wait for rootfs. If I plugin the usb3 drive at this point, it will usually proceed booting from it (but it seems to depend on timing somewhat). While this is better than not being able to have rootfs on usb3 at all, it can cause issues if one needs to reboot the system remotely (no access to usb cables). This is with the 5.10 (stretch) image based kernel (4.4..something). The newer ones don't boot on my system (0.6.x) and, by the way, the mainline kernel does not boot either (but that could be something else). The rootfs itself is fedora 27.


RE: Root FS on usb3 drive - rontant - 12-17-2017

(12-16-2017, 09:53 AM)eloranta Wrote: I have set up extlinux.conf (on sd card) such that it will obtain the root filesystem from my USB drive. Everything works OK when I connect the drive to USB 2 port (I get the message during the boot that the drive is spinning up, the kernel waits for that and then the boot proceeds normally). This is a USB 3 drive and, of course, it would be better to connect it to the USB 3 port in rock64. When I do this, the system starts booting but then gets stuck before it says anything about waiting for the drive to spin up. I was randomly playing with the cables back and forth and somehow I managed to get it to boot once from USB 3 but I am not sure what I did exactly.

Has anyone gotten rootfs on USB 3 drive to work correctly when loading the kernel from sdcard? I know that the drive works on USB 3 port (PC) and it has its own power supply, so there should not be any power issues.

Yes, it works fine. I am using Ayufan's Artful minimal (Linux rock64 4.4.77-rockchip-ayufan-141) and have tested with his several other variants. 

https://forum.pine64.org/showthread.php?tid=4971


RE: Root FS on usb3 drive - eloranta - 12-18-2017

Interesting... Mine will work if I plug it in after the kernel has booted some way. If it is connected when the system is powered up, it will not work. So, this probably applies to drives that require the spin up wait.


RE: Root FS on usb3 drive - rontant - 12-18-2017

(12-18-2017, 02:20 PM)eloranta Wrote: Interesting... Mine will work if I plug it in after the kernel has booted some way. If it is connected when the system is powered up, it will not work. So, this probably applies to drives that require the spin up wait.

I have tried SSD and conventional mechanical drives and both work. I am currently using an old Seagate mechanical drive.  Make sure your HDD enclosure or the USB3 hub are self powered.


RE: Root FS on usb3 drive - dkryder - 12-18-2017

yes, you need to be sure to use a powered usb3 hub. it would help if you powered up the drive prior to booting sequence.
i am using this build
http://files.pine64.org/os/ROCK64/android/rock64_20171012_stock_android_7.1.2_rooted_sd2emmc.img.xz
the developer of this build did a good job with the root on this build.


RE: Root FS on usb3 drive - rontant - 12-18-2017

I have two mechanical drives connected to a powered USB3 hub. Both their power supply units are plugged to a power strip with a master switch. Each morning I just switch on the master switch and the Rock64 boots up reliably without any problem. There hasn't been any need to power up the drive first.


RE: Root FS on usb3 drive - eloranta - 12-18-2017

The drive is self-powered (Seagate), so it should not put load on the bus. I cannot power up the drive manually prior to boot, I guess it has to sense the host in the usb3 bus before it does so by itself. So, all this is automatic and can't be avoided.

This is with kernel: 4.4.77-rockchip-ayufan-118. The weird thing is that this boots ok if connected to a usb2 port and usb3 when plugged in about half-way of the boot I(just before it looks for root fs). I don't have any SSDs to test with (or other drives that would have power on already initially). What kernel version does the above mentioned image have?