5. Problems Arising at Boot Time

It could happen that your system hangs during boot up. If so, don't panic, just keep reading.

[Nota]Nota

The next sections are not introduced in any particular order.

5.1. System Hanging During Boot

If your system hangs during Rebuilding RPM database or Finding module dependencies, just press Ctrl-C. This allows the system to skip this step and continue to boot. Once booted, execute rpm --rebuilddb as root if the system hang was at the Rebuilding RPM database phase. If the system hang was at the Finding module dependencies phase you have most likely been through a kernel upgrade, but haven't done it correctly. Check if the files in the /boot and /lib/modules directories match the current kernel version (i.e., have the current version number attached).

If the boot process hangs at RAMDISK: Compressed image found at block 0 you have a corrupted initrd image. Either try to boot another lilo.conf entry or boot an emergency system and remove or change the initrd= section in /etc/lilo.conf

5.2. Filesystem Check on Boot Fails

[Nota]Nota

The information below applies to ext2 and ext3 filesystems only. If you use a different filesystem, please check its documentation.

If, for any reason, you didn't shut your box down properly, the system runs a routine filesystem check during the next boot. Sometimes it may fail to do this on its own and asks for the root password and drops you to a console. Execute e2fsck -py [device] where [device] is the name of the partition on which the automatic check failed. The -p switch tells e2fsck to make all the necessary repairs without asking, -y assumes you answer yes to all questions. When the check and repair phase is over, press Ctrl-D to leave the emergency console. The system will reboot.

If you get this error regularly, there may be bad blocks on your disk. Execute e2fsck -c [device] to find out. This command automatically marks any bad blocks and prevents the filesystem from storing data in these blocks. e2fsck checks the file system automatically only if it hasn't been unmounted properly during the previous system shutdown; or if the maximal mount count has been reached. To force a check, use the -f option.

[Nota]Nota

The verification for bad blocks on a disk should only be done on unmounted file systems, and can take a long time to complete.

5.3. X Doesn't Start

If you boot into X by default and have managed to break your X configuration somehow, and cannot enter X anymore, you can log into a console and use XFdrake to reconfigure X. You can also boot into a different runlevel, fix X's configuration with XFdrake and reboot into X.

5.3.1. Booting Into a Different Run Level

The default run level GNU/Linux boots to is defined in the /etc/inittab file. Look for an entry like id:5:initdefault:. To boot into run level 3 (the console), you have to define that run level on the boot prompt. Under LILO, press the Esc key once and type linux init 3. Under GRUB, press the E key twice, add init 3, press the Enter key and then the B key to boot.

For a more detailed description about run levels, please refer to the Os Arquivos de Inicialização: init sysv chapter of Mandriva Linux's Guia de Referência.

5.3.2. Configuring X From The Console

To reconfigure X using XFdrake from the console, simply type XFdrake as root.

Using XFdrake is no different to the graphical environment except that you won't have nice icons and may not be able to use the mouse pointer. To move down you have to press the right or down arrow keys on your keyboard; to move up press the left or up keys on your keyboard. You can also use the Tab key to move between the different options/buttons. The text on the currently selected button/option will be highlighted with a different color. Press the Enter key to activate it.

Please refer to Seção 2, “Controlling the Graphical Configuration” for instructions on its usage.