OpenWrt Forum Archive

Topic: Trouble booting from USB stick

The content of this topic has been archived on 7 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi

I have installed 706 on a WL500gP. 

I have setup the usb stick and I have changed /sbin/init to a script

#!/bin/sh

boot_dev="/dev/sda1"


date > /tmp/debug

for module in usbcore ehci-hcd scsi_mod sd_mod usb-storage jbd ext3
do
        insmod -v $module >> /tmp/debug 2>&1
done

sleep 25s


lsmod  >> /tmp/debug 2>&1
cat /proc/partitions  >> /tmp/debug 2>&1
/bin/ls -R /dev/sd*  >> /tmp/debug 2>&1
/bin/dmesg >> /tmp/debug 2>&1
/bin/ps -ef >> /tmp/debug 2>&1
/sbin/udevtrigger --verbose >> /tmp/debug 2>&1

/bin/mount -o rw "$boot_dev" /mnt >> /tmp/debug 2>&1

[ -x /mnt/sbin/init ] && {
        . /bin/firstboot
        pivot /mnt /mnt
}


exec /bin/busybox init


my problem is

1) I have no /dev/scsi/ files
2) /dev/sda is not seen at mount time - but /block/sda/sda1 is there


I am guessing some hotplug/udev script has to run to setup the /dev device, but bugger me I can't find it

once busybox starts, i am able to see and mount the partition, so I am pretty sure I have all the right modules

Thanks
Alex

(Last edited by alexsamad on 25 Jul 2007, 10:22)

What kernel do you use? 2.4 or 2.6?

I think, there should be a built-in method of booting from USB on openwrt, enabled by a flag in some file in /etc/config/.
Maybe one could use the active partition flag of a partition?

Currently, I have my boot from USB code added at the end of /etc/preinit (wgt634u, 2.6.x kernel:

# mount the usb stick

/sbin/hotplug2 --persistent &
echo /sbin/hotplug-call > /proc/sys/kernel/hotplug
for module in usbcore usb-ohci ehci-hcd uhci-hcd scsi_mod sd_mod usb-storage jbd ext3 ; do {
        insmod $module
}; done

sleep 20s
boot_dev="/dev/sda1"
mount $boot_dev /mnt -o rw,noatime
# if everything looks ok, do the pivot root
killall hotplug2
[ -x /mnt/sbin/init ] && {
        mount -o move /proc /mnt/proc && \
        pivot_root /mnt /mnt/rom && {
                mount -o move /rom/dev /dev
                mount -o move /rom/rom/sys /sys
                mount -o move /rom/tmp /tmp
                # umount /rom/tmp
                exec /sbin/init
        }
        # umount $boot_dev
}

exec /sbin/init

using 2.6, will give it a go, thanks

Any reason to add it at the end of preinit and not in /sbin/init


I gave it a try loaded up the code into preinit, but it did not seem to do any thing, added some logging which did not seem to work either.

I then moved the code into /sbin/init and not it seems to be stuck again - have to push up a image via rescue.

not sure what it going on.  I will have a serial cable in a weeks time so I can do a bit (more) debugging

edit

spoke to soon, i can ssh into it, but still no mounting of sda1 - says it doesn't exist, when i ls /dev/sd* it doesn't find any thing, but it does find it in /proc/partitions

(Last edited by alexsamad on 25 Jul 2007, 11:37)

Okay, got it working.

(Rather embarrassing) the usb stick wasn't plugged in after the last rebuild...

Seems to be working now.

Thanks

Oh I placed the stuff in /etc/preinit

edit
I spoke to early yet again, it was starting to work from /sbin/init, but not from /etc/preinit (seems like the one from /rom/etc/preinit is called not the other one)


I presume (which was going to be my next step anyway) is to build my own image and fix it in /etc/preinit....

Thanks again

(Last edited by alexsamad on 25 Jul 2007, 12:40)

It should be in /sbin/init (the jffs /sbin/init ... not your flash drive's, of course).

For me, the key was calling hotplug before mounting, as MMCM lists in his code sample.

Yep that was it exactly.

So for the archives and people who follow in this path.

The key thing was to start hotplug which finds the devices and places them in /dev, which means you can then mount them.

The place to make the change (for me), was in /sbin/init on the /jffs parition.

Interesting thread, I am having the same trouble.

So what was the final config, and in what file did it go?

Thanks...

MMCM's script works good here, asus wl500gp with atheros wifi on kernel 2.6. thank you big_smile

mountaindude wrote:

Interesting thread, I am having the same trouble.

So what was the final config, and in what file did it go?

Thanks...

I have added this to /etc/preinit

exec > /etc/preinit.text 2>&1
set -x

/sbin/hotplug2 --persistent &

echo /sbin/hotplug-call > /proc/sys/kernel/hotplug

for module in usbcore usb-ohci ehci-hcd uhci-hcd scsi_mod sd_mod usb-storage jbd ext3 ; do {
        insmod $module
}; done

sleep 30s
boot_dev="/dev/sda1"
mount $boot_dev /mnt -o rw,noatime

# if everything looks ok, do the pivot root
killall hotplug2

[ -x /mnt/sbin/init ] && {
        mount -o move /proc /mnt/proc && \                                                                        
        pivot_root /mnt /mnt/rom && {
                mount -o move /rom/dev /dev
                mount -o move /rom/rom/sys /sys
                mount -o move /rom/tmp /tmp
                # umount /rom/tmp
                set +x
                exec <$M0 >$M1 2>&0
                exec /sbin/init
        }
        # umount $boot_dev
}

set +x
exec <$M0 >$M1 2>&0
exec /sbin/init

this worked in 7.07, but I am having some problem with 7.09.

Has anyone found a solution for 7.09? I have trouble too.

Please explain step by step. Thank you in advance

Hi,

I run 7.09 with kernel 2.4 on a wl-500g premium, and I just followed the steps mentioned in the wiki  http://wiki.openwrt.org/UsbStorageHowto to get the root-fs on the usbstick.
As I remember, there was no need to change anything, it was (and is) just working like a charm.

eleon216 wrote:

Hi,

I run 7.09 with kernel 2.4 on a wl-500g premium, and I just followed the steps mentioned in the wiki  http://wiki.openwrt.org/UsbStorageHowto to get the root-fs on the usbstick.
As I remember, there was no need to change anything, it was (and is) just working like a charm.

I did have the pivotroot working normally in the same configuration as yours, but after flashing another firmware and reflashing openwrt again the procedure doesn't work anymore. The problem being that the device doesn't seem to exist during boot, just like reported earlier in this tread.

Although kamikaze doesn't use nvram variables anymore, I suspect that they might be involved during bootstrap, because only those nvram settings could possibly have been changed persistently since my origional setup. 
Would you be so kind to publish your nvram settings so that i could check them against mine?

Warning for other readers: messing with nvram settings may brick your router.

Hi,

I checked my config again, and it´s seems like I use the config for whiterussian (I guess the kamikaze config wasn´t available when I set it up).
But I´m using kamikaze 7.09 and it works, so you maybe you should give it a try, too.

So here is my /sbin/init

#!/bin/sh

boot_dev="/dev/scsi/host0/bus0/target0/lun0/part1"

for module in usbcore ehci-hcd scsi_mod sd_mod usb-storage jbd ext2; do {
        insmod $module
}; done
       
sleep 2s
mount -o rw "$boot_dev" /mnt
       
[ -x /mnt/sbin/init ] && {
       . /bin/firstboot
       pivot /mnt /mnt
}
exec /bin/busybox init

and this are my nvram-variables:

boardflags=0x0110
boardnum=45
boardrev=0x10
boardtype=0x042f
boot_wait=on
bridge_disable=0
cfe_wait_led_gpio=1
cfe_wait_on_restore=0
clkfreq=264
custom_shutdown_command=stoprcasus
default_boardflags=0x0110
default_http_passwd=
default_http_username=
default_lan_proto=dhcp_server
default_new_disk_action=no_action
default_physical_authentication_enable=disabled
default_primary_pool_name=
default_primary_share_name=
default_router_disable=0
default_start_page=start_system.asp
default_workgroup=WORKGROUP
dl_ram_addr=a0001000
early_startup_command=convertasus
et0macaddr=00:17:31:B4:XX:XX
et0mdcport=0
et0phyaddr=30
et1macaddr=40:10:18:00:xx:xx
et1mdcport=1
et1phyaddr=31
gpio6=robo_reset
gpio_0_name=soft_power_switch
gpio_3_name=power_enable
hardware_version=WL500gH-01-00-00-00
kernel_gpio_init_out_3=1
kernel_gpio_init_out_6=1
lan_dhcp_enabled=1
lan_dhcp_lease=
lan_dhcp_num=
lan_dhcp_start=
lan_ifname=br0
lan_ifnames=vlan0 eth2
lan_ipaddr=192.168.2.200
lan_netmask=255.255.255.0
lan_proto=static
landevs=vlan0 wl0
language=en
misc_io_mode=bcmgpio
ntp_server=pool.ntp.org
openvpn_cli=0
openvpn_cli_auth=psk
openvpn_cli_port=1194
openvpn_cli_proto=udp
opo=0x0
os_flash_addr=bfc40000
os_ram_addr=80001000
pmon_ver=CFE 3.91.23.0
ppp_idletime=10
ppp_mtu=1492
ppp_passwd=xxxxxxxx
ppp_redialperiod=15
ppp_username=xxxxxxxxx
pppoe_idletime=10
pppoe_ifname=
pppoe_ifnames=
pppoe_passwd=xxxxxxx
pppoe_username=xxxxxxxx
pptp_server_ip=10.0.0.138
primary_ifname=eth0
regulation_domain=0X30DE
rescue_gpio=4
reset_gpio=7
scratch=a0180000
sdram_config=0x0062
sdram_init=0x0009
sdram_ncdl=0x10507
sdram_refresh=0x0000
ses_enable=0
startup_command=rcasus
time_zone=CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00
vlan0hwname=et0
vlan0ports=1 2 3 4 5t
vlan1hwname=et0
vlan1ports=0 5
wait_time=1
wan_device=vlan1
wan_dhcp_lease=
wan_dhcp_num=
wan_dhcp_start=
wan_hostname=Asus
wan_ifname=ppp0
wan_ifnames=vlan1
wan_ipaddr=0.0.0.0
wan_netmask=255.255.255.0
wan_proto=pptp
wan_vport=4
wandevs=et0
watchdog=10000
web_hook_libraries=corewebhooks netwebhooks diskwebhooks winnet printwebhooks netregistration samplenetregistration samplehooks
wifi_dhcp_lease=
wifi_dhcp_num=
wifi_dhcp_start=
wifi_ifname=
wifi_ifnames=
wl0_afterburner=off
wl0_akm=psk2
wl0_antdiv=3
wl0_ap_isolate=0
wl0_auth=0
wl0_auth_mode=none
wl0_bcn=100
wl0_channel=8
wl0_closed=0
wl0_corerev=9
wl0_country_code=DE
wl0_crypto=aes
wl0_dfs_postism=60
wl0_dfs_preism=60
wl0_dtim=1
wl0_frag=2346
wl0_frameburst=1
wl0_gmode=4
wl0_gmode_protection=0
wl0_guest_auth_mode_1=open
wl0_guest_crypto_1=0
wl0_guest_key_1=1
wl0_guest_ssid_1=guest
wl0_guest_wep_x_1=0
wl0_guest_wpa_gtk_rekey_1=0
wl0_hwaddr=00:17:31:B4:xx:xx
wl0_ifname=eth2
wl0_infra=1
wl0_key=1
wl0_lazywds=0
wl0_macmode=disabled
wl0_maxassoc=128
wl0_mode=ap
wl0_mode_ex=ap
wl0_mrate=0
wl0_net_reauth=36000
wl0_phytype=g
wl0_phytypes=g
wl0_plcphdr=long
wl0_preauth=1
wl0_radio=1
wl0_radioids=BCM2050
wl0_radius_port=1812
wl0_rate=0
wl0_rateset=default
wl0_reg_mode=off
wl0_rts=2347
wl0_ssid=xxxxxx
wl0_txdiv=3
wl0_txpwr=38
wl0_wds_timeout=1
wl0_wep=disabled
wl0_wme=off
wl0_wme_ap_be=15 63 3 0 0 off
wl0_wme_ap_bk=15 1023 7 0 0 off
wl0_wme_ap_vi=7 15 1 6016 3008 off
wl0_wme_ap_vo=3 7 1 3264 1504 off
wl0_wme_no_ack=off
wl0_wme_sta_be=15 1023 3 0 0 off
wl0_wme_sta_bk=15 1023 7 0 0 off
wl0_wme_sta_vi=7 15 2 6016 3008 off
wl0_wme_sta_vo=3 7 2 3264 1504 off
wl0_wpa_gtk_rekey=0
wl0_wpa_psk=xxxxxxxx
wl0id=0x4320
wlan_hardware_present=yes
wlan_ifname=eth2
wlan_ipaddr=192.168.21.1
wlan_netmask=255.255.255.0

btw: how can I make this fancy code-boxes?

Thanks a lot for the fast and complete response eleon216!

comparing your nvram with mine I notice that I have nummerous additional variables, probably inherreted from another firmware; to mention just a few:

first_partition=/tmp/harddisk/part0
usb_storage_busy=0
usb_disc0_dev=/dev/discs/disc0
usb_disc0_fs_path0=/dev/discs/disc0/part5
usb_disc0_path0=/tmp/harddisk/part0

I'll leave all those extra variables unchanged for now, and try modifying the privotroot script first.
I've tried both whiterussian 0.9 and kamikaze 7.09: in both cases the usb device now only appears after the boot proces has completed. When the /sbin/init script is run during boot the mount commando fails stating that the device /dev/scsi/.../part1 doesn't exist.
After completing the boot sequence (without transferring the root to the usb drive) the device does appear and root can after all be transfered to it manually.
Before running into this problem I also saw the /dev/sda device, but this node now remains absent all the time.

I've asked the help of someone with expert knowledge who'll try to debug this with me tomorrow, so I'm hoping to bring some good news soon.

eleon216 wrote:

btw: how can I make this fancy code-boxes?

you can find the howto here: http://forum.openwrt.org/help.php#bbcode

Hi

I have a working boot from usb stick for kamikaze

This is the preinit is use (/etc/preinit)

#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
. /etc/diag.sh

failsafe_ip() {
        ifconfig $ifname 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up
}

failsafe() {
        [ -n "$ifname" ] && grep "$ifname" /proc/net/dev >/dev/null && {
                failsafe_ip
                netmsg 192.168.1.255 "Entering Failsafe!"
                telnetd -l /bin/login <> /dev/null 2>&1
        }
        lock /tmp/.failsafe
        ash --login
}

mount none /proc -t proc
mount none /sys  -t sysfs

size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)?mt-l:s}' /proc/meminfo)
mount none /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777

