15.2. A Boot Disk

The very first thing you will need when your system cannot boot up, for any of the reasons we mentioned before, will be a boot disk. You should have one already, created during the installation process. A boot disk will allow you to boot your system up and, in a matter of minutes, enable you to undo the thing that has made your system unable to boot.

Note

You can also use the Rescue Mode of Mandrake Linux's installation CD-ROM to boot your machine and perform some maintenance tasks, but a boot disk might prove to be useful anyway (for example, if your machine does not support booting from the CD-ROM drive).

You have two ways of creating a boot disk under Mandrake Linux, either by using the console, or a graphical one. To create a boot disk you have to be root. If you fire up the graphical program as a normal user, you will be asked for your root password before continuing.

15.2.1. Creating a Boot Floppy From The Console

So, you are on a console, su to become root and type the following:
[root@localhost]# mkbootdisk --device /dev/fd0 `uname -r`
and tap Enter. Doing so will give you something like this:

Insert a disk in /dev/fd0. Any information on the disk will be
lost. Press <Enter> to continue or ^C to abort:

Let's explain the example given. Among other parameters, the two that mkbootdisk needs are --device [device], which tells mkbootdisk the device we want to write the boot disk to. In our example, we have chosen /dev/fd0 which is the first floppy drive in the system. In 99.9%; of the cases that should work, if it doesn't work for you, well, choose the right device to use.

The other parameter needed is [kernel-version], which tells mkbootdisk which kernel we want to put on it. In our example, we use `uname -r` which gives as a result the name of the current running kernel. Thus, the example given will create a boot disk in the first floppy drive with the current running kernel on it.

Please note that this will create a boot disk that is based on your current kernel (in case you choose that) with all the modules and stuff which that kernel has. If you do not want to include all the modules or want to include other modules (for example one for tape support), you'd better use our graphical tool drakfloppy.

15.2.2. Using drakfloppy to Create a Boot Disk

drakfloppy is a graphical tool that lets you create a highly customized boot disk. To start drakfloppy go to the Configuration/Boot and Init menu and fire it up from there. You will be asked for your root password unless you already are root as seen in figure 15-1:

Figure 15-1. Enter your root password

After that you will be looking at drakfloppy's main window (figure 15-2). If you want to create a "default" boot disk, that is, one that is the same as if made with the console example given above, all you have to do is to insert a floppy disk in the appropriate floppy drive, select that drive from the pull-down list and press Build the disk.

Figure 15-2. drakfloppy's main window

If you want to customize your boot disk, you will have to hit the Expert mode button and drakfloppy's window will change as shown in figure 15-3.

Figure 15-3. Making a customized boot disk

In the Expert Area you have two sections: one with some buttons with options for mkinitrd and another with the module "tree". The buttons are self-explanatory. In this example we want to use the IDE tape module and pre-load it. When you are done customizing the boot disk press Build the disk to create it.

15.2.3. Testing the boot disk

Always test your boot floppy to make sure it actually works. There are few things more embarrassing than finding that the floppy will not boot because of media errors. If the floppy boots OK then...

15.2.4. You are Done!

Congratulations! You already have the most important tool in trying to recover a damaged system: a boot disk. Now, on to some important considerations on the second most important tool: backups.


Tux on Star from MandrakeSoft Linux is a registered trademark of Linus Torvalds. All other trademarks and copyrights are the property of their respective owners.
Unless otherwise stated, all the content of these pages and all images are Copyright MandrakeSoft S.A. and MandrakeSoft Inc. 2002.
http://www.mandrakelinux.com/