View previous topic :: View next topic |
Author |
Message |
Guest
|
Posted: Sat May 18, 2002 2:00 am Post subject: GRUB pointers |
|
|
Disclaimer: First of all, I must point out that I have yet to install Gentoo to the point that it is a usuable system. Yes, I am a newbie. That being said...
Grub naming conventions for drives and partitions are different from Linux - significantly so.
Linux hda ==> Grub hd0
Linux partition 1 ==> Grub partition 0
Thus, I have...
Code: |
Compaq diagnostics /dev/hda1 (hd0,0)
Windows 98 /dev/hda2 (hd0,1)
Redhat /Boot /dev/hda3 (hd0,2)
Gentoo /Boot /dev/hda4 (hd0,3)
Redhat / /dev/hdc1 (hd2,0)
Linux swap /dev/hdc2 (hd2,1)
Gentoo / /dev/hdc3 (hd2,2)
Win partition for Samba /dev/hdc4 (hd2,3)
|
Grub is loaded on Redhat at the moment because I have yet to have Gentoo functional enough to play on it. So..
Code: |
default=0
timeout=20
splashimage=(hd0,2)/grub/splash.xpm.gz
password --md5 ...
title Gentoo Linux
root (hd0,3)
kernel /bzImage root=/dev/hdc3
title Redhat Linux...
root (hd0,2)
kernel /vmlinuz... ro root=/dev/hdc1
title Win98
rootnoverify (hd0,1)
chainloader +1
title Compaq Utilities
rootnoverify (hd0,0)
chainloader +1
|
Note several things about referencing your /Boot partition.
- Note the splashimage line. Notice that if you swap Redhat /Boot for (hd0,2) you would have the location as it appears once Redhat boots
- Next note that in the kernel statement for Gentoo Linux, I do not reference /Boot. Once again if you swap Gentoo Linux/Boot for (hd0,3) you would have the location of the boot image as it appears once Gentoo Linux boots.
- Finally, the kernel=/dev/hdc3 is a parameter being passed upon boot to the kernel to indicate where the root partition is so that it can find /etc and other directories to be able to find init scripts, &c.
The reason for this is that when /Boot is on its own partition, that partition does not contain a directory called Boot. Once the system is up and running /Boot appears to be a directory, but is in actuality a mount point.
Finally, if I have made any statements in error or presented any information in an ambiguous manner. Please feel free to correct or expound upon my post. |
|
Back to top |
|
|
Egil n00b
Joined: 16 May 2002 Posts: 12 Location: Milwaukee, WI
|
Posted: Sat May 18, 2002 2:08 am Post subject: P.S. I am the author of this post. |
|
|
I missed the fact that I was not logged in when I posted the original message. I am not trying to hide behind an anonymous facade. (*shrug*) |
|
Back to top |
|
|
huw Apprentice
Joined: 13 May 2002 Posts: 220 Location: UK
|
Posted: Sat May 18, 2002 9:59 am Post subject: |
|
|
NOOOOOOOO! NOT AGAIN.
GRUB does not just re-label the IDE bus.
(hd0,0) Is the first partition of the first HDD be it hda1, hdb1...hde1 or anything else.
(hd1,0) is the first partition of the 2nd HDD.
There is a very informative GRUB manual here that explains this http://www.gnu.org/manual/grub-0.90/html_mono/grub.html#SEC6 |
|
Back to top |
|
|
huw Apprentice
Joined: 13 May 2002 Posts: 220 Location: UK
|
Posted: Sat May 18, 2002 10:29 am Post subject: |
|
|
The stuff about referencing your boot partition is a bit abiguous too. Think of each partition on a HDD as a separate disk as that's effectively what they are. In linux you mount a disk, be it floppy, HD, CDROM etc etc, to a directory that exists in a mounted file system.
In the words of
Quote: | The standard form of the mount command, is
mount -t type device dir
This tells the kernel to attach the file system found on
device (which is of type type) at the directory dir. The
previous contents (if any) and owner and mode of dir
become invisible, and as long as this file system remains
mounted, the pathname dir refers to the root of the file
system on device. |
It's as simple as that. The confusion has come as by default /boot is not mounted in gentoo (unlike most other distros) This is a sensible precaution. Once the system is running you don't need it mounted. However if you want to change your kernel bzImage or alter menu.lst - both of which are stored on the boot partition, then you need to mount it with assuming you've editited /etc/fstab correctly. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|