Opened 3 years ago

Last modified 2 years ago

#17465 new defect

No means of mounting root filesystem when kernel booted from external storage

Reported by: sgparry Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: Cc:


I have a WNR3500L with external USB storage. I am loading my kernel from that storage (by kexec) and wanting the root filesystem to mount from there. However, whereas this could be made to work with early BB, current versions of BB require a lot of ugly hacks to work because:
initramfs is the only way to provide the drivers to mount the proper root filesystem (no initrd ramdisk available in openwrt)
block extroot assumes that you have booted from MTD else does not work properly
but block extroot is the only way to get /dev/sda* to appear during preinit
pivot_root cannot be used because we are using initramfs
switch_root cannot be used because the preinit scripts are not in pid 1 and all the other processes crash when you try it (unlike pivot_root, switch_root does not update other processes).
There are no hooks in init / procd early enough to allow the switch
This is all a horrible, horrible mess.
As we move to more powerful routers with better external storage, completely external boot and mount will grow as a requirement.There should be a mechanism to allow it to function.

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by sgparry

P.S. I have spent several weeks effort working on these issues.

comment:2 Changed 2 years ago by anonymous

What about using the "rdinit" kernel commandline to run a script before preinit? See

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.