Changing your boot environment permanently

The word permanently is in quotes in the heading because you can, of course, go back and change this setting later, if you want. Permanently just refers to the fact that after you have made this change, every time you boot the system, it automatically goes into the preferred environment until you change it.

You can't make this change in Linspire or Xandros unless you want to boot into single-user mode, which is basically "safe mode" and not much use. Well, okay, you can, but you would need a techie friend to set up a bunch of stuff for you. Linspire and Xandros assume that you don't want to do this. You can't do this in Knoppix either, but then it's a Live CD so you won't be doing anything permanent to it.

To make this change in Fedora, Mandrake, or SuSE, you need to edit what's called a runlevel. Fortunately, all three of these distributions use the same runlevel settings, so the instructions are the same for all of them:

1. In the GUI, open a command line terminal.

If you're not sure how to do so, see Chapter 14. If you're not in the GUI and you're already logged in, type su - to become the root user.

2. Type cp /etc/inittab /etc/inittab.old to make a backup.

Now, if something happens while you're editing the inittab file, you can always restart fresh with the old version.

3. Open the inittab file in your preferred text editor.

Some Linux text editors are covered in Chapter 16.

4. Scroll down until you find a line similar to the following:


This line appears near the top of the file. What you're interested in here is the number. In most mainstream Linux distributions, the number 5 tells Linux to boot into the GUI, and the number 3 tells Linux to boot into the command line. In the preceding example, therefore, I boot into the GUI.

5. Change the number in this line.

If it's a 5, change it to 3, and vice versa. Make sure that all colons and other items are left properly in place, or else your machine will have problems booting later.

6. Save and exit the file.

The changes go into effect the next time you reboot the system.

If you do end up having problems booting the system, in many current Linux distributions (including the one that comes with this book) your installation disk can be used as an emergency boot disk. Check your documentation for information about the distribution you're using if it's not Red Hat 10.

0 0

Post a comment