LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   GRUB Loader says drive doesn't exist (https://www.linuxquestions.org/questions/linux-newbie-8/grub-loader-says-drive-doesnt-exist-789155/)

dchester11 02-15-2010 12:31 AM

GRUB Loader says drive doesn't exist
 
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.

Thanks in advance!!

Fred Caro 02-15-2010 03:13 AM

grub + booting
 
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.

Fred.

slightlystoopid 02-15-2010 05:10 AM

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.

yancek 02-15-2010 08:28 AM

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.

dchester11 02-15-2010 11:00 AM

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]#


dchester11 02-15-2010 11:13 AM

I quite brazenly tried to fix this problem myself by using commands I don't fully understand :D. 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]#


dchester11 02-15-2010 02:02 PM

Did I lose everyone?

worm5252 02-15-2010 02:09 PM

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.

dchester11 02-15-2010 04:19 PM

Code:

[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

worm5252 02-15-2010 05:34 PM

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".

Code:

mount /dev/sdb1 /media/sdb

worm5252 02-15-2010 05:36 PM

a quick google indicates that fedora 12 uses ext4 by default.

dchester11 02-15-2010 06:29 PM

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.

worm5252 02-15-2010 08:48 PM

OK here is what i am seeing.

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.
Code:

cp /media/sdb/grub/menu.lst /media/sdb/grub/menu.lst.orig
Next your current menu.lst file is
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=(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.

dchester11 02-17-2010 12:15 AM

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!! :D :D


All times are GMT -5. The time now is 11:33 AM.