LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 07-14-2007, 09:30 PM   #1
gabeyg
LQ Newbie
 
Registered: Jul 2007
Posts: 28

Rep: Reputation: 15
Exclamation Emergency.. Lost Grub's controls of Fedora 7!


I recently re-installed Fedora 7 because of GRUB issues. Since then, (please do not recommend me bootpart..., since I tested it and it didn't work.) I installed using Linux expert, check the cd condition, and installed the Fedora 7 in Graphic install mode. My hard disk currently is /dev/sda1 (Primary, XP)
/dev/sdb1 (Linux boot file) (root=/boot)
/dev/sdb2 (Linux main, LVM)(root=/)
And, /dev/sdb is 1TB USB drive. When the option came to me about installing GRUB, I made it to "Boot installation from /dev/sdb" and when the option came to me about installing GRUB to MBR, there was only one option, installing to /dev/sda, but although I clicked that, I also clicked "Configure the boot option", which allowed me to install GRUB to /dev/sdb's MBR by switching HDD order. Then, I installed normally. (I also changed BIOS boot settings, by the way, too...) When I rebooted, "Operating System Not Found" was shown. When I booted from Fedora Live CD, it seems ok about grub.conf.
File of menu.lst and grub.conf

# 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/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sdb
default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.20-2925.9.fc7xen)
root (hd0,0)
kernel /xen.gz-2.6.20-2925.9.fc7
module /vmlinuz-2.6.20-2925.9.fc7xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.20-2925.9.fc7xen.img
title Fedora-base (2.6.21-1.3194.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
title Other
rootnoverify (hd1,0)
chainloader +1


This is fdisk -l

Disk /dev/sda: 52.1 GB, 52108145664 bytes
255 heads, 63 sectors/track, 6335 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5702 45801283+ 7 HPFS/NTFS
/dev/sda2 5703 6335 5084572+ 77 Unknown

Disk /dev/sdb: 1000.2 GB, 1000207286272 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 121601 976655610 8e Linux LVM

And...
More is that...
when I clicked to /dev/sdb2's /etc/grub.conf, it showed me in Live CD error of
"This file can not be opened because of broken link of /dev/sdb2's /boot/grub/grub.conf." Also, I found that although the /dev/sdb1 (root=/boot) exists, sdb2 (root=/)'s boot folder (/boot of /dev/sdb2, not /dev/sdb1) is empty.

/dev/sdb1 (root=/boot)'s /grub/device.map

# this device map was generated by anaconda
(hd1) /dev/sda
(hd0) /dev/sdb

file of /etc/fstab

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0


This is really questionable: I mounted Fedora 7's files (/dev/sdb1 was automatically mounted to 'computer', but /dev/sdb2 wasn't mounted since it is LVM, so I mounted manually to Live Cd's filesystem /fedora7.) when try to open (/fedora7)/etc/grub.conf, it shows me error of "The file can not be opened because it is broken link to (/fedora7)/boot/grub.conf." Also, /dev/sdb2's boot folder is empty, which should been synchronized with /dev/sdb1 (root=/boot) .
Thanks.
Please help me...
Thanks.
 
Old 07-15-2007, 03:24 AM   #2
dinolinux
Member
 
Registered: Jun 2005
Location: Oslo, Norway
Distribution: Slackware 11, Solaris 10, Solaris 9, Sourcemage 0.9.6
Posts: 322

Rep: Reputation: 31
Hi

It looks like you've got a few syntax errors:
  • SCSI drives are called sd(0,0), sd(0,1) and so on in GRUB, not hd(0,0)
  • Menu.lst or grub.conf should be in /boot/grub, not /etc

Also, where is your bootloader now? MBR on /dev/sda?
 
Old 07-15-2007, 04:17 AM   #3
decrepit
Member
 
Registered: May 2006
Distribution: Ubuntu10.04, < fedora12
Posts: 347

Rep: Reputation: 34
Quote:
Originally Posted by gabeyg

And...
More is that...
when I clicked to /dev/sdb2's /etc/grub.conf, it showed me in Live CD error of
"This file can not be opened because of broken link of /dev/sdb2's /boot/grub/grub.conf." Also, I found that although the /dev/sdb1 (root=/boot) exists, sdb2 (root=/)'s boot folder (/boot of /dev/sdb2, not /dev/sdb1) is empty.

This situation is normal with any Fedora system, as /boot is a separate partition to /root /root/boot is empty when the system isn't booted, it's only when the system is booted that /boot gets "mounted" in /root. Some other distros don't have boot on a separate partition, and of course /root/boot is accessible whether system is booted or not.

Not sure what your problem is, but could it be something to do with booting from a USB drive. Does grub really see that as hd0?? It's a long shot, but I'd try changing it to hd1 and see what happens,

Also looks like you'll have trouble booting windows from there,

Quote:
title Other
rootnoverify (hd1,0)
chainloader +1
think that will need another couple of lines mapping the drives over so that windows thinks it's on the main drive, think it should look something like this.

title XP
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
makeactive
chainloader +1
 
Old 07-15-2007, 04:33 AM   #4
gabeyg
LQ Newbie
 
Registered: Jul 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dinolinux
Hi

It looks like you've got a few syntax errors:
  • SCSI drives are called sd(0,0), sd(0,1) and so on in GRUB, not hd(0,0)
  • Menu.lst or grub.conf should be in /boot/grub, not /etc

Also, where is your bootloader now? MBR on /dev/sda?
No, no the grub files are located in (/boot)/grub, but just I'm trying to open /etc/grub.conf. Also, GRUB is located in /dev/sdb's MBR and it passes to /dev/sdb1's file (stage2) then loads fedora installation processes. (to /dev/sdb2 -LVM, /dev/VolGroup00/LogVol00)
 
Old 07-15-2007, 04:44 AM   #5
gabeyg
LQ Newbie
 
Registered: Jul 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Post

Quote:
Originally Posted by decrepit
This situation is normal with any Fedora system, as /boot is a separate partition to /root /root/boot is empty when the system isn't booted, it's only when the system is booted that /boot gets "mounted" in /root. Some other distros don't have boot on a separate partition, and of course /root/boot is accessible whether system is booted or not.

Not sure what your problem is, but could it be something to do with booting from a USB drive. Does grub really see that as hd0?? It's a long shot, but I'd try changing it to hd1 and see what happens,

Also looks like you'll have trouble booting windows from there,



think that will need another couple of lines mapping the drives over so that windows thinks it's on the main drive, think it should look something like this.

title XP
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
makeactive
chainloader +1
Since I changed BIOS settings before installation, yes, it is right that it is hd0. Also thanks for XP infos.
 
Old 07-15-2007, 06:29 AM   #6
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
Quote:
Originally Posted by dinolinux
Hi

It looks like you've got a few syntax errors:
  • SCSI drives are called sd(0,0), sd(0,1) and so on in GRUB, not hd(0,0)
  • Menu.lst or grub.conf should be in /boot/grub, not /etc
Sorry dino, but:
1) GRUB does not distinuish between SATA, PATA and SCSI.
2) Fedora puts the GRUB config in /etc


