LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
LinkBack Search this Thread
Old 02-15-2010, 12:31 AM   #1
dchester11
LQ Newbie
 
Registered: Feb 2010
Posts: 21

Rep: Reputation: 0
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!!
 
Old 02-15-2010, 03:13 AM   #2
Fred Caro
Member
 
Registered: May 2007
Posts: 645

Rep: Reputation: 56
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.
 
Old 02-15-2010, 05:10 AM   #3
slightlystoopid
Member
 
Registered: Jan 2010
Distribution: Arch, Gentoo, FreeBSD
Posts: 64

Rep: Reputation: 16
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.
 
Old 02-15-2010, 08:28 AM   #4
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,134

Rep: Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621Reputation: 621
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.
 
Old 02-15-2010, 11:00 AM   #5
dchester11
LQ Newbie
 
Registered: Feb 2010
Posts: 21

Original Poster
Rep: Reputation: 0
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]#
 
Old 02-15-2010, 11:13 AM   #6
dchester11
LQ Newbie
 
Registered: Feb 2010
Posts: 21

Original Poster
Rep: Reputation: 0
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]#
 
Old 02-15-2010, 02:02 PM   #7
dchester11
LQ Newbie
 
Registered: Feb 2010
Posts: 21

Original Poster
Rep: Reputation: 0
Did I lose everyone?
 
Old 02-15-2010, 02:09 PM   #8
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX
Posts: 565

Rep: Reputation: 57
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.
 
Old 02-15-2010, 04:19 PM   #9
dchester11
LQ Newbie
 
Registered: Feb 2010
Posts: 21

Original Poster
Rep: Reputation: 0
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
 
Old 02-15-2010, 05:34 PM   #10
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX
Posts: 565

Rep: Reputation: 57
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
 
Old 02-15-2010, 05:36 PM   #11
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX
Posts: 565

Rep: Reputation: 57
a quick google indicates that fedora 12 uses ext4 by default.
 
Old 02-15-2010, 06:29 PM   #12
dchester11
LQ Newbie
 
Registered: Feb 2010
Posts: 21

Original Poster
Rep: Reputation: 0
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
 
Old 02-15-2010, 08:48 PM   #13
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX
Posts: 565

Rep: Reputation: 57
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.
 
Old 02-17-2010, 12:15 AM   #14
dchester11
LQ Newbie
 
Registered: Feb 2010
Posts: 21

Original Poster
Rep: Reputation: 0
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!!
 
  


Reply

Tags
grub


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatted my linux drive in a dual boot setup, now the GRUB loader hangs the system.. Dr_Horse Linux - General 4 12-04-2008 03:50 PM
How to change my Grub Loader to Lilo loader in REDHAT LINUX 9.0 skumar.v Linux - Newbie 3 04-04-2008 10:38 AM
grub boot loader with external SATA hard drive james2b Linux - Newbie 1 03-24-2008 05:27 AM
RH9 Software Raid 1 hard drive failure - GRUB loader errors Mynar Linux - Newbie 1 01-28-2004 10:25 AM


All times are GMT -5. The time now is 11:52 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration