Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
For us to go any further forward we need a bit more information. First of all what type of GRUB are you running is it GRUB legacy or GRUB2 (GRUB 1.98) as this will prove two very different answers.
I can help you with grub legacy, but don't have much experience with grub2 yet (I don't need to). If you do not know which one you have then go to the terminal and type:
Code:
ls /boot/grub/
Now look at the files, if you see a file called menu.lst then you have GRUB legacy, if you see a file called grub.cfg then you are using GRUB2.
For us to go any further forward we need a bit more information. First of all what type of GRUB are you running is it GRUB legacy or GRUB2 (GRUB 1.98) as this will prove two very different answers.
I can help you with grub legacy, but don't have much experience with grub2 yet (I don't need to). If you do not know which one you have then go to the terminal and type:
Code:
ls /boot/grub/
Now look at the files, if you see a file called menu.lst then you have GRUB legacy, if you see a file called grub.cfg then you are using GRUB2.
Post back once you have done this
thanks, i was just about to ask about the lack of a menu.lst. I have none but i do have the grub.cfg so i have GRUB2 it seems.
This will let you see the contents of the file grub.cfg but not edit them. Have a look in the file and find the distro you wish to boot by default it will start with the term menuentry.
Now there are two ways to do this:
1. Note down or copy the exact menu entry file in the inverted comas eg 'Gentoo Linux 2.6.24-r5' or
2. Find the distro you want to load by default, and count the number of lines that start with menuentry from the top to your chosen distro, remember to start the count at 0.
in the terminal, go into super user (su) mode and type:
Code:
nano /etc/default/grub
depending on your chosen method this will differ slightly:
1. for the exact menu entry:
Code:
GRUB_DEFAULT="{your distro choice here}"
(note the inverted comas)
2. for number:
Quote:
GRUB_DEFAULT={number of your chosen distro}
Once you have saved and exited then type:
Code:
update-grub
This should update your menu and the next time you reboot your distro of choice should boot automatically
This is about the extent of my knowledge on GRUB2 so I'm glad it was a relatively straightforward problem.
I am not quite sure but I think I'm looking for the same answer but for legacy (as I have a "menu.lst" showing. I need to adjust the "kernel" line to reflect exactly which kernel it is. I'm installing Gentoo via an Ubuntu live CD and can't think of a way to extrapolate the exact kernel label.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
You can boot into a rescue system, chroot to the installed system, and install grub. That will find every root partition and set the proper parameters in /boot/grub.cfg. If you want to get your hands dirty, you can hit 'e' at the bootup, after the grub menu pops up, and directly edit the entire 'grub.cfg' entry. But the changes won't stick until you edit the grub.cfg templates in '/etc/grub', and run 'update-grub'.
dauphinfay Welcome to Gentoo, yes you do have grub legacy. However we need to know one piece of information before we setup anything: did you setup the kernel manually or did you use the genkernel command? As the grub will be different for the two scenarios.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.