--Ian
 
Old 07-15-2007, 06:56 AM   #7
gabeyg
LQ Newbie
 
Registered: Jul 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Exclamation Let's go to main problem here

Let's solve this first: why grub or the thing is showing Operating System Not Found?
 
Old 07-16-2007, 04:49 AM   #8
decrepit
Member
 
Registered: May 2006
Distribution: Ubuntu10.04, < fedora12
Posts: 347

Rep: Reputation: 34
Quote:
Originally Posted by gabeyg
Let's solve this first: why grub or the thing is showing Operating System Not Found?
So that looks like grub has found the kernel, (otherwise it would say something like "file not found") but the kernel can't find the operating system?
Does that sound right???

You could go into grub command mode during boot, hit "edit" at the grub menu, then you can play around with each line and see what happens.

Quote:
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
You could try changing this line to
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/sdb2 rhgb quiet

It looks like sdb1 is either /boot or swap and sdb2 is /
I know nothing about logical volumes, be interesting to see what this does.

It could be that sdb1 is boot and sdb2 being under LVM is both / and swap, in that case my suggestion could confuse things.
 
Old 07-16-2007, 08:41 AM   #9
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by IBall
<snip>
Sorry dino, but:
1) GRUB does not distinuish between SATA, PATA and SCSI.
2) Fedora puts the GRUB config in /etc
</snip>
What's in /etc ia a link to /boot/grub/grub.conf
Code:
$ ls -l /etc/grub.conf
lrwxrwxrwx 1 root root 22 2006-07-02 20:31 /etc/grub.conf -> ../boot/grub/grub.conf
so, if /boot is not mounted, the link will fail.

