Linuxdoc Linux Questions
Click here to ask our community of linux experts!
Custom Search

10. Make a boot diskette (optional)

If you wish, you can make a boot diskette, in case you run into problems when trying to boot the new disk.

Insert an empty diskette, format it, create a file system on it and mount it:

fdformat /dev/fd0H1440
mkfs.ext2 /dev/fd0
mount -t ext2 /dev/fd0 /mnt

Debian only. With Debian 2.x, use /dev/fd0u1440 instead of /dev/fd0H1440. With Debian 1.x, use /dev/fd0h1440, with a lower case h.

Debian only. With Debian 2.x, use superformat instead of fdformat. You can ignore the error mformat: command not found. With Debian 1.x, if you don't have the command fdformat, you can omit it if the floppy is already formatted. In this case, you should check the diskette for bad blocks by adding -c after the mkfs.ext2 command.

Slackware only. Use /dev/fd0u1440 instead of /dev/fd0H1440. With older versions, try /dev/fd0h1440, with a lower case h.

SuSE only. Use /dev/fd0u1440 instead of /dev/fd0H1440.

Copy all files in /boot to the diskette:

cp -dp /boot/* /mnt

Red Hat only. If the /boot directory contains both vmlinux and vmlinuz files (note the difference in the last letter), you only need to copy the vmlinuz files to the boot diskette. They are the same as the vmlinux files, except that they're compressed to save space.

Slackware only. Copy the file /vmlinuz to the boot diskette; use the command cp /vmlinuz /mnt.

Create a new file /mnt/lilo.conf as follows:

boot=/dev/fd0                 # Install LILO on floppy disk.
map=/mnt/map                  # Location of "map file".
install=/mnt/boot.b           # File to copy to floppy's
                              # boot sector.
prompt                        # Have LILO show "LILO boot:"
                              # prompt.
timeout=50                    # Boot default system after 5
                              # seconds. (Value is in tenths of
                              # seconds.)
image=/mnt/vmlinuz            # Location of Linux kernel on
                              # floppy. The actual name may
                              # include a version number, for
                              # example "vmlinuz-2.0.35".
    label=linux               # Label for Linux system.
    root=/dev/hda1            # Location of root partition on
                              # new hard disk. Modify this as
                              # appropriate for your system.
                              # Note that you must use the name
                              # of the future location, once the
                              # old disk has been removed.
    read-only                 # Mount partition read-only at
                              # first, to run fsck.

Install LILO on the boot diskette:

/sbin/lilo -C /mnt/lilo.conf

The -C option tells LILO what configuration file to use.

Unmount the diskette:

umount /mnt