A look at System V initialization
Under SuSE to modify script runlevels, the program used is rctab. Use "rctab -l" to see the services and the runlevels they are active on. Use "rctab -e" to edit the runlevels. This will bring up the vi editor and a table of your list of services and the runlevels they are active in. To remove a service from a runlevel, delete the name and put in a "-" there instead. To add a service do the opposite but make sure that the service is started at the correct point.
Switching Runlevels
There will be times when you might want to boot into a different runlevel. There are several ways in which you can do this. You can do this at boot or off the command-line.
First, let's look at /etc/inittab, the configuration file read by init. Open it in any text editor and look for a line like the one below. It should be somewhere near the top of the file if not at the very top.
id:3:initdefault
This line defines the default runlevel that Linux should boot into. Here, the runlevel is set to 3, which is the console mode with network in Red Hat. If you want to start up in the GUI, you should set this to say 5. Save the file and reboot. The next time you boot, you will find yourself at the GUI.
You can also do the same at the LILO prompt. Sometimes, when the GUI is not working properly, you would want to boot into the console and make the changes before starting X. Enter the following at the LILO prompt. Or, check the list of runlevels in /etc/inittab and use the runlevel for the console.
LILO: linux 3
The format is, image name followed by the runlevel to boot into. To boot into single user mode you could just say "linux single".
At the command line, you can use the telinit to change runlevels. You will need to be root to use this. Let's say you are in runlevel 3 and want to switch to the GUI on runlevel 5, use the following command to switch.
telinit 5
This was a brief look at runlevels and the System V style of booting that most Linux distributions use these days. This article was aimed at the newbies and we certainly hope we cleared up a few doubts. As always, feel free to send us a mail in case of any problems.
- « first
- ‹ previous
- of 4