PDA

View Full Version : GRUB Multi boot FC5 & FC6


cplutis
21st January 2007, 09:16 PM
I have been using FC5 x86_64 for almost a year and today I decided to see how FC6 is. I made a clean install on another partition because I did not want to alter FC5 that was working well. During the install I chose not to install a new bootloader(because there was no update option) thinking that I will simply alter the configuration file from FC5.
Naturally, after the installation was completed I could not boot FC6, but none of the changes I made to grub.conf changed this situation.
However my curiosity pushed me to install FC6 all over again just to have its GRUB installed (because the update didn't do anything to the existing bootloader as there was nothing to update to the freshly installed OS), and now "surprisingly" I can't boot FC5.
I altered the grub.conf once again in all the ways I knew but all was in vain. I even tried to use two GRUBs (one on the MBR of the first HDD and one on the partition with FC5) to boot but unfortunately I could only copy the same boot loader in both places.

My grub.conf (in FC6 partition) looks like this:
default=2
timeout=5
splashimage=(hd1,2)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core 6 (2.6.19-1.2895.fc6)
root (hd1,2)
kernel /boot/vmlinuz-2.6.19-1.2895.fc6 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.19-1.2895.fc6.img
title Fedora Core 6 (2.6.18-1.2798.fc6)
root (hd1,2)
kernel /boot/vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.18-1.2798.fc6.img
title WinXp
rootnoverify (hd0,0)
chainloader +1
title WinVista (weewee)
rootnoverify (hd1,0)
chainloader +1
title Fedora Core 5 (2.6.16-1.2122_FC5)
root (hd0,2)
kernel /boot/vmlinuz-2.6.16-1.2122_FC5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.16-1.2122_FC5.img
boot
title Fedora Core 5 (2.6.15-1.2054_FC5)
root (hd0,2)
kernel /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.15-1.2054_FC5.img
boot


Only the last two options don't work. Here is the message I receive:
" Booting 'Fedora Core 5 (2.6.15-1.2054_FC5)'
root (hd0,2)
Filesystem type unknown, partition type 0x93
kernel /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=LABEL=/ rhgb quiet
Error 17 Cannot mount selected partition

Press any key to continue..."
I can mount FC5's partition so I think there is no problem with that. If I just could put the FC5 GRUB on (hd0,2) 'with grub-install' there would be no problem, but whenever I type 'grub' in the terminal - even in rescue mode - the FC6 grub appears.

I would appreciate it if someone could enlighten me so that I'll know what to change in grub.conf in order to boot FC5.

Thank you

bob
21st January 2007, 10:10 PM
I think it's as simple as the way you've typed the FC-5 info. Unlike FC-6, in FC-5 and previous versions 'all kernel and initrd paths are relative to /boot/' . So that means that typing /boot/vmlinuz... or /boot/initrd really is telling the computer '/boot/boot/vmlinuz... or /boot/boot/initrd.

Here's my very old FC-5 grub.conf that I saved on paper:

title Fedora Core (2.6.15-1.2054_FC5)
root (hd0,0) .... (substitute your config)
kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/VolGroup00/LogVol100 rhgb quiet ... (mine had LVM)
initrd /initrd-2.6.15-1.2054_FC5.img

cplutis
21st January 2007, 10:26 PM

My mistake, I had not included the opening comment in 'grub.conf' as I thought "everybody imagines what is written there":
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd1,2)
# kernel /boot/vmlinuz-version ro root=/dev/sdb3
# initrd /boot/initrd-version.img
#boot=/dev/sda
Luckily, I remembered that I was writing 'boot/' in FC5's 'grub.conf' otherwise I would have made the change and got disappointed one more time.

cplutis
23rd January 2007, 09:26 AM
Sorry for the misunderstanding of the previous post. The problem is still unsolved :) so I would be happy to hear other ideas.

bob
23rd January 2007, 01:13 PM
Cplutis, try this:

title Fedora Core 5 (2.6.16-1.2122_FC5)
root (hd0,2)
kernel /vmlinuz-2.6.16-1.2122_FC5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.16-1.2122_FC5.img
boot
title Fedora Core 5 (2.6.15-1.2054_FC5)
root (hd0,2)
kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.15-1.2054_FC5.img
boot

cplutis
23rd January 2007, 03:31 PM
The change did not convince GRUB to mount the partition.
It showed me the same error message except the kernel line which now reads:

kernel /vmlinuz-2.6.15-1.2054_FC5 ro root =LABEL=/ rhgb quiet

bob
23rd January 2007, 03:43 PM
Hmmm... Since you had FC-5 on another hard drive to start out with, try going into the BIOS and changing the boot order of your drives. Is your old grub still there once you boot hda? If so, will that boot FC-5 correctly?

If that's the case, try adding this to your existing grub.conf:

title FC-5
rootnoverify (hd0)
chainloader +1

cplutis
23rd January 2007, 07:24 PM
When I installed FC6 it had no option to update the boot loader, it could only install a new boot loader or leave everything unchanged. I chose the second option and tried to change grub.conf but I couldn't boot the new OS no matter what I did. So I reinstalled FC6 again and overwritten the old GRUB (on the MBR, I've always used the MBR for the bootloader) just to see how FC6 looks like.
The new GRUB cannot recognize the filesystem format of the FC5 partition just like the old GRUB could not recognize the format of FC6.
I have put a GRUB on the first sector of the FC5 partition with 'install-grub' but unfortunately it is the same GRUB of the FC6 so that one won't boot FC5 either after chainloading it from the MBR. I think that if I could re-create the old GRUB having its 'conf' file and put it on the first sector of the partition I would be able to boot FC5. However regardless of the rescue mode that I use (on FC5 dvd or FC6 dvd) the only GRUB it finds is the one in the MBR that won't mount the FC5 partition.

