Changing run levels in the bootloader
I'm using GRUB as my bootloader and I want to add a new item to the menu to allow me to boot into the console and not load X. My grub.conf file shows:
Quote:
Additionally, is there a way when I'm in KDE or X11 to shut it down and change to runlevel 3 without rebooting? Thanks!, Jon |
not sure of anyway to specify different runlevels from a list like that but you can usually specify what runlevel you want to startup in at the lilo/grub prompt.
and you can use the command init 3 to get to runlevel 3. |
First off. To boot into a specific runlevel, edit the /etc/inittab file. You'll see a line similar to this:
--------------------------------- # 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) id:5:initdefault: ----------------------------------- Just change 5 to whatever you want to boot into. In your case 3. -------- Now for the second question. IF you have booted into runlevel 5 Log out of KDE, switch to a consolde by using cntl - alt - f1, log in as root and then type init 3. This will change your runlevels to just console mode. |
When I log out of KDE and switch run levels, what happens to the xserver? Does it shut down or does it stay running?
|
when you enter runlevel 3 it shouldn't start X, so it should end the process.
|
You would add init=3 to the kernel line. Like this:
title Red Hat Linux (2.4.9-31) Runlevel3 root (hd2,0) kernel /boot/vmlinuz-2.4.9-31 ro root=/dev/hdd1 hdc=ide-scsi init=3 initrd /boot/initrd-2.4.9-31.img These four lines would be added to your grub.conf file. |
All times are GMT -5. The time now is 09:51 PM. |