Paul Howarth wrote:
As a follow-up to a prior post, here is MY grub.conf file, edited a bit for clarity.Satish Balay wrote:
On Thu, 25 Nov 2004, Paul Howarth wrote:
Satish Balay wrote:
An alternative way to install - where no manual intervention is required is to have a common '/boot' partition for all OSes - this way there is also a common /boot/grub/grub.conf.
So, if you update FC3 kernel - the correct grub.conf is updated. And if you update RHL9 kernel - the correct grub.conf is updated.
Wouldn't this cause problems:
1. because there would have to be two "template" boot entries, one for each
OS, and grubby might have trouble figuring out which one to use?
Nope - the 'root' parameter will be different for each OS. (and different partitions on the disk. Only /boot - a separate patition is common)
Supposing the composite grub.conf looks like this:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda5
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.6.9-1.3_FC2)
root (hd0,0)
kernel /vmlinuz-2.6.9-1.3_FC2 ro root=LABEL=/
initrd /initrd-2.6.9-1.3_FC2.img
title Fedora Core (2.6.8-1.521)
root (hd0,0)
kernel /vmlinuz-2.6.8-1.521 ro root=LABEL=/
initrd /initrd-2.6.8-1.521.img
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/1
initrd /initrd-2.4.20-8.img
So, when a new kernel is to be added, how does grubby know whether to add an entry with "root=LABEL=/" or "root=LABEL=/1"?
Paul.
I have ONE bootloader, in the MBR. Each verson of Linux has it's own /boot partition and it's own root partition. (In the sample below, root is on hda1 (hd0,0) and hda5 (hd0,4). By default, the 2nd installation boots (default=1). If I want the first instance to boot, default would be set to 0. Also, I've commented out "hiddenmenu" which I do not like.
Now, when I install a new kernel for the "first" version of Linux (Wambach), the grub.conf file automatically updates. But, for any other versions I have installed, e.g. Lilly on hd0,4 I need to manually update grub.conf on my hda1 partition.
Again, a bootloader was installed for "Wambach", but when I installed Lilly I selected "no boot loader."
# all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/hda2 # initrd /initrd-version.img #boot=/dev/hda default=1 timeout=15 splashimage=(hd0,0)/grub/splash.xpm.gz #hiddenmenu title Fedora Core -Wambach- (2.6.9-1.678_FC3) root (hd0,0) kernel /vmlinuz-2.6.9-1.678_FC3 ro root=LABEL=/ rhgb quiet initrd /initrd-2.6.9-1.678_FC3.img
title Fedora Core - Lilly - (2.6.9-1.681) root (hd0,4) kernel /vmlinuz-2.6.9-1.681_FC3 ro root=LABEL=/1 rhgb quiet initrd /initrd-2.6.9-1.681_FC3.img