booting from external disk

3 posts / 0 new
Last post
Erez
Erez's picture
booting from external disk

hello

 

i have just bought an NG 3500L, to replace my old wrt54gl

i have successfully installed openwrt on my 3500L. however it has a small root partition so i want to mount the root on an external drive (like i did with th wrt54gl - after i soldered an SD to it).

i tried the instructions in https://forum.openwrt.org/viewtopic.php?id=24138
however it requires a package called block-extroot, which opkg can't seem to find

i tried to edit both /etc/preinit and /etc/preinit.arch, and add some lines using pivot_root to mount the usbdrive as /, however the lines doesn't seem to be executed.

i know i have the option of adding those lines to /etc/rc.d/whatever, however this will be done after /proc and all other is mounted (which means i have to remount them on the new '/') and after /etc/rc.d is already scanned (so files i add on the new /etc/rc.d will not be executed)

 

any help would be appreciated.

 

thanks,

erez.

Erez
Erez's picture
i even tried http://oldwiki

i even tried http://oldwiki.openwrt.org/OpenWrtDocs%282f%29KamikazeConfiguration%282f...
(which i used on my old wrt53gl)

it seems to work when i do /etc/rc.d/S11bootext start
but it doesn't seem to work automatically.

Erez
Erez's picture
ok, it seems i didn't wait

ok, it seems i didn't wait enough time for the disk to get reqady.
changing to waitdev=20 in /etc/config/bootfromexternalmedia made my old script work.

here is my /etc/config/bootfromexternalmedia:
config bootfromexternalmedia
option enabled '1'
option device /dev/scsi/host0/bus0/target0/lun0/part1
option name 'external_disk'
option target '/mnt/usbdrive'
option putold '/mnt/old'
option modules 'usbcore usb-storage jbd ext3'
option waitdev '20'
option filesys 'ext3'
option mountopt 'rw'

cheers,
erez.