Other OS

Mounting /root from USB device at boot time

34 19430
ddurdle  
If anyone has SUCCESSFULLY boot off USB via SD card (boot off SD with SD mounting root off USB), let us know.  Judging from the startup errors and dmesg, it appears the USB Mass Storage Device Driver loads only after the root is mounted.  So if you try to mount root off USB, boot fails.  This is not the case with Raspberry Pi or Beagle Bone Black.  So there is something wrong with the boot files.  Hopefully something that just requires a tweak rather than a hardware design flaw.

Al_Fox  
Does anyone had success in having the root partition on usb flash stick?

I gave it a try on the banana pi and I am facing the same issue as described here - waiting forever for root.

rux  
I confirm this problem in Archlinux 1.1.1 image: I can boot smoothly from SD card, mount my external HD (sda) and access the content of the second partition (sda2); where I also dd'ed the Archlinux image.

If I change uEnv.txt root parameter to =/dev/sda2 and try to boot without touching the physical setup (same devices attached to the same cables, same power source, etc...) the booting sequence halts while waiting for root filesystem (/dev/sda2) forever (because of rootwait parameter). If I limit the wait to 30 seconds the boot sequence continues, but the system crashes before completing it because the lack of root.

If I unplug and re-plug the HD the console shows informational messages about the disconnection and re-connection, identifying the USB device as a Hard Disk (including vendor ID and other info), so the kernel is aware that there is a USB HD connected... so the problem could be in the initiation scripts and be related to /dev not being populated before trying to mount root, but that exceed my technical knowledge.

Hope this help someone more skilled to fix this.
Thanks in advance

The problem seems to be that the kernel has not been configured with USB_STORAGE built-in but rather as a module,which naturally fails to access the usb drive(since the particular module to be loaded is in the rootfs and the kernel cannot access the rootfs without that module ).

So we would need to recompile the kernel with the config option CONFIG_USB_STORAGE=y
instead of CONFIG_USB_STORAGE=m

Or else somehow set up initramfs on the sdcard and through it,load the usb storage driver and proceed with the rest of the boot process with usb rootfs.

PS: it's the Lubuntu 3.1.1 kernel config which I've observed not the Raspbian one,but guess they should be the same.

Al_Fox  
Post Last Edited by Al_Fox at 2014-8-15 17:58

Working with newly compiled kernel and "CONFIG_USB_STORAGE=y". Used image was Raspbian 3.1.

Thank´s for helping.

Any chance in getting this preconfigured in  future images?

Reply 15# Al_Fox


    Marked。。。。I will do

alien  
When will raspbian released with this fix ?
Is there a guide to recompile the kernel in the banana pi ?

Reply 17# alien
http://wiki.lemaker.org/Building_u-boot,_script.bin_and_linux-kernel

alien  
Thank you

Will be included in the next Bananian release 14.09, too.

You have to log in before you can reply Login | Sign Up

Points Rules