[<<][openwrt][>>][..]
Tue Dec 11 17:44:10 EST 2012

Clean boot

killall ntpd dnsmasq dropbear udhcpc hotplug2 klogd syslog 
killall watchdog

umount /overlay
umount /tmp
umount /rom
umount /proc/bus/usb
umount /sys/kernel/debug
umount /dev/pts
umount /sys
umount /proc

# Won't work:
umount /dev

It seems that in order to do this properly, all processes need to be
killed.  Keeping a shell alive is already too much.

Something I don't understand: when moving a different filesystem into
root position, will /dev and /sys move to the new root or stay grafted
on the old root?

Anyways, lsof would help.  Also would help is to find out if normal
initrd keeps /dev mounted when root fs is moved.

Maybe clearing the whole thing would work?
Nope... hope that didn't kill my filesystem..

It's probably because init is still running.
Running lsof on Debian indeed shows /dev/console as fd 0 1 2 of init.

I don't see a way of replacing init at runtime.  This seems to need a
bootstrap in the OpenWRT init script.

Probably best to patch OpenWRT init script to check for a USB drive
and perform the chroot.




[Reply][About]
[<<][openwrt][>>][..]