Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey all,
If at all possible I would like ot keep the GRUB loader and repair my situation. My slave drive has Windows 7. My master had Ubuntu on it. When it installed it added the GRUB loader. I replaced it with Fedora, but now the GRUB loader says it can't find the drive and bails to grub-rescue. If possible I would like to keep the grub loader. If I can't repair this, is there a way to uninstall it and reinstall it.
Which version of Ubuntu did you load after fedora? If 9.10 then it uses an experimental version of grub2 which is different to the original. Fedora still uses grub. To get the 2 to coexist will take some tweaking, none of which seems reliable so take your choice.
during the fedora install, did you install grub to the mbr? if not, and you're still using the ubuntu's grub (it'll read 1.97), you'll need to reinstall fedora's to the mbr with grub-install. if you are using fedora's (0.97), then verify that your menu.lst is accurate.
Did your dual-boot with win 7 and Ubuntu work?
Did you install Fedora to the same partition on the same drive you previously had Ubuntu on?
Do you know where you installed the bootloader with Fedora? master boot record? root partition? which drive?
Posting your partition information would be helpful. Are you able to boot anything now? If not do you still have your Fedora CD/DVD? if you do, load it and open a terminal as root and use command: fdisk -l (lower case Letter L) to get partition information to post.
Well I've been trying some of these suggestions this morning without much luck. Let me answer some of the questions
Fred - I did have Ubuntu 9.10 running.
Quote:
during the fedora install, did you install grub to the mbr? if not, and you're still using the ubuntu's grub (it'll read 1.97), you'll need to reinstall fedora's to the mbr with grub-install. if you are using fedora's (0.97), then verify that your menu.lst is accurate.
I installed the fedora loader to wherever the default is from the live disc. I don't see when grub loads where it says .97 or 1.97. It just says grub loading. Where would I run 'grub-install' from? And I don't think I can get to the menu.lst because everytime I boot from that drive I get stopped with the grub load failure.
Quote:
Did your dual-boot with win 7 and Ubuntu work?
Did you install Fedora to the same partition on the same drive you previously had Ubuntu on?
Do you know where you installed the bootloader with Fedora? master boot record? root partition? which drive?
Posting your partition information would be helpful. Are you able to boot anything now? If not do you still have your Fedora CD/DVD? if you do, load it and open a terminal as root and use command: fdisk -l (lower case Letter L) to get partition information to post.
My dual boot works for the Windows install still if I boot directly to that drive. I installed Fedora and its boot loader on the same drive I had Ubuntu but I'm not sure about the exact partitioning. I can boot the Windows drive. This is from running fdisk -l from the Fedora LiveCD
Code:
[root@localhost liveuser]# fdisk -l
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0c14e372
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 13 30402 244093952 7 HPFS/NTFS
Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x49589704
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2 26 9729 77943361 8e Linux LVM
Disk /dev/dm-0: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-0 doesn't contain a valid partition table
Disk /dev/dm-1: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-1 doesn't contain a valid partition table
Disk /dev/dm-2: 75.6 GB, 75585552384 bytes
255 heads, 63 sectors/track, 9189 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-2 doesn't contain a valid partition table
Disk /dev/dm-3: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/dm-3 doesn't contain a valid partition table
[root@localhost liveuser]#
I quite brazenly tried to fix this problem myself by using commands I don't fully understand . Here's my results from trying to reinstall GRUB.
Code:
[root@localhost liveuser]# grub-install /dev/sdb
Probing devices to guess BIOS drives. This may take a long time.
The file /boot/grub/stage1 not read correctly.
[root@localhost liveuser]#
have you tried to boot the live cd, and mount /dev/sdb1 to a folder? If you do that you should be able to look at /folder/dev/sdb1/is/mounted/on/boot/grub/menu.lst and see what is going on.
Code:
mkdir /media/sdb
mount -t ext3 /dev/sdb1 /media/sdb
cd /media/sdb/boot/grub
more menu.lst
I have not tested the above code so I am not 100% sure I got it all right but looks ok to me.
[root@localhost home]# mount -t ext3 /dev/sdb1 /Media/sdb
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
I was able to make the diretory ok but the mount seems to have failed
yes it is the "-t ext3" part that is causing it to error. ext3 was a guess as to your filesystem type. it could be ext2 or ext4, ReiserFS, there are a number of options. Try mounting the drive without the "-t ext3".
It worked wihout the -t option. Here the contents. Thanks you very much. I'm looking over the GRUB documentation to see if I can figure out how this should be configured but its pretty dense
Code:
[root@localhost grub]# more menu.lst
# 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/mapper/VolGroup-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.31.5-127.fc12.i686)
root (hd0,0)
kernel /vmlinuz-2.6.31.5-127.fc12.i686 ro root=/dev/mapper/VolGroup-lv_r
oot noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=
us rhgb quiet
initrd /initramfs-2.6.31.5-127.fc12.i686.img
title Other
rootnoverify (hd1,0)
chainloader +1
[root@localhost grub]#
Also, I did not have a .../boot/grub, just .../grub. I followed the default installation and that's what it set me up with. I don't know if that is an issue or not.
Last edited by dchester11; 02-15-2010 at 06:32 PM.
Reason: extra info
according to your output of fdisk -l, Windows 7 is on /dev/sda (The Primary Drive), and Fedora is on /dev/sdb (The Secondary Drive). According to your grub boot list you have Fedora listed on drive 1 and Windows on drive 2. This should be a quick config change to the menu.lst file to get you sorted out.
Before we do anything lets make a backup copy of the menu.lst file so we save the current configuration.
# 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/mapper/VolGroup-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.31.5-127.fc12.i686)
root (hd0,0)
kernel /vmlinuz-2.6.31.5-127.fc12.i686 ro root=/dev/mapper/VolGroup-lv_r
oot noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=
us rhgb quiet
initrd /initramfs-2.6.31.5-127.fc12.i686.img
title Other
rootnoverify (hd1,0)
chainloader +1
Lets change the menu.lst file to reflect the current drive mappings
Code:
# 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/mapper/VolGroup-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.31.5-127.fc12.i686)
root (hd1,0)
kernel /vmlinuz-2.6.31.5-127.fc12.i686 ro root=/dev/mapper/VolGroup-lv_r
oot noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=
us rhgb quiet
initrd /initramfs-2.6.31.5-127.fc12.i686.img
title Other
rootnoverify (hd0,0)
chainloader +1
Save the menu.lst and reboot. With any luck it should boot.
Well that didn't quite work but it pointed me in the right direction. Turns out the GRUB loader from Ubuntu was on /dev/sda1. The one on /dev/sdb1 was the one Fedora installed and was working fine. I just swapped the boot order of the disks and Fedora's GRUB install runs great. Thank you for helping out!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.