Solved

GRUB doesn't display its menu

Posted on 2006-06-29
20
476 Views
Last Modified: 2013-12-15
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!
0
Comment
Question by:karnovsk
  • 10
  • 4
  • 4
  • +1
20 Comments
 
LVL 19

Expert Comment

by:jools
ID: 17016099
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
 
LVL 88

Expert Comment

by:rindi
ID: 17022764
Sometimes grub doesn't automatically go for the grub.conf file, but for a symlink, like menu.lst which links to grub.conf...
0
 

Author Comment

by:karnovsk
ID: 17022785
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:karnovsk
ID: 17022791
To rindi:

There is a symlink, /boot/grub/menu.lst to ./grub.conf
0
 
LVL 88

Expert Comment

by:rindi
ID: 17022801
Sorry, I must have missed that, but see now that you mentioned it in your original Q.
0
 
LVL 8

Expert Comment

by:manish_regmi
ID: 17026365
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
 

Author Comment

by:karnovsk
ID: 17027104
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
 
LVL 8

Expert Comment

by:manish_regmi
ID: 17028614
hmm,
 try using --recheck option

grub-install --recheck /dev/hda

regards
Manish Regmi
0
 

Author Comment

by:karnovsk
ID: 17032597
Sorry, same result.

Regards,

Alex
0
 
LVL 8

Expert Comment

by:manish_regmi
ID: 17034595
At the grub prompt type:

root (hd0,0)
setup (hd0)
reboot


Regards
Manish Regmi
0
 

Author Comment

by:karnovsk
ID: 17037742
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
 
LVL 8

Expert Comment

by:manish_regmi
ID: 17037782
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
 

Author Comment

by:karnovsk
ID: 17038665
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
 
LVL 19

Expert Comment

by:jools
ID: 17038924
> 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
 

Author Comment

by:karnovsk
ID: 17044202
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
 

Author Comment

by:karnovsk
ID: 17044274
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
 
LVL 19

Expert Comment

by:jools
ID: 17046788
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
 

Author Comment

by:karnovsk
ID: 17053660
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
 
LVL 19

Accepted Solution

by:
jools earned 125 total points
ID: 17054130
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
 

Author Comment

by:karnovsk
ID: 17059486
Excellent!

Now GRUB works!

jools, thank you very much for your professional guidance.

Cheers,

Alex
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question