Grub Question

Started by
5 comments, last by tstrimp 18 years, 10 months ago
Is it possible to set up the boot loader to load either a gui or a console? Would that require 2 separate installs of linux (FC3 in this case)? Baring that what would be the easiest way to switch from the straight console system to loading KDE and vice versa.
Advertisement
Are you referring to a splash screen during boot? If so, bootsplash.org explains it fairly well.

If you mean loading directly into a gui prompt vs. a console prompt, that has to do with run levels. I'm not sure if you can set it through grub, but on Debian based distros, you can change this through /etc/inittab. To see which programs start/stop during each run level, see /etc/rc#.d/. 'S' prefix for start, 'K' for kill.

Fedora is based on Red Hat, so this might clear things up.
Quote:Original post by Arkainium
If you mean loading directly into a gui prompt vs. a console prompt, that has to do with run levels. I'm not sure if you can set it through grub, but on Debian based distros, you can change this through /etc/inittab. To see which programs start/stop during each run level, see /etc/rc#.d/. 'S' prefix for start, 'K' for kill.


Thats exactly what I'm looking for. I already know about changing the run level. I'd much rather have a boot option then have to deal with editing a file everytime I want to switch. I could write a script to change it for me but I'd still rather take care of it at the boot level. I'll keep looking.

You can pass a parameter to the kernel to say which runlevel to start up in. You could modify your grub config to have two options that would then start in different run levels for gui and console. For example just add the numbers of the runlevels you want to the end of you kernel line in your grub.conf:

title=Linux (Graphical)
root (hd0,1)
kernel (hd0,1)/kernel-2.6.8.1 root=/dev/sda5 video=vesafb:ywrap,mtrr vga=0x317 5
initrd (hd0,1)/initrd-1024x768

title=Linux (Console)
root (hd0,1)
kernel (hd0,1)/kernel-2.6.8.1 root=/dev/sda5 video=vesafb:ywrap,mtrr vga=0x317 3
initrd (hd0,1)/initrd-1024x768

Erm, that was me posting as the AP above BTW, for some reason I wasn't logged in.
title=Linux (Graphical)root (hd0,1)kernel (hd0,1)/kernel-2.6.8.1 root=/dev/sda5 video=vesafb:ywrap,mtrr vga=0x317 5initrd (hd0,1)/initrd-1024x768title=Linux (Console)root (hd0,1)kernel (hd0,1)/kernel-2.6.8.1 root=/dev/sda5 video=vesafb:ywrap,mtrr vga=0x317 3initrd (hd0,1)/initrd-1024x768

Yeah, just append the runlevel to the 'kernel' arguments.

Runlevel 0: Halt System - To shutdown the system
Runlevel 1: Single user mode
Runlevel 2: Basic multi user mode without NFS
Runlevel 3: Full multi user mode (text based)
Runlevel 4: unused
Runlevel 5: Multi user mode with Graphical User Interface
Runlevel 6: Reboot System

The behaviours of 1, 2 and 4 vary from distribution to distribution but 3 and 5 are usually solid.
Sorry for the necromancy, but thanks alot guys that was exactly what I needed. Now I just need to write something that will automagicaly add a gui/cli entry whenever yum updates the kernel.

This topic is closed to new replies.

Advertisement