6.3. Construction
There is a lot of typing to do in this section because of all of the start−up scripts that need to be created. Using
a mouse to copy the text from this guide and paste it into a text editor can be a great time saving tool.
6.3.1. Create a GRUB configuration file
Insert and mount the floppy labeled "boot disk".
bash# mount /dev/fd0 /mnt
bash# cd /mnt/boot/grub
Use your favorite text editor to create the following file and save it as /mnt/boot/grub/menu.lst:
default 0
timeout 3
title Pocket Linux Boot Disk
kernel (fd0)/boot/vmlinuz root=/dev/fd0 load_ramdisk=1 prompt_ramdisk=1
6.3.2. Install sysvinit utilities
Download the latest sysvinit source from ftp://ftp.cistron.nl/pub/people/miquels/software/
bash# cd /usr/src/sysvinit−2.85/src
bash# make CC="gcc −mcpu=i386"
bash# cp halt init shutdown ~/staging/sbin
bash# ln −s halt ~/staging/sbin/reboot
bash# ln −s init ~/staging/sbin/telinit
bash# mknod ~/staging/dev/initctl p
In the interest of speed we are skipping the steps for checking libraries and stripping binaries. The library
requirements for sysvinit are very basic and the Makefile is configured to automatically strip the
binaries.
6.3.3. Create /etc/inittab file
Use a text editor to create the following file and save it as
~/staging/etc/inittab
# /etc/inittab − init daemon configuration file
#
# Default runlevel
id:1:initdefault:
#
# System initialization
si:S:sysinit:/etc/init.d/rc S
#
# Runlevel scripts
r0:0:wait:/etc/init.d/rc 0
r1:1:respawn:/bin/sh
r2:2:wait:/etc/init.d/rc 2
r3:3:wait:/etc/init.d/rc 3
r4:4:wait:/etc/init.d/rc 4
r5:5:wait:/etc/init.d/rc 5
r6:6:wait:/etc/init.d/rc 6
Pocket Linux Guide
Chapter 6. Automating Startup & Shutdown
30