Linux - Newbie This 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! |
 |
06-16-2007, 09:56 AM
|
#1
|
|
LQ Newbie
Registered: Jun 2007
Distribution: Fedora Core 6
Posts: 3
|
fc6 grub menu.lst won't load
[ Log in to get rid of this advertisement]
Hello,
I had one of my two mirrored sata disk die on me. Now when grub boots it doesn't load the menu. So I have reloaded the grub onto the /dev/sda. My configuration is:
/dev/sda1 is /boot
/dev/sda2 is swap
/dev/sda3 is /
I have run both grub-install and grub to reinstall grub. I am running version .97 of grub.
I have run grub:
grub
grub> root (hd0,2)
grub> setup (hd0,0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd0,2)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (hd0,0) /boot/grub/stage2 p /boot/grub/grub.conf "... succeeded
Done.
> quit
reboot
I can get the menu to load once grub has loaded and is at the command prompt by typing:
configfile /grub/menu.lst
my device.map looks like:
[root@calvin grub]# cat device.map
(hd0) /dev/sda
my grub.conf looks like:
# 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 (hd1,0)
# kernel /vmlinuz-version ro root=/dev/md2
# initrd /initrd-version.img
#boot=/dev/md0
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.6.20-1.2952.fc6)
root (hd0,0)
kernel /vmlinuz-2.6.20-1.2952.fc6 ro root=/dev/md2 rhgb quiet
initrd /initrd-2.6.20-1.2952.fc6.img
title Fedora Core (2.6.20-1.2948.fc6)
root (hd0,0)
kernel /vmlinuz-2.6.20-1.2948.fc6 ro root=/dev/md2 rhgb quiet
initrd /initrd-2.6.20-1.2948.fc6.img
I should be getting a replacement drive soon to get md re mirrored. But I can't figure out whyt he menu isn't loading.
Thanks for any help or suggestions.
Jon
|
|
|
|
06-16-2007, 12:02 PM
|
#2
|
|
Senior Member
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: openSUSE 10.3 Debian 4.0
Posts: 4,497
|
That will write grub first stage to the first partition and not to the MBR. If you want grub in the MBR of /dev/sda, change that to "setup (hd0)".
Your /boot/grub/menu.lst should also read:
kernel (hd0,0)/vmlinuz root=/dev/sda3 <other boot parameters>
Since the /boot directory is in it's own partition, grub need to know where /boot is, and where the root of the filesystem is located.
|
|
|
|
06-16-2007, 09:56 PM
|
#3
|
|
LQ Newbie
Registered: Jun 2007
Distribution: Fedora Core 6
Posts: 3
|
Ok....
Thanks for the help now I am getting closer I think... The problem is now that I am having to type:
configfile /grub/menu.lst
Here is what I typed in grub>
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2
/boot/grub/grub.conf"... succeeded
Done.
If I do root (hd0,2) it doesn't mount the boot partition... So when I do:
root (hd0,2)
setup (hd0)
I have to type:
root (hd0, 0)
then
configfile /grub/menu.lst....
I see the last line:
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2
/boot/grub/grub.conf"... succeeded
How can I get it to do:
hd(0,0)/grub/ instead of hd (0,0)/boot/grub...
Thoughts and thanks for the help!
Jon
|
|
|
|
06-16-2007, 10:08 PM
|
#4
|
|
LQ Newbie
Registered: Jun 2007
Distribution: Fedora Core 6
Posts: 3
|
Thanks I got it...
Ok,
Bigrigdriver you gave me enough to figure out the rest... I typed:
grub
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2
/boot/grub/grub.conf"... succeeded
Done
grub> install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2 /grub/grub.conf
grub> reboot
by changing the install command sovled the problem. I hope this helps someone else out who has this issue.
Thanks,
Jon
Last edited by jpgold881 : 06-16-2007 at 10:09 PM.
|
|
|
|
11-22-2007, 10:19 PM
|
#5
|
|
LQ Newbie
Registered: Nov 2007
Posts: 5
|
Quote:
Originally Posted by jpgold881
Ok,
Bigrigdriver you gave me enough to figure out the rest... I typed:
grub
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2
/boot/grub/grub.conf"... succeeded
Done
grub> install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2 /grub/grub.conf
grub> reboot
....
Jon
|
I am having a similar problem here... only when I attempt to:
configfile /boot/grub/menu.lst
it clears the screen - attempting to load something and comes immediately back to the grub> prompt. I checked out menu.lst and it exists... so I have no clue what could be wrong here.
I am trying to boot to Fiesty on (hd0,1) this what I did:
grub> root (hd0,1)
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
so I attempt like above:
grub> install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst
and now either grub> reboot doens't fix it or grub> configfile /boot/grub/menu.lst clears the screen bringing me back to the grub> prompt...
Can you anyone assist?
TIA
|
|
|
|
11-22-2007, 11:26 PM
|
#6
|
|
Member
Registered: Oct 2003
Location: Ohio
Distribution: RHL 5.2, Fedora 8 & 9
Posts: 447
|
CaptainMorgan,
From your description it sounds like grub is not finding menu.lst or the other files it needs keep going. As a result grub goes to the grub> prompt to give you a chance to boot manually.
At the prompt enter: grub> find /boot/grub/stage1, the result will be something like (hd0, 1). Where hd0 is the drive and 1 is the partition that has all the files that grub needs to work. If instead you get Error 15: File not found, then you probably have a boot partition and should try grub> find /grub/stage1 which will return the drive and partition information.
This becomes your root drive, not to be confused with /. All it takes to install grub after that is two commands.
grub> root (hd0,1)
grub> setup (hd0)
You don't need to type the install command, that is done automatically for you as part of the setup command. At this point you should be able to get a menu after entering the reboot command.
When you were using the configfile command it was not finding menu.lst which is actually a symlink to grub.conf. Not finding it causes grub to go back to the grub> prompt.
If you still have trouble, post the results of fdisk -l /dev/sda. If you are using multiple drives, let us know what the others look like too.
Bill
Last edited by wmakowski : 11-22-2007 at 11:28 PM.
|
|
|
|
11-23-2007, 12:04 AM
|
#7
|
|
LQ Newbie
Registered: Nov 2007
Posts: 5
|
Quote:
Originally Posted by wmakowski
CaptainMorgan,
From your description it sounds like grub is not finding menu.lst or the other files it needs keep going. As a result grub goes to the grub> prompt to give you a chance to boot manually.
At the prompt enter: grub> find /boot/grub/stage1, the result will be something like (hd0, 1). Where hd0 is the drive and 1 is the partition that has all the files that grub needs to work. If instead you get Error 15: File not found, then you probably have a boot partition and should try grub> find /grub/stage1 which will return the drive and partition information.
This becomes your root drive, not to be confused with /. All it takes to install grub after that is two commands.
grub> root (hd0,1)
grub> setup (hd0)
You don't need to type the install command, that is done automatically for you as part of the setup command. At this point you should be able to get a menu after entering the reboot command.
When you were using the configfile command it was not finding menu.lst which is actually a symlink to grub.conf. Not finding it causes grub to go back to the grub> prompt.
If you still have trouble, post the results of fdisk -l /dev/sda. If you are using multiple drives, let us know what the others look like too.
Bill
|
grub> find /boot/grub/stage1 returns:
(hd0,1)
(hd3,1)
setup (hd1) or setup (hd3) both succeed, but once again ultimately do not give me a menu. I can't post the results of fdisk because I can't get a unix like console. please see:
http://www.linuxquestions.org/questi...nu.lst-601794/
The amount of time I have spent on this is aggravating.. I could've already re-installed the ubuntu system and had it up and running by now....
-Capt
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:11 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
LQ Podcast
LQ Radio
|
|