4. Grub Error 15
Situation
This error can occur in two different stages of the GRUB configuration, either during the initial configuration (installing GRUB in the master boot record) or after booting the system and attempting to launch Linux (or any other entry).
Code Listing 4.1: Grub Output - Initial Configuration
grub> root (hd0,0)
Filesystem type is xfs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no
Error 15: File not found
Code Listing 4.2: Grub Output - Booting an Entry
Booting 'gentoo Linux'
root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
kernel (hd0,0)/boot/kernel-2.4.20 root=/dev/hda3 vga=792
Error 15: File not found
Press any key to continue...
Solution - Initial Configuration
This error is returned if the specified file name cannot be found, but everything else (like the disk/partition info) is OK.
Frequently, the error notes a missing kernel image file. Make sure that the file it is referring to exists on your boot partition.
To find out the exact name of your kernel, boot from the installation cd, mount your root and (if applicable) boot partition. Next, chroot into your Gentoo system and do a listing of the available files to see what kernel images you have available:
Code Listing 4.3: Verifying kernel image existence
# cd /boot
# ls
This will list all the kernels that you've got on your boot partition. If your kernel is missing make sure that you compiled a kernel (using genkernel or manually):
Code Listing 4.4: Recompile the kernel
# cd /usr/src/linux/
# make menuconfig
# make
And that you copied it to your boot partition:
Code Listing 4.5: Copying the kernel
# cp /usr/src/linux/arch/i386/boot/bzImage /boot
Verify that the name of the kernel is exactly the same as the one mentioned in your grub.conf file. Also make sure that the kernel line in your grub.conf file is referring to that partition (either explicitly or implicitly).
Another reported mistake is to have the BIOS ignore the disk on which the kernel or grub stages reside. Also, the partition on which grub stores its stages should not use a software RAID-5 (or other striping technology) configuration.
Solution - Booting an Entry
First, verify that the root and setup lines you have used are correct.
If you are certain they are valid, then you might be using a flawed GRUB version (0.93.20031222). Upgrade your Portage tree or mask this version of grub:
Code Listing 4.6: Masking Grub
(Execute this from within the chrooted environment)
# echo "=sys-boot/grub-0.93.20031222" >> /etc/portage/package.mask
# emerge grub -p
You could also try to use the grub-install script as is recommended by the GRUB authors:
Code Listing 4.7: Using grub-install
(The --root-directory is needed if you are using a separate boot
partition,
otherwise you should leave it out)
# grub-install --root-directory=/boot /dev/hda
When all this fails, your boot partition may be corrupt. Check the partition for errors:
Code Listing 4.8: Checking a partition for errors
(Make sure the boot partition, /dev/hda1 in this case, is unmounted)
# fsck -y /dev/hda1