You are not logged in.

#1 2008-07-12 07:53:28

phinux
Member
Registered: 2008-07-12
Posts: 6

[Solved] Grub Skips Menu

I've just got a new laptop (Asus M50) and I've been trying to get Arch Linux running with encrypted / and /home partitions by following this tutorial: http://wiki.archlinux.org/index.php/Sys … r_dm-crypt
I installed Grub to my /boot partition (which is unencrypted), but upon reboot I was presented with a blank screen and a flashing cursor.  I suspected Grub wasn't installed correctly, so I reinstalled it by running (from the ArchLive CD):

# grub-install --root-directory=/mnt/boot /dev/sda

Which seemed to run fine, and Grub now actually loads at startup, but it immediately presents me with a grub prompt.  Now I can boot manually from this, for example:

grub> root (hd0, 0)
grub> kernel /vmlinuz26 root=/dev/sda3 ro
grub> initrd /kernel26.img
grub> boot

Allows arch to boot without a hitch.  As far as I can tell, my /boot/grub/menu.lst is correct so I don't understand why grub is skipping the menu, and a few hours of searching Google haven't helped much.

EDIT

GRUB looks for its configuration file as soon as it is loaded. If one is found, then the full menu interface is activated using whatever entries were found in the file. If you choose the command-line menu option, or if the configuration file was not found, then GRUB drops to the command-line interface.

Following up on this, ls /boot/grub | grep menu.lst locates the file, but grub> find /boot/grub/menu.lst returns Error 15: File not found.  So does anybody know why there would be this discrepancy?  I have a feeling that fixing this will fix my problem.

EDIT 2
I'm getting closer... I found a mistake in my previous edit, because grub> find /grub/menu.lst returns (hd0,0), so it was found.  I forgot that grub's root was not necessarily the root of the filesystem.  So now I can type grub> configfile /grub/menu.lst and it will bring up the menu, but it still doesn't load the menu before going to the prompt, and reinstalling grub yet again doesn't fix this.

Last edited by phinux (2008-07-13 04:00:36)

Offline

#2 2008-07-13 04:00:05

phinux
Member
Registered: 2008-07-12
Posts: 6

Re: [Solved] Grub Skips Menu

Aha, success.  This guy (http://www.linuxquestions.org/questions … ad-562236/) seemed to be having the same problem as me, and his fix worked for me as well.  I'll just retype it here in case anybody else has the same problem, but the original post is here.

Reinstall grub:

grub> root (hd0,0)
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/menu.lst"... succeeded
Done

Now for whatever reason the final line (Running "install...") is not correct so if you run it again, but remove "/boot" from "/boot/grub/menu.lst" everything works:

grub> install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/boot/grub/stage2 /grub/menu.lst

Reboot and it should go straight to the menu.

Offline

Board footer

Powered by FluxBB