How do i configure GRUB to actually boot an OS?
I have yet to find any coherent instructions anywhere on earth on this and im wondering if its ever actually been done before.
Assuming i have root partitions on /dev/hda1, /dev/hda2, /dev/hda7 How would i do it? What would i type in the terminal? |
You are unlikely to get coherent answers without coherent requirements.
It's very difficult to boot anything from a terminal. See what I mean ... |
Quote:
No, because Im not interested in booting through a terminal im interested in confiruing grub from the terminal. |
Lyle
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/ Post back once you have done this :) |
Quote:
|
in the terminal type
Code:
cat /boot/grub/grub.cfg 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 1. for the exact menu entry: Code:
GRUB_DEFAULT="{your distro choice here}" 2. for number: Quote:
Code:
update-grub This is about the extent of my knowledge on GRUB2 so I'm glad it was a relatively straightforward problem. Let us know how you get on. |
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.
|
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.
|
If you have an operating system in each of /dev/hda1, /dev/hda2 and /dev/hda7 you can boot them in Grub1 with
Code:
root (hd0,0) Code:
root (hd0,1) Code:
root (hd0,06) Code:
root (hd0,0) Code:
root (hd0,1) Code:
root (hd0,6) With Grub2 the commands are Code:
set root=(hd0,1) Code:
set root=(hd0,2) Code:
set root=(hd0,7) Code:
set root=(hd0,1) Code:
set root=(hd0,2) Code:
set root=(hd0,7) Everything you want to know is inside the Grub manual availabel in GNU/Grub site. |
All times are GMT -5. The time now is 07:11 PM. |