if grep devfs /proc/filesystems > /dev/null; then
        mount none /dev -t devfs
        M0=/dev/pty/m0
        M1=/dev/pty/m1
        HOTPLUG=/sbin/hotplug-call
else
        mount -t tmpfs tmpfs /dev -o size=512K
        mknod /dev/console c 5 1
        mkdir /dev/shm
        /sbin/hotplug2 --coldplug --set-rules-file /etc/hotplug2-init.rules
        /sbin/hotplug2 --no-coldplug --persistent --set-rules-file /etc/hotplug2-init.rules &
        M0=/dev/ptmx
        M1=/dev/ptmx
        HOTPLUG=
fi

mkdir -p /dev/pts /dev/shm
mount none /dev/pts -t devpts

# the shell really doesn't like having stdin/out closed
# that's why we use /dev/pty/m0 and m1 as replacement
# for /dev/console if there's no serial console available
dd if=/dev/console of=/dev/null bs=1 count=0 >/dev/null 2>/dev/null && {
        M0=/dev/console
        M1=/dev/console
}

exec <$M0 >$M1 2>&0

echo "- preinit -"
trap 'FAILSAFE=true' USR1
[ -e /etc/preinit.arch ] && . /etc/preinit.arch
set_state preinit
echo "$HOTPLUG" > /proc/sys/kernel/hotplug
eval ${FAILSAFE:+failsafe}
lock -w /tmp/.failsafe
{       
        if      [ -e /etc/preinit.usbboot ]
        then    
                echo "- found usbboot -"
                /etc/preinit.usbboot || mount_root
        else    
                echo "- no usbboot -"
                mount_root
        fi
} 2>&1 | tee /tmp/preinit.log

