Team LiB
Previous Section Next Section

Getting Linux to Boot after Installation

You may find that after you have finished installing Fedora or Red Hat Linux, your system will not boot. There are several things you can try if that is the case. The first suggestion would be to pass options to the kernel. After that, you can try to go into rescue mode to correct the problem.

Adding Kernel Options after Installation

If you need to add options to the kernel to get the installation process to work, you may also need to pass those same options to the kernel after the operating system is installed. Otherwise, some piece of hardware may not work properly or the entire boot process may fail. You can try out kernel options before you add them permanently to your boot loader configuration file. Procedures for adding kernel options temporarily and permanently are described in the following two sections.

Adding Options at Boot Time

To try out kernel options before adding them permanently, do the following:

  1. Reboot your computer.

  2. When you see the boot screen (GRUB by default), quickly press the arrow key to highlight the operating system you want to boot.

  3. Press e to be able to edit the boot lines for that operating system.

  4. Move the cursor to highlight the kernel line and press e to edit the kernel line.

  5. With the cursor at the end of the kernel line, type the options you want to add and press Enter.

  6. Press b to continue the boot process, including the new options.

If the options you added fixed your problem, you can consider adding them to your boot loader configuration file so that they can be used permanently. The following section describes how to add kernel options to the GRUB boot loader.

Adding Options to the GRUB Boot Loader

If you have decided that you want to permanently add boot options to your computer, and you are using the GRUB boot loader, you can put those options directly into the /boot/grub/grub.conf file. The following example shows what a grub.conf looks like:

   # grub.conf generated by anaconda
   #
   # Note that you do not have to rerun grub after making changes to this file
   # NOTICE: You have a /boot partition. This means that
   #         all kernel and initrd paths are relative to /boot/, eg.
   #         root (hd0.0)
   #         kernel /vmlinuz-version ro root=/dev/hda6
   #         initrd /initrd-version.img
   #boot=/dev/hda
   default=0
   timeout=13
   splash image=(hd0,0)/grub/splash.xpm.gz
   title Fedora Core (2.4.22-1.2115.nptl)
   root (hd0.0)
   kernel /vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ hdb=ide-scsi
   #initrd /ini trd-2.4.22-1.2115.nptl.img

If you want to add boot options to this file, you can put them right at the end of the kernel line. For example, if you wanted to tell the kernel to use 256MB of RAM, you could add the mem=256M option to the end of the kernel line so that it appears as follows:

   kernel /vml inuz-2.4.22-1.2115.nptl ro root=LABEL=/ hdb=ide-scsi mem=256M

When Fedora boots, the mem= values will be read and the kernel will attempt to use the assigned amount of memory.

Entering Rescue Mode

The same boot CD you used to install Fedora Core or Red Hat Linux can be used to boot your computer in rescue mode. To enter rescue mode, insert the CD and boot the computer as you would start a regular installation. When the boot prompt appears, type the following:

   boot: linux rescue

Rescue mode does what it can to start up a network connection for your computer, locate your Fedora or Red Hat Linux installation, and mount the file system so that you access your files. If you can access your computer file system at that point, you can try to modify your configuration files to get Fedora to boot.

The first thing you should do is change the root directory to/mnt/sys image (where the rescue CD should have put the root directory of your Fedora Core installation). To do that, type

   # chroot /mnt/sysimage

With your file system now accessible as it would be during a regular system boot, you can try to correct whatever problem is preventing your system from starting up properly. The things you might want to do include the following:

  • Disabling services that may be hanging the computer-If there is a service keeping your computer from booting, you can simply disable it. For example, once you have access to a shell, you could disable the Samba service by typing

    # chkconfig smb off
    

    The next time you boot your computer, it will not try to start the Samba service.

  • Change the default run level-If the GUI is not starting up or crashing, you can edit the /etc/in ittabflle to make the default a text-based login. If the in it default line is booting to state 5, change the line to read as follows so it will boot to init 3:

    id:3:initdefault:
    
  • Add boot options-You can edit the /etc/grub/grub.conffile to add options to the kernel line, as described in the preceding section.


Team LiB
Previous Section Next Section