next up previous contents
Next: 2.2.2 LILO Up: 2.2.1 Boot floppy Previous: 2.2.1 Boot floppy   Contents

2.2.1.1 mkbootdisk

Mkbootdisk is a program that allows you to create a stand-alone boot floppy from a running system. (man mkbootdisk) It's the same script that the installer uses to create one during the install. The resulting boot disk is entirely self contained, and includes an initial ramdisk image which loads any necessary SCSI modules for the system. The created boot disk looks for the root filesystem on the device suggested by /etc/fstab. The only required argument is the kernel version to put onto the boot floppy.

You can create a boot floppy from the installed kernel, or from a newly compiled kernel. Some people prefer to use a boot floppy for testing a new kernel, instead of loading it from the bootloader. Here's a sample command line for creating a boot floppy on a newly installed Red Hat Linux system.

# mkbootdisk -device /dev/fd0 2.4.20-8
By default mkbootdisk give very little information, except for errors. For more information choose the -verbose argment like this

# mkbootdisk -device /dev/fd0 -verbose 2.4.20-8
If you ran mkbootdisk without errors, you can see what's on it by mounting the floppy.

# mount -t vfat /dev/fd0 /mnt/floppy

# ls -l /mnt/floppy

total 1346

-rwxr-xr-x 1 root root 208 Sep 23 19:16 boot.msg

-rwxr-xr-x 1 root root 246298 Sep 22 01:24 initrd.img

-r-xr-xr-x 1 root root 7836 Sep 23 19:16 ldlinux.sys

-rwxr-xr-x 1 root root 143 Sep 23 19:16 syslinux.cfg

-rwxr-xr-x 1 root root 1122186 Mar 13 2003 vmlinuz
So what are all these files?

# cat /mnt/floppy/boot.msg

Press <return> (or wait 10 seconds) to boot your Red Hat Linux system from /dev/rd/c0d0p3. You may override the default linux kernel parameters by typing "linux <params>", followed by <return> if you like.

# cat /mnt/floppy/syslinux.cfg

default linux

prompt 1

display boot.msg

timeout 100

label linux

       kernel vmlinuz

       append initrd=initrd.img ro hdc=ide-scsi root=/dev/rd/c0d0p3
syslinux.cfg is the configuration file for the bootloader to instruct it what then name of the ram disk is, that hdc requires the ide-scsi module and where the root file system is on the disk.

So boot.msg is the message you get when you boot from the floppy. initrd.img is the ram disk that contains the temporary root file system, with kernel modules and other information required to boot the system. ldlinux.sys is the system loader.

Now just to make sure, you should boot from the floppy and make sure it works properly. Once you've tested it, label it, write protect it and put it in a safe place. It's good insurance, and like all good insurance, we hope you'll never need it, but you'll be glad you have it when you need it.


next up previous contents
Next: 2.2.2 LILO Up: 2.2.1 Boot floppy Previous: 2.2.1 Boot floppy   Contents