Linux – GRUB error 15, no boot menu nor /boot

arch linuxbootgrub

I am have a fully updated Arch Linux system that was running fine. Last night I tried to setup autofs per instructions on the Arch wiki, but upon restart there was no boot menu and only a GRUB error message saying "Error 15".

(1) Using Ext2explore in Windows, I can see the following partition structure:
partitions from Windows

(2) Using fdisk in an ArchLinux live cd, I can see this:
partitions from Arch live cd

(3) I tried to do "fdisk /dev/sda/" then the commands x, f, w to correct error, but fdisk says my partitions' "ordering is correct already"

(4) Using the root and setup commands in the GRUB shell also ended in failure (it tells me it can't find GRUB files, /boot/grub/, etc. etc.). Specifically, I tried "root (hd0,1)", then "setup (hd0)", (also hd0,0, hd0,2, etc.), all failed.

Is there any hope of restoring my system? Thanks for your help.

P.S. here is my menu.lst, which can be seen in Ext2explore:

# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst

# DEVICE NAME CONVERSIONS 
#
#  Linux           Grub
# -------------------------
#  /dev/fd0        (fd0)
#  /dev/sda        (hd0)
#  /dev/sdb2       (hd1,1)
#  /dev/sda3       (hd0,2)
#

#  FRAMEBUFFER RESOLUTION SETTINGS
#     +-------------------------------------------------+
#          | 640x480    800x600    1024x768   1280x1024
#      ----+--------------------------------------------
#      256 | 0x301=769  0x303=771  0x305=773   0x307=775
#      32K | 0x310=784  0x313=787  0x316=790   0x319=793
#      64K | 0x311=785  0x314=788  0x317=791   0x31A=794
#      16M | 0x312=786  0x315=789  0x318=792   0x31B=795
#     +-------------------------------------------------+
#  for more details and different resolutions see
#  http://wiki.archlinux.org/index.php/GRUB#Framebuffer_Resolution 

# general configuration:
timeout   5
default   0
color green black

# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/f4c13c68-54e4-4631-8a5a-d1649d5c3b02 ro vga=771
initrd /kernel26.img

# (1) Arch Linux
title  Arch Linux Fallback
root   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/f4c13c68-54e4-4631-8a5a-d1649d5c3b02 ro
initrd /kernel26-fallback.img

# (2) Windows
#title Windows
#rootnoverify (hd0,0)
#makeactive
#chainloader +1

I tried the solution provided in the first answer, but failed with the following output:
Can't install Grub after chroot
Also notice that menu.lst is not there, even though it appeared when I examined the partition in Ext2explore.

Also, here are the contents of /etc/fstab:
fstab

Best Answer

Boot from your ArchLinux live cd again and in a command prompt as root run the exact following.

mkdir /mnt/root
mount /dev/sda3 /mnt/root
mount /dev/sda1 /mnt/root/boot
cp -a /dev/sd* /mnt/root/dev/
chroot /mnt/root
mount /proc
cat /proc/mounts > /etc/mtab
grub-install --recheck --no-floppy /dev/sda
umount /proc
exit
umount /mnt/root/boot
umount /mnt/root
reboot

Depending on what you did trying to setup autofs, you might want to check that /etc/fstab or /boot/grub/menu.lst files are valid while you are chrooted in your system (after mount /proc above).

There is also one more (shorter) way this can be done. Not sure if it is possible with the archlinux live cd, but probably is.

mkdir /mnt/root
mount /dev/sda3 /mnt/root
mount /dev/sda1 /mnt/root/boot
grub-install --root-directory=/mnt/root --recheck --no-floppy /dev/sda
umount /mnt/root/boot
umount /mnt/root
reboot
Related Question