I'm having a very strange problem with installing Grub to the MBR after switching my sole SATA disk to AHCI mode (Standard IDE mode has all kinds of problems with Linux). Both the automated grub-install and manual grub shell setup fail to install Grub to the MBR correctly (although the output messages make it seem as if everything has gone perfectly).
I have 3 ext3 partitions and 1 swap, all primary. /dev/sda1 and /dev/sda2 contain Ubuntu 6.06 and Gentoo 2.6.20-r8 installs respectively, with sda3 being swap and sda4 currently empty.
Here is my grub.conf from Gentoo:
title=Gentoo Linux 2.6.20-r8
kernel /boot/kernel-2.6.20-gentoo-r8 root=/dev/sda2
Note that the Ubuntu install is "hidden" (I was too lazy to copy over the relevant lines from menu.lst on /dev/sda1). Here's what I execute in the Grub shell:
And all seems to go well. However, viewing the first 512 bytes (the MBR) shows something bad - I see the message "Grub Geom Hard Disk Read Error" with a few binary characters in between the words. Okay, so Grub cannot determine the correct disk geometry for some reason. However, executing "geometry (hd0)" within the Grub shell gives the correct output (confirming with fdisk).
I'm at my wit's end here. I've tried different combinations of BIOS settings and nothing seems to make it boot from the SATA disk. I just get the message "Insert media in Boot Device or reboot".
Has anybody else experienced similar issues?