I have two partitions. On one I have installed Fedora 9 and on my other partition I just installed Fedora 12. Now that I've installed Fedora 12 I can't get Grub to boot the old partition. How can I configure Grub to boot to my old fedora partition?

Some Notes:

  • My Fedora 9 seems to show up as Linux LVM instead of just Linux in fdisk. I had virtual box installed on that Linux, but it isn't a virtual machine itself.
  • I'm pretty sure Fedora 12 installs grub instead of grub2
  • I can see and mount both partitions from the Fedora 12 live CD if that helps
  • My box is 64 bit.

This is what I get from fdisk -l:

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0005745c

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       64685   519578624   83  Linux
/dev/sda2           65706       65730      200812+  83  Linux
/dev/sda3           65731       91201   204595807+  8e  Linux LVM
/dev/sda4           64686       65705     8193150    5  Extended
/dev/sda5           64686       65705     8192000   82  Linux swap / Solaris

And this is what is currently in my menu.lst:

# 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 (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/sda1
#          initrd /boot/initrd-[generic-]version.img

title Fedora (
    root (hd0,0)
    kernel /boot/vmlinuz- ro root=UUID=876dd1b5-104a-46de-b5fb-08f96d2ce420  LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet mem=8192M
    initrd /boot/initramfs-
title Fedora 9
    rootnoverify (hd0,3)
    chainloader +1

The first fedora in that list is Fedora 12 which boots correctly, the second was just a guess as to where my Fedora 9 install was. When I select that in Grub on boot it goes to a blank screen with a blinking cursor that doesn't respond to the keyboard.

I was able to mount my old FC9 system and in the /boot section I found this under menu.lst if that helps:

title Fedora (
    root (hd0,1)
    kernel /vmlinuz- ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    initrd /initrd-

What do I need to do to boot into my old Fedora?

  • yes! looks like your FC9 was using /dev/sda2 as it's non-LVM /boot partition. good job, both with crafting this question and working with us to find your solution. – quack quixote Feb 10 '10 at 15:38
  • you probably want to change pertition to partition – phunehehe Feb 10 '10 at 16:29
  • @phunehehe: fixed! – quack quixote Feb 10 '10 at 17:10

LVM isn't "Linux Virtual Machine", it's "Logical Volume Manager". If I understand LVM correctly, to boot to a root partition on LVM, you need a separate /boot partition outside of the LVM (was that the small partition on /dev/sda2?). Your system may still have this, but if your FC12 installation overwrote it, recovery will be much more difficult.

Here's a couple of links to Grub vs LVM problems: link 1, link 2

Also see "Mounting a Linux LVM volume" -- you should be able to verify that your old FC9 system is still OK by mounting and examining its root partition while booted into FC12. If so, you can probably recover fairly easily, even if you've overwritten the FC9 /boot partition.

Here's an example Grub boot entry for an LVM system (source). In this case, (hd0,0) (meaning /dev/sda1) is a small /boot partition, and the rest of the system resides on an LVM on /dev/sda2. Note the root= and lvm2root= entries on the kernel line:

title Debian GNU/Linux, kernel 2.6.26 Using LVM with SATA Disk
root (hd0,0)
kernel /vmlinuz-2.6.26 root=/dev/ram0 lvm2root=/dev/mapper/sda_vol-root
initrd /initrd-lvm2-2.6.26.gz

Postmortem: This user ended up with the best-case scenario. The FC12 installation didn't overwrite or reformat FC9's /boot partition, /dev/sda2, and all that was needed was to access FC9's old /boot/grub/menu.lst and copy the boot entries into FC12's Grub menu.

| improve this answer | |
  • I went through the steps to mount my FC9 system and it worked. Everything look in place. Also when I did that a /boot entry showed up under places for /media/_boot Looking in there I can see the grub folder and all the old entries for grub on my last install. I've updated it in the main question so it's more readable. Should I just stick all that info for that Fedora into my new Grub menu? – Robbie Feb 10 '10 at 15:25
  • 1
    @Robbie: great! maybe your FC9 /boot is on the LVM? dunno. anyway, you can just copy the kernels and initrd images from FC9's /boot into FC12's /boot (make sure you give them unique names; don't overwrite anything), then add the boot entries from FC9's Grub menu into FC12's, and you're good to go. make sure you point them to the right root (hdX,Y) to find the kernel & initrd images. – quack quixote Feb 10 '10 at 15:31
  • Yea! I copied everything from the info of that menu.lst into the new grub and I am now speaking to you from the firefox on my old Fedora 9 system. Thanks for all the help! – Robbie Feb 10 '10 at 15:34
title Fedora (
    root (hd0,0)
    kernel /boot/vmlinuz- ro root=UUID=876dd1b5-104a-46de-b5fb-08f96d2ce420  LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet mem=8192M
    initrd /boot/initramfs-
title Fedora 9
    root (hd0,0)
    kernel /boot/vmlinuz- ro root=*****  LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet mem=8192M
    initrd /boot/initramfs-

See where I wrote root=***** ? Either get the UUID for hd0,3 or just write root=/dev/hda3 or /dev/sda3 there. And .. It should be fine, if that's the correct partition.

| improve this answer | |
  • 1
    Does it not matter that it'll be using the kernel specified for Fedora 12? And should root still be (hd0,0) for the Fedora 9 entry? – Robbie Feb 10 '10 at 14:36
  • 1
    it probably shouldn't be using an FC12 kernel to boot FC9. it might work, but lots of things will probably break. – quack quixote Feb 10 '10 at 14:47
  • I tried this and got an error: No root device found [drm:drm_mode_rmfb] *Error* tried to remove a fb that we didn't own Boot has failed, sleeping forever – Robbie Feb 10 '10 at 14:50
  • If I download the RPM for the kernel for 9 and install it, will that cause problems in my Fedora 12 install? rpm.pbone.net/index.php3/stat/4/idpl/13342106/com/… – Robbie Feb 10 '10 at 15:00
  • 1
    don't use RPM or yum to install it while booted into FC12. you might need to extract the files manually though. – quack quixote Feb 10 '10 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.