Jump to content
  • Advertisement
Sign in to follow this  
tstrimp

Grub Question

This topic is 4889 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
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 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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!