bob
23rd January 2007, 07:52 PM
I understand what your current problem is and I'm sorry that my suggestions haven't worked so far. What I thought you might have done was to add another hard drive to install FC-6 and that Windows and FC-5 were installed on the first hard drive. If that had been the case, there would be a MBR on that hard drive that would still contain the grub boot menu for FC-5. That's why I suggested you change the boot order in your BIOS to boot that Windows/FC-5 drive and see if it still works.

But, while you didn't mention it, I guess that idea didn't work.

How about posting your 'fdisk -l' so that we can see your current setup for both drives.

cplutis
23rd January 2007, 08:50 PM
Thank you very much for you help and patience. The disk configuration you've described is pretty close to reality except the fact that the FC5 GRUB is not on hd0's MBR any more since I overwritten it with FC6's GRUB (and that Win Vista is on hd1 but that is not the problem).
However I can mount FC5's partition and still see its grub.conf but I don't know how to "create" GRUB and store it somewhere (e.g. on the first sector of sda3)

Here is the fdisk -l you told me about:

Disk /dev/sda: 200.0 GB, 200048565760 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3823 30708216 7 HPFS/NTFS ->WinXp
/dev/sda2 3824 22281 148263885 7 HPFS/NTFS -> nothing
/dev/sda3 22282 24129 14844060 93 Amoeba -> FC5
/dev/sda4 24130 24321 1542240 82 Linux swap / Solaris

Disk /dev/sdb: 200.0 GB, 200048565760 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 7650 61447601 7 HPFS/NTFS ->Win Vista
/dev/sdb2 7651 15300 61448625 7 HPFS/NTFS ->nothing
/dev/sdb3 15301 19762 35841015 83 Linux -> FC6

bob
23rd January 2007, 09:20 PM
Give this a try: http://users.bigpond.net.au/hermanzone/p15.htm#Operating_System_Entries_for_Multiple_Boot ing_More_Linux_Systems

Scroll down to the Configfile Boot Entry and substitute the FC-5 info for what's posted there.

Firewing1
23rd January 2007, 10:18 PM
Thank you very much for you help and patience. The disk configuration you've described is pretty close to reality except the fact that the FC5 GRUB is not on hd0's MBR any more since I overwritten it with FC6's GRUB (and that Win Vista is on hd1 but that is not the problem).
However I can mount FC5's partition and still see its grub.conf but I don't know how to "create" GRUB and store it somewhere (e.g. on the first sector of sda3)

Here is the fdisk -l you told me about:

Disk /dev/sda: 200.0 GB, 200048565760 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3823 30708216 7 HPFS/NTFS ->WinXp
/dev/sda2 3824 22281 148263885 7 HPFS/NTFS -> nothing
/dev/sda3 22282 24129 14844060 93 Amoeba -> FC5
/dev/sda4 24130 24321 1542240 82 Linux swap / Solaris

Disk /dev/sdb: 200.0 GB, 200048565760 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 7650 61447601 7 HPFS/NTFS ->Win Vista
/dev/sdb2 7651 15300 61448625 7 HPFS/NTFS ->nothing
/dev/sdb3 15301 19762 35841015 83 Linux -> FC6
Check out my Grub howto (http://www.fedoraforum.org/forum/showthread.php?t=145424) - I'm betting you have to re-map your (hd0) to /dev/sdb and then re-install GRUB as shown on the page.
Firewing1

cplutis
23rd January 2007, 10:36 PM
Give this a try: http://users.bigpond.net.au/hermanzone/p15.htm#Operating_System_Entries_for_Multiple_Boot ing_More_Linux_Systems

Scroll down to the Configfile Boot Entry and substitute the FC-5 info for what's posted there.
I've added 5 or 6 entries like resembling those in the page you kindly provided me with.GRUB returned the same message.

title FC5 /vmlinuz root=/dev/sda3
root (hd0,3)
kernel /vmlinuz root=/dev/sda3 ro quiet splash
initrd /initrd.img
boot
title FC5 /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/sda3
root (hd0,3)
kernel /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/sda3 rhgb quiet
initrd /boot/initrd-2.6.15-1.2054_FC5.img
boot
title FC5 configfile (hd0,3)/boot/grub/menu.lst
configfile (hd0,3)/boot/grub/menu.lst

It occurred to me that something (it wasn't me, honestly!) changed the type of the filesystem on the partition containing FC5 from ext3 (id=83) to amoeba (id=93). So I agree with GRUB when it refuses to mount such a partition and I think that if I change the type of the partition back to (83) GRUB will no longer complain. So if someone could tell me how to do that(if that's possible) I would appreciate it a lot.

cplutis
24th January 2007, 09:48 AM
Thank you very much bob and Firewing1 for your help. Finally GRUB boots FC5 :)

Here's the story:
I used fdisk to change the partition type back to linux (83):
fdisk /dev/sda
> t (to change the type)
> 3 (to specify the partition id- sda3)
> 83 (to specify the system id of the partition)
> w (to write changes to FAT)
As for the cause of the filesystem id change I think it was me after all...When I reinstalled FC6 the second time I deleted the old partition of "FC6" during installation but now I realize I might just have deleted FC5's. The delete probably writes some sign (*) in the partition table that might have changed the partition type to some random thing (Amoeba).