by sambul13 » Fri Nov 02, 2012 7:07 pm
$this->bbcode_second_pass_quote('moonman', 'E')dited the guide...
$this->bbcode_second_pass_code('', '/usr/sbin/fw_setenv usb_set_bootargs 'setenv bootargs console $console root=/dev/disk/by-label/urootfs rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params'')
I tested this approach as one of possible with
uInitrd linked in 1st post. While
hydro posted earlier how to build
uInitrd and mod Uboot env on Dockstar like above, on GoFlex Net it didn't work for me. Here's what works with current kernel after one copies
uInitrd to
/boot dir on rootfs partition of a USB Thumb and changes the file permissions to 644:
$this->bbcode_second_pass_code('', 'fw_setenv usb_root LABEL=Alarm
fw_setenv usb_set_bootargs 'setenv bootargs console=$console root=LABEL=Alarm rootfstype=$usb_rootfstype $mtdparts $usb_custom_params'')
Of course, you need to put your own rootfs partition label.
The above env and uInitrd together allow to boot GFN from USB Thumb regardless whether SATA drive is attached to GFN or not. I didn't test it with rootfs on a USB HD or SATA drive. If one has rootfs on both SATA and USB, or use USB HD instead of Thumb to boot the OS, to choose which drive to boot from, you
may need to set boot priority to SATA or USB, and also possibly correct boot partition label and how its set in env.
For some reason my USB Stick didn't boot initially with the
uInitrd present, and shown a number of errors when checking its FS in Gparted, all related to the
uInitrd module references in OS components. Once all were fixed, it booted OK. Not sure what the cause was, but for this Thumb the kernel was giving "can't read disk" error on GFN after
uInitrd loading by Uboot until FS was fixed, despite Uboot read the disk OK. So if one can't boot from a Thumb with that
uInitrd, print and verify your env in
Netconsole, then reset power, reinsert the stick or run its FS check. Or follow mentioned
hydro's thread to build own
uInitrd.