GRUB doesn't display its menu

I havea  computer with Linux RHAS4 installed on disk 1 and Windows XP on disk 2.

Originally, GRUB was installed by anaconda and worked OK, but after I have played around a little with grub.conf, GRUB stopped showing the menu and now goes directly to grub> prompt.

grub.conf is in directory /boot/grub. menu.lst is also there, as a symlink to grub.conf.

I want my menu back!
karnovskAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

joolsSenior Systems AdministratorCommented:
post your /etc/grub.conf here

For reference, mine looks like this;

#boot=/dev/hde
default=0
timeout=5
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
#hiddenmenu
title Fedora Core (2.6.17-1.2139_FC4)
        root (hd1,0)
        kernel /boot/vmlinuz-2.6.17-1.2139_FC4 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.17-1.2139_FC4.img
0
rindiCommented:
Sometimes grub doesn't automatically go for the grub.conf file, but for a symlink, like menu.lst which links to grub.conf...
0
karnovskAuthor Commented:
My /boot/grub/grub.conf is as follows

#boot=/dev/hda
default=0
timeout=20
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Red Hat Enterprise Linux AS (2.6.9-22.EL)
      root (hd0,0)
      kernel /boot/vmlinuz-2.6.9-22.EL ro root=LABEL=/ rhgb quiet
      initrd /boot/initrd-2.6.9-22.EL.img
title Windows XP
      root (hd1,0)
      makeactive
      chainloader --force +1
      boot
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

karnovskAuthor Commented:
To rindi:

There is a symlink, /boot/grub/menu.lst to ./grub.conf
0
rindiCommented:
Sorry, I must have missed that, but see now that you mentioned it in your original Q.
0
manish_regmiCommented:
hi,
 Your grub.conf entries lloks fine.
Have you tried reinstalling grub. Boot from the rescue disk. it mounts your system in /mnt/sysimage and leaves u in the shell. then type
chroot /mnt/sysimage
grub-install /dev/hda


regards
Manish Regmi


0
karnovskAuthor Commented:
Hello Manish,

Thanks for your suggestion.

I have tried to do as you wrote, but after "grub-install /dev/hda" got the following message:

The file /boot/grub/stage1 not read correctly

Regards,

Alex

0
manish_regmiCommented:
hmm,
 try using --recheck option

grub-install --recheck /dev/hda

regards
Manish Regmi
0
karnovskAuthor Commented:
Sorry, same result.

Regards,

Alex
0
manish_regmiCommented:
At the grub prompt type:

root (hd0,0)
setup (hd0)
reboot


Regards
Manish Regmi
0
karnovskAuthor Commented:
Hi, have got some interesting results:

At the grub prompt, if I type

root (hda0,

and then TAB, I get the following list of partitions:

Possible partitions are:

Partition num: 0, Filesystem type unknown, partition type 0x93
Partition num: 4, Filesystem type ext2fs, partition type 0x83
Partition num: 5, Filesystem type ext2fs, partition type 0x83
Partition num: 6, Filesystem type  unknown, partition type 0x82
Partition num: 7, Filesystem type ext2fs, partition type 0x83
Partition num: 8, Filesystem type ext2fs, partition type 0x83


If in the "root" command I select partition 4 or 5 or 7 or 8, then type "setup (hd0)", I get the following message:

Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 15: File not found

If I select partition 0 or 6, I get:

Error 17: cannot mount selected partition


So it is very interesting, because when I boot from a rescue disk , I do see /boot/grub/stage1. On what partition is this directory?

Regards,

Alex
0
manish_regmiCommented:
In which partition is your /boot partition.
I gave (hd0,0) but it should be where your grub files are usually /boot partition

regards
Manish Regmi
0
karnovskAuthor Commented:
I don't remember. How can I find out.

As you can see above, I have tried all Linux partitions (4, 5, 7 and 8).

Regards,

Alex
0
joolsSenior Systems AdministratorCommented:
> At the grub prompt, if I type
> root (hda0,

Are you sure you don't type hd(0 and then TAB?

> Partition num: 0, Filesystem type unknown, partition type 0x93
> Partition num: 6, Filesystem type  unknown, partition type 0x82

Did you modify the partition type from 83 to 93?
It's a little strange the system does not recognise a valid swap partition type as well, curious!

Your grub.conf points to hd(0,0) with /boot under your root partition but the partition types do not make sense.
Have you tried doing;

     root hd(0,0)
     kernel /boot/vmlinux<TAB and enter the kernel details> ro root=LABEL=/
     initrd /boot/initrd<TAB and enter the initrd details>.img

     boot

J
0
karnovskAuthor Commented:
Hello jools,

> Are you sure you don't type hd(0 and then TAB?

Yes, I hit TAB and get the list of partitions.

> Did you modify the partition type from 83 to 93?

No, I did not.

> Have you tried doing;

     root hd(0,0)
     kernel /boot/vmlinux<TAB and enter the kernel details> ro root=LABEL=/
     initrd /boot/initrd<TAB and enter the initrd details>.img

After I type "kernel /boot/vmlinux" and hit TAB, I get:

Error 17: cannot mount selected partition

Regards,

Alex
0
karnovskAuthor Commented:
jools,

I have reread your first question and (at last!) understood that in my yesterday email  I made a mistake. It should read:

"At the grub prompt, if I type root (hd0, ..."

(rather than hda0).

AK
0
joolsSenior Systems AdministratorCommented:
Is there any way your partition type could have been changed or do you use amoeba type (93) filesystems??
You could try changing the partition ID to 83 but first give these a go....

Can you list any files if you use `kernel /`<TAB>?

Try it using `rootnoverify (hd0,0)`

How do you boot your system at the moment?

J
0
karnovskAuthor Commented:
Hello jools,

>Is there any way your partition type could have been changed or do you use amoeba type (93) filesystems??

I don't know how could the  partition type  be changed. I never heard of amoeba type (93) filesystems.


>Can you list any files if you use `kernel /`<TAB>?
>
>Try it using `rootnoverify (hd0,0)`

Error 17: cannot mount selected partition

>How do you boot your system at the moment?

I can't.

Please note that in spite of all that, if I boot from a rescue disk, I can see /boot.

Regards,

AK

0
joolsSenior Systems AdministratorCommented:
What partition does boot appear on when you boot the rescue disk?

It may be time to try changing the parition id... Boot your rescue disk and try doing the following;

     fdisk /dev/hda
     Command (m for help): t
     Partition number (1-6): 1
     Hex code (type L to list codes): 83
     Command (m for help): w
     Command (m for help): q






0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
karnovskAuthor Commented:
Excellent!

Now GRUB works!

jools, thank you very much for your professional guidance.

Cheers,

Alex
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.