Recovering from Fatal Disasters ******************************* You can use the MCC boot floppy to recover from fatal disasters. What kind of disaster requires such measures? Sometimes people accidentally do things which make the system unbootable. For example, they may edit or delete one of the configuration files in `/etc', or they may delete a fundamental utility, like `/etc/init' or one of the shared libraries in `/lib'. In many of these cases, the system will still boot in single user mode. To do this you must have installed LILO as your boot loader, even if it is installed in a file system partition and is called by another boot loader, such as the DOS or OS/2 loaders. When LILO boots, you must force it to prompt you. No special action is necessary if you put the `prompt' command instead of the `delay' command in `/etc/lilo/config'; this forces a prompt in all cases. To force LILO to prompt, you must perform one of the following actions: - Hold the `SHIFT' key down at boot time. - Hold the `CTRL' key down at boot time. - Hold the `ALT' key down at boot time. - Set the `CAPS LOCK' key on at boot time. - Set the `SCROLL LOCK' key on at boot time. When the prompt `boot:' appears, you must type the name of your default kernel followed by the word `single'; for example, boot: linux single If you don't remember the name of your kernel, press the `TAB' key. This causes a list of the available options to be displayed. In very serious cases, when you cannot boot in single user mode, you may use the MCC boot floppy to recover. Simply boot from the floppy in read-only mode, pressing `' at the LILO prompt. If the file `/bin/sh' is intact on your hard disk, you can choose `e' from the menu, and this will start a shell after mounting the various partitions. At this point, most of the editors and other utilities should work correctly. The commands `mount' and `umount' do not work at all. Repair the damage, then reboot the system. Do not use `halt', `reboot', or `shutdown' to reboot; type `CTRL-D' or `exit'. In the very worst possible case, for example when `/bin/sh' has been deleted, you can re-install Linux from the boot floppy. As with all MCC upgrades, this creates a special directory named `/backupdirs', in which your existing configuration files are saved; for example, `/etc/passwd' is moved to `/backupdirs/etc/passwd'. It is not possible -- or desirable -- to leave such files if they exist, since the newly installed system might not boot. The file `/etc/syslogd' is also moved to the `/backupdirs' directory when you install the Base package from the boot floppy. You will need to run LILO again before rebooting. Use the command ROOT=/root;/etc/lilo/lilo If you recompile your kernel, or if you use one of the smaller MCC kernels, you may wish to customise the MCC boot floppy. Assuming that you have your kernel in `/etc/Image' and the matching data file `/etc/psdatabase', mount a `standard' MCC boot floppy in write mode from drive 0 on `/mnt'. Then give these commands: cp -p /etc/Image /mnt/etc/Image tar cf - /etc/psdatabase|gzip -9 >/mnt/psdata.tgz /etc/lilo/lilo -C /mnt/etc/config.lilo umount /mnt This should produce a recovery system that will boot your own kernel (so that the `ps' commands all work) and reinstall your own kernel if you install Linux from the floppy.