I've beed able to set up two FC3's with a single grub, but what I'd really like to do is set up a second grub and have the first chainload to the second. (I want to play with custom kernels) on the second.
I have two ide's, hda and hdb. My first fc3 is on hda. I tried installing the second fd3 with /boot on hdb1 and / on hdb2. I told anaconda to put the second grub on the mbr and used the advanced bootloader screen to reorder the drives so it would write it to hdb instead of hda.
After installing, I went to my first grub.conf and added
title Second Fedora rootnoveriy (hd1,0) chainloader +1
But when I reboot and select Second Fedora, I get Error 12 invalid or unsupported executable format. What did I do wrong? What's the right way to set this up?
--Cliff
Very sorry, my finger hit "send" too fast and I forgot to type a subject.
I've been able to set up two FC3's with a single grub, but what I'd really like to do is set up a second grub and have the first chainload to the second. (I want to play with custom kernels on the second.)
I have two ide's, hda and hdb. My first fc3 is on hda. I tried installing the second fd3 with /boot on hdb1 and / on hdb2. I told anaconda to put the second grub on the mbr and used the advanced bootloader screen to reorder the drives so it would write it to hdb instead of hda.
After installing, I went to my first grub.conf and added
title Second Fedora rootnoveriy (hd1,0) chainloader +1
But when I reboot and select Second Fedora, I get Error 13 invalid or unsupported executable format. What did I do wrong? What's the right way to set this up?
--Cliff
On Sat, 2005-04-30 at 11:23 -0400, av1@ansae.com wrote:
Very sorry, my finger hit "send" too fast and I forgot to type a subject.
I've been able to set up two FC3's with a single grub, but what I'd really like to do is set up a second grub and have the first chainload to the second. (I want to play with custom kernels on the second.)
I have two ide's, hda and hdb. My first fc3 is on hda. I tried installing the second fd3 with /boot on hdb1 and / on hdb2. I told anaconda to put the second grub on the mbr and used the advanced bootloader screen to reorder the drives so it would write it to hdb instead of hda.
After installing, I went to my first grub.conf and added
title Second Fedora rootnoveriy (hd1,0) chainloader +1
But when I reboot and select Second Fedora, I get Error 13 invalid or unsupported executable format. What did I do wrong? What's the right way to set this up?
--Cliff
Cliff:
You need to have a copy of grub in the /boot directory (or / if you didn't make a new /boot).
assuming grub's hd1,0 is = to hdb1 you'll want to boot into your new FC3 and perform grub-install /dev/hdb1
You now won't be able to get to your old install, so you'll have to boot a rescue cd, chroot into your old install, and perform the grub- install to wherever that bootstrap is (/dev/hda is the MRB and the most usual place).
HTH
Scott
Thanks for the info, Scott. Unfortunately I'm still stuck.
When I installed the second fc3 on /dev/hdb, I did tell the installer to put a grub on the first sector of the root partition on /dev/hdb. (I installed the second fc3 in one partition instead of separate / and /boot partitions.) I booted the first fc3 and temporarily mounted /dev/hdb1 to see what the installer did. It did install grub in /boot/grub on hdb1.
It gets weirder though. I took your suggestion of running grub-install /dev/hdb anyway. (On the theory the installer copied the grub files but did not set up the first sector of hdb.) Now when I boot the machine, and it tries to boot the original grub on the mbr of hda, it goes into an infinite loop printing "GRUB GRUB GRUB GRUB..." across the screen. Looks like I'll need to boot into an emergency Linux from the CD and figure out what went wrong.
Maybe I missed something. Starting from square one, with a clean fc3 on /dev/hda, and an empty, unformatted /dev/hdb, I'd like to do this: install a new, self-contained fc3 with its own grub on /dev/hdb, and chainload from the first grub on hda to the second one on hdb. What's the right way to set up the second fc3 so I can do this?
Thanks for your advice
--Cliff
Scott Talbot writes:
On Sat, 2005-04-30 at 11:23 -0400, av1@ansae.com wrote:
Very sorry, my finger hit "send" too fast and I forgot to type a subject.
I've been able to set up two FC3's with a single grub, but what I'd really like to do is set up a second grub and have the first chainload to the second. (I want to play with custom kernels on the second.)
I have two ide's, hda and hdb. My first fc3 is on hda. I tried installing the second fd3 with /boot on hdb1 and / on hdb2. I told anaconda to put the second grub on the mbr and used the advanced bootloader screen to reorder the drives so it would write it to hdb instead of hda.
After installing, I went to my first grub.conf and added
title Second Fedora rootnoveriy (hd1,0) chainloader +1
But when I reboot and select Second Fedora, I get Error 13 invalid or unsupported executable format. What did I do wrong? What's the right way to set this up?
--Cliff
Cliff:
You need to have a copy of grub in the /boot directory (or / if you didn't make a new /boot).
assuming grub's hd1,0 is = to hdb1 you'll want to boot into your new FC3 and perform grub-install /dev/hdb1
You now won't be able to get to your old install, so you'll have to boot a rescue cd, chroot into your old install, and perform the grub- install to wherever that bootstrap is (/dev/hda is the MRB and the most usual place).
HTH
Scott
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
Scott Talbot writes:
On Sat, 2005-04-30 at 11:23 -0400, av1@ansae.com wrote:
Very sorry, my finger hit "send" too fast and I forgot to type a subject. I've been able to set up two FC3's with a single grub, but what I'd really like to do is set up a second grub and have the first chainload to the second. (I want to play with custom kernels on the second.) I have two ide's, hda and hdb. My first fc3 is on hda. I tried installing the second fd3 with /boot on hdb1 and / on hdb2. I told anaconda to put the second grub on the mbr and used the advanced bootloader screen to reorder the drives so it would write it to hdb instead of hda. After installing, I went to my first grub.conf and added title Second Fedora rootnoveriy (hd1,0) chainloader +1 But when I reboot and select Second Fedora, I get Error 13 invalid or unsupported executable format. What did I do wrong? What's the right way to set this up? --Cliff
Cliff: You need to have a copy of grub in the /boot directory (or / if you didn't make a new /boot). assuming grub's hd1,0 is = to hdb1 you'll want to boot into your new FC3 and perform grub-install /dev/hdb1 You now won't be able to get to your old install, so you'll have to boot a rescue cd, chroot into your old install, and perform the grub- install to wherever that bootstrap is (/dev/hda is the MRB and the most usual place). HTH Scott
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
av1@ansae.com wrote:
Thanks for the info, Scott. Unfortunately I'm still stuck. When I installed the second fc3 on /dev/hdb, I did tell the installer to put a grub on the first sector of the root partition on /dev/hdb. (I installed the second fc3 in one partition instead of separate / and /boot partitions.) I booted the first fc3 and temporarily mounted /dev/hdb1 to see what the installer did. It did install grub in /boot/grub on hdb1.
It gets weirder though. I took your suggestion of running grub-install /dev/hdb anyway. (On the theory the installer copied the grub files but did not set up the first sector of hdb.) Now when I boot the machine, and it tries to boot the original grub on the mbr of hda, it goes into an infinite loop printing "GRUB GRUB GRUB GRUB..." across the screen. Looks like I'll need to boot into an emergency Linux from the CD and figure out what went wrong. Maybe I missed something. Starting from square one, with a clean fc3 on /dev/hda, and an empty, unformatted /dev/hdb, I'd like to do this: install a new, self-contained fc3 with its own grub on /dev/hdb, and chainload from the first grub on hda to the second one on hdb. What's the right way to set up the second fc3 so I can do this? Thanks for your advice --Cliff
Okay, I think I got this: boot into the rescue cd it should find both fc3 installs, choose to run the newer fc3. Follow the screen instructions to chroot into that environment. when you get to the prompt type grub-install /dev/hdb1. Reboot into the rescue cd and select the origional FC3, again following ithe screen chroot into the origional environment ant issue the command grub-install /dev/hda. You should now be able to boot into your origional FC3, and if your grub.cof is good also into your new FC3 too!
I think the problem was that you told grub to install to /dev/hdb instead of hdb1 these are not the same place! A HDD has first a MBR just a couple of sectors for the partition table and startup code, Each partition has it's own PBR for the code the local OS needs to startup (I believe grub stores the stage 2 here, stage 1 goes in the MBR). I am not a complete expert on this area, but I got a pretty good hold on it anyway as I have always at least three distros on my machine 8-)
HTH
Scott
Hello; this is the way I boot XP/FC2/FC4T2. They are all on seperate drives.
My system: hda - WinBlow$ XP hdb - FC2 hdc - DVD burner hdd - FC4T2
Install XP first to hda
Install FC2 to hdb, make sure to create a /boot partition. Remove the labels from the drives and change /etc/fstab to reflect this. (e2label /dev/hdx "" ) Of course XP/swap/extended have no labels.
Then added a small drive for FC4T2, installed to it using its mbr, ignoring all other drives from disk druid. Again it has a /boot partition, and again remove the drive labels Now when I boot I get this grub:
Mount your old (FC2) and copy/paste grub.conf
#Fedora Core 4 test 2 ----------------------------------------------------------------------------------------- #/boot/grub/grub.conf:
snip ... title Fedora Core (2.6.11-1.1276_FC4) root (hd2,0) kernel /vmlinuz-2.6.11-1.1276_FC4 ro root=/dev/hdd3 rhgb initrd /initrd-2.6.11-1.1276_FC4.img
# the below was copy/pasted title WinBlow$ XP rootnoverify (hd0,0) chainloader +1
title FC2 (2.6.12-rc2) root (hd1,0) kernel /vmlinuz-2.6.12-rc2 ro root=/dev/hdb7 rhgb initrd /initrd-2.6.12-rc2.img ----------------------------------------------------------------------------------------- #/boot/grub/device.map
# this device map was generated by anaconda #and then edited by me
(fd0) /dev/fd0 (hd0) /dev/hda (hd1) /dev/hdb (hd2) /dev/hdd ----------------------------------------------------------------------------------------- #fdisk -l
Disk /dev/hda: 163.9 GB, 163928604672 bytes 255 heads, 63 sectors/track, 19929 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/hda1 * 1 5979 48026286 c W95 FAT32 (LBA) /dev/hda2 5980 19929 112053375 f W95 Ext'd (LBA) /dev/hda5 5980 12954 56026656 b W95 FAT32 /dev/hda6 12955 19929 56026656 7 HPFS/NTFS
Disk /dev/hdb: 163.9 GB, 163928604672 bytes 255 heads, 63 sectors/track, 19929 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System /dev/hdb1 * 1 32 257008+ 83 Linux /dev/hdb2 33 12780 102398310 83 Linux /dev/hdb3 12781 14055 10241437+ 83 Linux /dev/hdb4 14056 19929 47182905 f W95 Ext'd (LBA) /dev/hdb5 14056 15099 8385898+ 83 Linux /dev/hdb6 15100 15736 5116671 83 Linux /dev/hdb7 15737 16258 4192933+ 83 Linux /dev/hdb8 16259 16519 2096451 82 Linux swap / Solaris /dev/hdb9 16520 16774 2048256 83 Linux /dev/hdb10 16775 19929 25342506 83 Linux
Disk /dev/hdd: 30.7 GB, 30758289408 bytes 255 heads, 63 sectors/track, 3739 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
#/etc/fstab for FC4T2
Device Boot Start End Blocks Id System /dev/hdd1 * 1 13 104391 83 Linux /dev/hdd2 14 136 987997+ 82 Linux swap / Solaris /dev/hdd3 137 2569 19543072+ 83 Linux /dev/hdd4 2570 3739 9398025 83 Linux # This file is edited by fstab-sync - see 'man fstab-sync' for details /dev/hdd3 / ext3 defaults 1 1 /dev/hdd1 /boot ext3 defaults 1 2 /dev/devpts /dev/pts devpts gid=5,mode=620 0 0 /dev/shm /dev/shm tmpfs defaults 0 0 /dev/hdd4 /mnt/UPDATES ext3 defaults 1 2 /dev/proc /proc proc defaults 0 0 /dev/sys /sys sysfs defaults 0 0 /dev/hdb8 swap swap defaults 0 0 /dev/hdd2 swap swap defaults 0 0 /dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0 /dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
/dev/hdb10 /mnt/music ext3 defaults 0 0
----------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
Fedora Core 2: ----------------------------------------------------------------------------------------- /boot/grub/device.map # this device map was generated by anaconda (fd0) /dev/fd0 (hd0) /dev/hda (hd1) /dev/hdb ----------------------------------------------------------------------------------------- #/etc/fstab for FC2:
/dev/hdb7 / ext3 defaults 1 1 /dev/hdb1 /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 /dev/hdb5 /home ext3 defaults 1 2 /dev/hdb2 /mnt/downloads ext3 defaults 1 2 /dev/hdb10 /mnt/media ext3 defaults 1 2 /dev/hda1 /mnt/vfat-w98 vfat defaults 0 0 /dev/hda5 /mnt/vfat-xp vfat defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 /dev/hdb3 /usr ext3 defaults 1 2 /dev/hdb6 /usr/local ext3 defaults 1 2 /dev/hdb9 /var ext3 defaults 1 2 /dev/hdb8 swap swap defaults 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0 /dev/hda6 /mnt/NTFS ntfs noauto,owner,users,umask=000 0 0 /dev/sda1 /mnt/firewire ext3 noauto,owner,users 0 0 none /proc/bus/usb usbfs defaults,devmode=0666 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 -------------------------------------------------------------- This will probably line-wrap. Hope this helps.
Mick M.
Dogs have Masters - Siamese Cats have Staff!
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Scott, that did the trick. Thank you very much.
After I got it working, I went back to the beginning and reinstalled the second Fedora to make sure I would be able to do it again in the future.
In case anyone else wants to do this, here is a summary of how to install two fc3's with chained bootloaders.
- install the first fc3 on /dev/hda in the usual manner
- install a second fc3 on /dev/hdb like this -- I made a single partition on hdb mounted as "/". (I bet the steps would change a little if you made a separate partition for /boot, but I didn't need to do this.) -- Choose to install grub. It will say it's going on /dev/hda, but don't worry. -- Check advanced bootloader options. -- On the next screen, choose to put grub on the first sector of the root partition (/dev/hdb1), not the mbr. -- Do the rest of the installation on hdb as usual.
-- When you reboot, start the first Fedora on /dev/hda. Edit /boot/grub/grub.conf. Add this stanza
title Second Fedora rootnoverify (hd1,0) chainloader +1
(You could have done this before installing the second Fedora to save a reboot.)
-- Reboot, choose Second Fedora, and you should be in the second grub on hdb.
Scott writes:
Scott Talbot writes:
On Sat, 2005-04-30 at 11:23 -0400, av1@ansae.com wrote:
Very sorry, my finger hit "send" too fast and I forgot to type a subject. I've been able to set up two FC3's with a single grub, but what I'd really like to do is set up a second grub and have the first chainload to the second. (I want to play with custom kernels on the second.) I have two ide's, hda and hdb. My first fc3 is on hda. I tried installing the second fd3 with /boot on hdb1 and / on hdb2. I told anaconda to put the second grub on the mbr and used the advanced bootloader screen to reorder the drives so it would write it to hdb instead of hda. After installing, I went to my first grub.conf and added title Second Fedora rootnoveriy (hd1,0) chainloader +1 But when I reboot and select Second Fedora, I get Error 13 invalid or unsupported executable format. What did I do wrong? What's the right way to set this up? --Cliff
Cliff: You need to have a copy of grub in the /boot directory (or / if you didn't make a new /boot). assuming grub's hd1,0 is = to hdb1 you'll want to boot into your new FC3 and perform grub-install /dev/hdb1 You now won't be able to get to your old install, so you'll have to boot a rescue cd, chroot into your old install, and perform the grub- install to wherever that bootstrap is (/dev/hda is the MRB and the most usual place). HTH Scott
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
av1@ansae.com wrote:
Thanks for the info, Scott. Unfortunately I'm still stuck. When I installed the second fc3 on /dev/hdb, I did tell the installer to put a grub on the first sector of the root partition on /dev/hdb. (I installed the second fc3 in one partition instead of separate / and /boot partitions.) I booted the first fc3 and temporarily mounted /dev/hdb1 to see what the installer did. It did install grub in /boot/grub on hdb1.
It gets weirder though. I took your suggestion of running grub-install /dev/hdb anyway. (On the theory the installer copied the grub files but did not set up the first sector of hdb.) Now when I boot the machine, and it tries to boot the original grub on the mbr of hda, it goes into an infinite loop printing "GRUB GRUB GRUB GRUB..." across the screen. Looks like I'll need to boot into an emergency Linux from the CD and figure out what went wrong. Maybe I missed something. Starting from square one, with a clean fc3 on /dev/hda, and an empty, unformatted /dev/hdb, I'd like to do this: install a new, self-contained fc3 with its own grub on /dev/hdb, and chainload from the first grub on hda to the second one on hdb. What's the right way to set up the second fc3 so I can do this? Thanks for your advice --Cliff
Okay, I think I got this: boot into the rescue cd it should find bothfc3 installs, choose to run the newer fc3. Follow the screen instructions to chroot into that environment. when you get to the prompt type grub-install /dev/hdb1. Reboot into the rescue cd and select the origional FC3, again following ithe screen chroot into the origional environment ant issue the command grub-install /dev/hda. You should now be able to boot into your origional FC3, and if your grub.cof is good also into your new FC3 too!
I think the problem was that you told grub to install to /dev/hdb instead of hdb1 these are not the same place! A HDD has first a MBR just a couple of sectors for the partition table and startup code, Each partition has it's own PBR for the code the local OS needs to startup (I believe grub stores the stage 2 here, stage 1 goes in the MBR). I am not a complete expert on this area, but I got a pretty good hold on it anyway as I have always at least three distros on my machine 8-)
HTH
Scott
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
Notice both are putting grub in the MBR. No reason why you can't boot both from one grub screen. Setting it up would be tricky, as you would have to specify (hd1) as having the kernels for the second hard drive. It's doable, though.