LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 06-16-2007, 09:56 AM   #1
jpgold881
LQ Newbie
 
Registered: Jun 2007
Distribution: Fedora Core 6
Posts: 3

Rep: Reputation: 0
Thumbs down fc6 grub menu.lst won't load


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
 
Old 06-16-2007, 12:02 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Quote:
grub> setup (hd0,0)
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.
 
Old 06-16-2007, 09:56 PM   #3
jpgold881
LQ Newbie
 
Registered: Jun 2007
Distribution: Fedora Core 6
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
Old 06-16-2007, 10:08 PM   #4
jpgold881
LQ Newbie
 
Registered: Jun 2007
Distribution: Fedora Core 6
Posts: 3

Original Poster
Rep: Reputation: 0
Cool 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.
 
Old 11-22-2007, 10:19 PM   #5
CaptainMorgan
LQ Newbie
 
Registered: Nov 2007
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by jpgold881 View Post
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
 
Old 11-22-2007, 11:26 PM   #6
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 25, 26, RHL 5.2
Posts: 560

Rep: Reputation: 56
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.
 
Old 11-23-2007, 12:04 AM   #7
CaptainMorgan
LQ Newbie
 
Registered: Nov 2007
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by wmakowski View Post
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
 
Old 06-15-2009, 12:42 AM   #8
JohnKerryJr
LQ Newbie
 
Registered: Jul 2004
Posts: 2

Rep: Reputation: 0
my grub problem solved

I have a separate /boot partition (/dev/hda1).

My symbolic link on /boot/grub/menu.lst pointed to /boot/grub/grub.conf

I deleted the symbolic link and made a new one:

# cd /boot/grub
# rm menu.lst
# ln -s grub.conf menu.lst

Now the symbolic link of /boot/grub/menu.lst points simply to grub.conf
(notice NO full path name).

Perhaps grub doesn't like the full path name, because /boot is on a different partition and it can't find the file this way.

Now it works.
 
Old 09-13-2010, 08:50 PM   #9
pyrat3
LQ Newbie
 
Registered: Sep 2010
Posts: 2

Rep: Reputation: 0
hey, i know this thread is a bit outdated but i have a similar issue with grub 1.98. however when i run the find /boot/grub/stage1 command i receive an error "unknown command 'find'." i am new to linux and grub and im not sure what to do. any help is appreciated.
 
  


Reply

Tags
fedora, grub, menu, menulst



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
Grub Menu doesn't reflect menu.lst file fatsheep Linux - Software 4 06-11-2007 01:29 PM
GRUB menu.lst/grub.conf file with multiple partitions dasy2k1 Linux - General 1 04-19-2007 08:42 AM
/grub/menu.lst file disappeared but computer still boots (grub) rrrssssss Linux - General 5 04-08-2007 09:02 AM
Grub 0.97 issues on slackware - grub-install is very slow, & updating menu.lst fails dieyouspammer Linux - Software 1 02-27-2006 01:06 PM
need grub menu.lst example pk108 Mandriva 4 12-11-2004 06:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:14 PM.

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