Next Previous Contents

4. Preparing the boot disk

To prepare a boot disk we just want a kernel, syslinux and a 1,44MB diskette. Syslinux is tiny boot loader, designed specifically to boot a kernel and pass some arguments through its command line using a diskette. As we will see it very easy to configure, too.

4.1 Building a kernel

Always choose the newest kernel to build. As of this time of writing (Wed Sep 12 17:28:22 2001) the newest kernel is 2.4.9. Building an older kernel can only save you time updating the nesessary programms. Also, be sure you have the program versions described in /usr/src/linux/Documentation/Changes. It is a good idea to compile the kernel using the base system to be served. The kernel can be build according to your needs of drivers, but it must contain the following options:

Do not forget to compile in the VESA framebuffer driver. Then go on with the familiar kernel compilation routine. Unless you have build the kernel using the base system, copy all the modules created to the base/lib/modules directory of the exported directory structure. The new kernel resides at /usr/src/linux/arch/i386/boot.

You also have to set the root device to your kernel. You have to use the rdev programm. Execute the following commands:

mknod /dev/boot255 c 0 255
rdev /path/to/kernel/file /dev/boot255

4.2 Creating the boot disk

Now, we have to use the syslinux programm. Insert a disk into the first floppy drive and run:

syslinux -s /dev/fd0

Mount the floppy and notice that syslinux has written 2 files: syslinux.cfg and ldlinux.sys. The second is the boot loader executable. The syslinux.cfg is the programm configuration file. A typical structure for that file is the following:

default linux
   append init=/sbin/init root=/dev/nfs
        ip=:195.251.160.10:195.251.160.254:255.255.255.0:::'bootp'
        nfsroot=195.251.160.10:/usr/local/linux/ws/\%s vga=0x318

   prompt 1
   timeout 30
   readinfo 2

The default statment is the kernel name to be booted and the append is the command line to be passed to the kernel. Now, you have to copy the kernel you have created to the floppy and rename it to 'linux'.

4.3 The kernel command line

To boot a diskless client, its kernel must have the following command line options:

All these options are discussed in detail in /usr/src/linux/Documentation/nfsroot.txt. Read it and adjust the given command line to your needs.

Now you have created the boot disk you are ready to test the system you have build. Start the NFS and BOOTP services and boot a client with the boot disk. No one has been able to do it from the first time. So go on to the next section!


Next Previous Contents

mirror server hosted at Truenetwork, Russian Federation.