◄ 
▲ 
► |
|
# etc/inittab
echo "Creating /etc/inittab"
> tempfs/etc/inittab echo "# Entry format - <id>:<runlevels>:<action>:<process>"
>> tempfs/etc/inittab echo "# id == tty to run on, or empty for /dev/console"
>> tempfs/etc/inittab echo "# runlevels == ignored"
>> tempfs/etc/inittab echo "# action == one of sysinit, respawn, askfirst, wait, and once"
>> tempfs/etc/inittab echo "# process == program to run"
>> tempfs/etc/inittab echo "::sysinit:/bin/mount -o remount,rw /"
>> tempfs/etc/inittab echo "::sysinit:/bin/mount -t proc proc /proc"
>> tempfs/etc/inittab echo "::sysinit:/bin/mount -a"
>> tempfs/etc/inittab echo "::sysinit:/etc/init.d/rcS" # busybox default
>> tempfs/etc/inittab echo "::askfirst:/bin/sh" # busybox default
>> tempfs/etc/inittab echo "::ctrlaltdel:/sbin/reboot" # busybox default
>> tempfs/etc/inittab echo "::shutdown:/sbin/swapoff -a" # busybox default
>> tempfs/etc/inittab echo "::shutdown:/bin/umount -a -r" # busybox default
>> tempfs/etc/inittab echo "::restart:/sbin/init" # busybox default
The inittab file is not technically required here. The BusyBox program handles all init functions, and it will perform all the default commented lines you see here if there is no inittab file. Unfortunately, it won't mount proc and it won't remount the root filesystem as read/write. Without those two actions, you can't do anything interesting. So really, you're going to need an inittab file like this. Take note of the last entry specified for the "sysinit" action - I run a script called "/etc/init.d/rcS". That's going to run BEFORE anybody logs in.