[ -f /sysupgrade.tgz ] && {
        echo "- config restore -"
        cd /
        mv sysupgrade.tgz /tmp
        tar xzf /tmp/sysupgrade.tgz
        rm -f /tmp/sysupgrade.tgz
        sync
}

echo "- init -"
        
killall hotplug2
exec /sbin/init

This is a patch against trunk 8837(it has been a while since I have looked at this)

Index: package/base-files/files/etc/preinit
===================================================================
--- package/base-files/files/etc/preinit        (revision 8837)
+++ package/base-files/files/etc/preinit        (working copy)
@@ -59,7 +59,17 @@
 echo "$HOTPLUG" > /proc/sys/kernel/hotplug
 eval ${FAILSAFE:+failsafe}
 lock -w /tmp/.failsafe
-mount_root
+{       
+        if      [ -e /etc/preinit.usbboot ]
+        then    
+                echo "- found usbboot -"
+                /etc/preinit.usbboot || mount_root
+        else    
+                echo "- no usbboot -"
+                mount_root
+        fi
+} 2>&1 | tee /tmp/preinit.log
+
 [ -f /sysupgrade.tgz ] && {
        echo "- config restore -"
        cd /

This is the /etc/preinit.usb

#!/bin/sh

echo "- rc=1 -"
rc=1

# Boot usb stick
echo "- hotplug call  -"
/sbin/hotplug2 --persistent --coldplug --max-children 1 &
H=$!
#echo "/sbin/hotplug-call usb"> /proc/sys/kernel/hotplug

echo "- Load modules  -"
for module in usbcore usb-ohci ehci-hcd uhci-hcd scsi_mod sd_mod usb-storage jbd ext3 ext2
do
        {
                insmod $module
        }
done

# Wait for this to settle
echo "- sleep -"
sleep 40s

# Does The drive Exist
echo "- is /dev/sda1 there -"
if [ -e /dev/sda1 ]
then
        echo "- yes  -"
        # Can we mount it
        if  mount -o rw,noatime /dev/sda1 /mnt 
        then
                echo "- mounted  -"
                # Is there a usb.boot file and an executable /mnt/sbin/init file
                if [ -e /mnt/.usb.boot ] && [ -x /mnt/sbin/init ]
                then
                        echo "- Files exist about to pivot  -"
                        mount -o move /proc /mnt/proc && \
                        pivot_root /mnt /mnt/rom && {
                                mount -o move /rom/sys /sys
                                mount -o move /rom/tmp /tmp
                                mount -o move /rom/dev /dev
                                mount -o move /rom/dev/pts /dev/pts

                                echo "- pivot successful  -"
                                rc=0
                        }
                else
                        echo "- files not there ! -"
                        # files doesn't exist umount drive
                        umount /mnt
                fi

        fi
fi

kill $H
echo "- return  -"
set +x
return $rc

These files have to be compiled into the image that you flash onto the device.

it checks for the existence of .usb.boot on the file system if it doesn't exist it just does a normal boot.

it doesn't rely upon any nvram setting, it does start up udev, this is the problem you need udev to find the device at the preinit stage.

I haven't tried this with 2.4 kernel.  Waiting till the open broadcom driver settles a bit for my next attempt with 2.6

Alex

I wanna set up USB boot, but I would like my WL500W router start up as access point even if the USB HD is not there. My idea is to mount all recognized USB partitions in preinit and if any of the contains special file (eg. /Kamikaze.boot ) then I will unmount it and mount it as root. All others are then unmounted.
The reason I wanna do this is that I have 2 USB disks connected to my router. But sometimes I disconnect one of them and use elsewere.
If reboot is necessary while the drive is not there I still want the reboot to work.

I will of course keep you posted on the progress and dump the code here...
But if anybody has any suggestions please bring them on before i use to much time on something that I might do better in another way :-)

Hi Smint,

Maybe the following mount script from koct9i is interesting to you

koct9i wrote:

i use this hack on linux 2.4 powered wl500gp
/etc/hotplug.d/usb/00-uuid:

#!/bin/sh
base=/dev/disk/by-uuid
mkdir -p "$base"
rm "$base"/* 
for dev in /dev/discs/disc*/part* ; do
  uuid="`blkid -c /dev/null -s UUID "$dev" | sed -n -e 's/.*: UUID="\(.*\)" /\1/p'`"
  ln -sf "$dev" "$base"/"$uuid"
done

blkid compiled, but not included in package e2fsprogs

see the related thread here http://forum.openwrt.org/viewtopic.php?id=13856

So this is my idea so far. Any input is appreciated as I don't have a serial console and I would really like it to work at first try :-)

#!/bin/sh
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
. /etc/diag.sh

failsafe_ip() {
        ifconfig $ifname 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up
}

failsafe() {
        [ -n "$ifname" ] && grep "$ifname" /proc/net/dev >/dev/null && {
                failsafe_ip
                netmsg 192.168.1.255 "Entering Failsafe!"
                telnetd -l /bin/login <> /dev/null 2>&1
        }
        lock /tmp/.failsafe
        ash --login
}

mount none /proc -t proc
mount none /sys  -t sysfs

