HOWTO Fix Grub it can't find a kernel
From Gentoo Linux Wiki
| Installation • Kernel & Hardware • Networks • Portage • Software • System • X Server • Gaming • Non-x86 • Emulators • Misc |
Please format this article according to the guidelines and Wikification suggestions, then remove this notice {{Wikify}} from the article
Contents |
[edit] Introduction
Fixing kernel when grub gives you a shell
This is mainly a newbie HOWTO (I'm a bit of a newb myself).
Ok, so you just installed Gentoo, you booted, and instead of the Grub menu you expected, you get this thing that says something that says minimal shell. You should see something like this:
GNU GRUB version 0.96 (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ] grub>
[edit] What to do?
[edit] GRUB Installed On Separate Partition
If you have installed grub on a separate partition /dev/hda3 and have kernel in / directory, type in the GRUB shell:
root (hd0,2) setup (hd0) quit
[edit] GRUB Installed on Gentoo Partition
If you have kernel and GRUB on main Gentoo partition (Ex. /dev/hda4) in /boot directory, type:
root (hd0,3)/boot setup (hd0) quit
(hd0) means first hard drive and (hd0,2) is a third partition on first hard drive (same as /dev/hda3) where GRUB files will be installed.
[edit] Success
If you see something like this:
grub> root (hd0,2) Filesystem type is ext2fs, partition type 0x83 grub> setup (hd0) Checking if "/boot/grub/stage1" exists... no Checking if "/grub/stage1" exists... yes Checking if "/grub/stage2" exists... yes Checking if "/grub/e2fs_stage1_5" exists... yes Running "embed /grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. succeeded Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,2)/grub/stage2 /grub/menu .lst"... succeeded Done.
reboot your system and menu shold be back.
