6 echo Busybox
/linuxrc starting
8 echo Mounting
/proc filesystem
9 mount
-t proc none
/proc
12 if grep '\bquiet\b' /proc
/cmdline
> /dev
/null
; then
17 $echo Creating root device
18 mknod
/dev
/root b
1 0 2>/dev
/null
20 echo 0x100 > /proc
/sys
/kernel
/real-root-dev
22 $echo Inserting modules
23 if [ -z "$quiet" ]; then
26 /bin
/insert-modules
>/dev
/null
29 $echo Bringing up loopback interface
30 ifconfig lo
127.0.0.1 up
31 route add
-net 127.0.0.0 netmask
255.0.0.0 lo
33 # Hack required for prism2 cards
34 # It is not yet possible to use iwconfig to configure these cards,
36 if ifconfig wlan0 down
2> /dev
/null
; then
37 $echo Setting up wireless link
38 wlanctl wlan0 lnxreq_ifstate ifstate
=enable
39 wlanctl wlan0 lnxreq_autojoin ssid
= authtype
=opensystem
42 $echo Obtaining IP address via DHCP
43 $echo Trying to obtain IP address via wired link
[eth0
]
44 if udhcpc
-i eth0
-f -n -q -s /bin
/udhcpc-post
; then
45 $echo Successfully obtained IP address via wired link
[eth0
]
47 $echo Failed to obtain IP address via wired link
[eth0
]
48 $echo Trying to obtain IP address via wireless link
[wlan0
]
49 udhcpc
-i wlan0
-f -n -q -s /bin
/udhcpc-post
52 if [ -d /sysroot
/initrd
]; then
53 $echo Unmounting
/proc prior to pivot_root
56 $echo Pivoting root to
/sysroot
57 pivot_root
/sysroot
/sysroot
/initrd
60 $echo Remounting devfs
at correct place
61 mount
-t devfs none
/dev
63 $echo Releasing locks on old devfs
68 $echo Unmounting old devfs
71 # Failed to mount root: report error and hang
72 echo FATAL ERROR
: Failed to mount root filesystem
73 echo Press Alt-SysRq-B or hit the
reset switch to reboot
74 while : ; do sleep 6000 ; done