HOWTO create a run level
From Gentoo Linux Wiki
| Installation • Kernel & Hardware • Networks • Portage • Software • System • X Server • Gaming • Non-x86 • Emulators • Misc |
Contents |
[edit] Introduction
This Howto will explain how you can make additional runlevels. Runlevels can be very handy if you (for example) want to make seperate runlevels for a graphical, and text-mode boot.
[edit] Creating the Run Level
Creating a new run level is as simple as creating a new directory in /etc/runlevels/. For example, to create a new runlevel "example":
cd /etc/runlevels mkdir <new-runlevel-name>
To add services to this new runlevel, you can use rc-update, for example, to add service "example_service" to runlevel "example"
rc-update add example_service example
[edit] Using the new run level
[edit] At boot time
To specify a runlevel other than the default upon boot, append softlevel=your_runlevel_name to your kernel's options.
[edit] Example grub.conf
| File: /boot/grub/grub.conf |
title=Gentoo Linux - New Runlevel root (hd0,0) kernel /boot/bzImage-2.6.8-r7 root=/dev/hda3 softlevel=new-runlevel |
[edit] After boot
To switch to runlevel "example":
rc example
To return to default runlevel:
rc default