size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)?mt-l:s}' /proc/meminfo)
mount none /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777


if grep devfs /proc/filesystems > /dev/null; then
        mount none /dev -t devfs
        M0=/dev/pty/m0
        M1=/dev/pty/m1
        HOTPLUG=/sbin/hotplug-call
else
        mount -t tmpfs tmpfs /dev -o size=512K
        mknod /dev/console c 5 1
        mkdir /dev/shm
        /sbin/hotplug2 --coldplug --set-rules-file /etc/hotplug2-init.rules
        /sbin/hotplug2 --no-coldplug --persistent --set-rules-file /etc/hotplug2-init.rules &
        M0=/dev/ptmx
        M1=/dev/ptmx
        HOTPLUG=
fi

mkdir -p /dev/pts /dev/shm
mount none /dev/pts -t devpts

# the shell really doesn't like having stdin/out closed
# that's why we use /dev/pty/m0 and m1 as replacement
# for /dev/console if there's no serial console available
dd if=/dev/console of=/dev/null bs=1 count=0 >/dev/null 2>/dev/null && {
        M0=/dev/console
        M1=/dev/console
}

exec <$M0 >$M1 2>&0
echo "Trying to boot from USB"
trap 'FAILSAFE=true' USR1
[ -e /etc/preinit.arch ] && . /etc/preinit.arch
set_state preinit
echo "$HOTPLUG" > /proc/sys/kernel/hotplug
eval ${FAILSAFE:+failsafe}
lock -w /tmp/.failsafe
{
    echo "Hotplug call"
    /sbin/hotplug2 --persistent --coldplug --max-children 1 &
    H=$!
    #echo "/sbin/hotplug-call usb"> /proc/sys/kernel/hotplug
    echo "- Load modules  -"
    for module in usbcore usb-ohci ehci-hcd uhci-hcd scsi_mod sd_mod usb-storage jbd ext3 ext2
    do
        {
                insmod $module
        }
    done

    # Wait for this to settle
    echo "- sleep -"
    sleep 40s

    echo "Looking for devices"
    mkdir -p /mnt
    for device in /dev/sd??
    do
        echo "Looking at device "$device
        mount -o rw,noatime $device /mnt
        if [ -e /mnt/kamikaze-boot ]
        then
        {
            echo "Booting from "$device
            mount -o move /proc /mnt/proc && \
                        pivot_root /mnt /mnt/rom && {
                                mount -o move /rom/sys /sys
                                mount -o move /rom/tmp /tmp
                                mount -o move /rom/dev /dev
                                mount -o move /rom/dev/pts /dev/pts

                                echo "- pivot successful  -"
                return
        }
        else
        {
            echo $device" is not bootable"
            umount /mnt
        }
        fi
    done
}2>&1 | tee /tmp/preinit.log
kill $H
echo "- return  -"
set +x

mount_root

echo "- init -"

killall hotplug2
exec /sbin/init

The discussion might have continued from here.