gabeyg: Rather than using the LiveCd, try a linux rescue from an installation dice, and use the setroot command to access your F7. Then use the grub-install script (or just the grub commands) to reinstall grub in the MBR.

Also, check that the labels on your boot partitions match the LABEL= settings in your /etc/fstab, and that you have no label conflicts.

Last edited by PTrenholme; 07-16-2007 at 04:21 PM.
 
Old 07-17-2007, 07:16 PM   #10
gabeyg
LQ Newbie
 
Registered: Jul 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Post No..

Quote:
Originally Posted by decrepit
So that looks like grub has found the kernel, (otherwise it would say something like "file not found") but the kernel can't find the operating system?
Does that sound right???

You could go into grub command mode during boot, hit "edit" at the grub menu, then you can play around with each line and see what happens.


You could try changing this line to
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/sdb2 rhgb quiet

It looks like sdb1 is either /boot or swap and sdb2 is /
I know nothing about logical volumes, be interesting to see what this does.

It could be that sdb1 is boot and sdb2 being under LVM is both / and swap, in that case my suggestion could confuse things.
I didn't see grub menu.....
 
Old 07-17-2007, 07:22 PM   #11
gabeyg
LQ Newbie
 
Registered: Jul 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Post I'm trying..

Quote:
Originally Posted by gabeyg
I didn't see grub menu.....
I'm currently trying many suggestions. If all fails, I will post again at this thread on this sunday.
By the way, I found my device.map should be like this:
(hd0) /dev/sda
(hd1) /dev/sdb

so..
i'm fixing problems slowly.., not completely still, but...
 
Old 07-18-2007, 03:47 AM   #12
decrepit
Member
 
Registered: May 2006
Distribution: Ubuntu10.04, < fedora12
Posts: 347

Rep: Reputation: 34
Quote:
# 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/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sdb
default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.20-2925.9.fc7xen)
root (hd0,0)
In core 6, there's a screen that comes up, saying something like, "press any key to see grub menu within 5 sec".
To alter that so menu comes up each time, in the above code, add an # in front of "hiddenmenu" like so.
# hiddenmenu

And change "timeout=5" to timeout=10

That way the menu will show up during boot, and give you 10sec to press a key instead of 5sec.

So, let us know what you do, and what the results are.
 
Old 07-23-2007, 03:10 PM   #13
kojot
LQ Newbie
 
Registered: Jul 2007
Location: Latvia
Distribution: Fedora
Posts: 13

Rep: Reputation: 0
Quote:
Originally Posted by gabeyg
I'm currently trying many suggestions. If all fails, I will post again at this thread on this sunday.
By the way, I found my device.map should be like this:
(hd0) /dev/sda
(hd1) /dev/sdb

so..
i'm fixing problems slowly.., not completely still, but...

Did you fix the problem? I have the same troubles. If you know how, please help me.
 
Old 07-24-2007, 08:03 AM   #14
gabeyg
LQ Newbie
 
Registered: Jul 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Smile Fixed..

Quote:
Originally Posted by kojot
Did you fix the problem? I have the same troubles. If you know how, please help me.
The problem is pixed. If anyone needs solution, contact me.
 
Old 07-25-2007, 04:41 AM   #15
decrepit
Member
 
Registered: May 2006
Distribution: Ubuntu10.04, < fedora12
Posts: 347

Rep: Reputation: 34
would be better if you can post it here, that way anybody searching can just see what you've done.

Plus I'd like to see if I've actually been any help. Or if the solution lies elsewhere.
 
  


Reply

Tags
emergency, fedora, grub, usb



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
I upgraded Fedora 3 to Fedora 4 and only lost half a head of hair! dlowery LinuxQuestions.org Member Success Stories 0 04-17-2006 05:44 PM
grub's splashimage command perfect_circle Slackware 2 04-27-2005 10:22 AM
Create an emergency disk in Fedora Core 2 yjlee Linux - Newbie 2 08-07-2004 04:53 PM
Which file controls the processes that Fedora loads! sjia Linux - Newbie 1 04-08-2004 12:11 AM
changing grub's OS name a2ps Linux - General 3 02-06-2004 09:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 04:32 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration