Книга: Fedora™ Unleashed, 2008 edition

Booting to a Nondefault Runlevel with GRUB

Booting to a Nondefault Runlevel with GRUB

After you select a default runlevel, that runlevel is selected every time you restart the system from a power-off state. There might come a time when you do not want to boot into that runlevel. You might want to enter the maintenance mode or start the system without an active X server and graphical login to modify or repair the X server or desktop manager. You have to follow several specific steps to boot to a nondefault runlevel if you use GRUB, the default boot loader for Fedora.

NOTE

If you have enabled a GRUB password, you must first press p, type your password, and then press Enter before using this boot method.

The GRUB boot loader passes arguments, or commands, to the kernel at boot time. These arguments are used, among other things, to tell GRUB where the kernel is located and also to pass specific parameters to the kernel, such as how much memory is available or how special hardware should be configured.

To override the default runlevel, you can add an additional kernel argument to GRUB as follows:

1. At the graphical boot screen, press e (for edit), scroll down to select the kernel, and press e again.

2. Press the spacebar, type single or 1 (Fedora allows S and s as well), and press Enter.

3. Finally, press b to boot, and you'll boot into runlevel 1 instead of the default runlevel listed in /etc/inittab.

Fedora includes several command-line and graphical system administration utilities you can use to start, stop, reorder, or restart various services in different runlevels. These commands (discussed later in this chapter) work by renaming, removing, or creating symbolic links from /etc/rc.d/init.d to /etc/rc.d/rc.* as appropriate. Many administrators use these commands to change the symbolic links to the scripts under each /etc/rc.d/rc* directory rather than do it by hand.

The locations of symbolic links can also be confusing. Red Hat (and now Fedora) has traditionally kept them in one place, and the Linux Standards Base (LSB) requires that they now be located elsewhere. Because other scripts reference these files and it would be difficult to change them all, Fedora places symbolic links in the places specified by the LSB.

As you might surmise, symbolic links are very powerful tools in the system administrator's toolbox.

Оглавление книги


Генерация: 2.063. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз