13.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.

13.2.1. Using the console

So, you are on a console, su to become root and type the following:
[root@localhost]# mkbootdisk --device /dev/fd0 2.4.8-17mdk
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 have chosen 2.4.8-17mdk. You will have to change that according to the kernel you are using in your system. Thus, the example given will create a boot disk in /dev/fd0 with kernel 2.4.8-17mdk on it.

Note

If you do not know the name of the running kernel, you can use the simple command uname -r: this will tell you exactly what mkbootdisk needs.

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 that stuff into your boot disk, or even want to change something like, say, adding a module for tape support, you'd better use our graphical tool drakfloppy.

13.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 13-1:

Figure 13-1. Enter your root password

After that you will be looking at drakfloppy's main window (figure 13-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 Ok.

Figure 13-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 13-3.

Figure 13-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.

13.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...

13.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. 2001.
http://www.mandrakelinux.com/