GRUB error 24 in Ubuntu Karmic and the fix
Posted by Double Compile on Thursday, November 12. 2009 in GNU/Linux
I applied a bunch of updates to my installation of Ubuntu 9.10 Karmic Koala this morning. Let it be known that I upgraded to Karmic from a clean install of Jaunty, and my root partition was once an ext3 file system turned into ext4. I returned from taking a shower to find the system had completely locked up, so I rebooted. Anyway, I got just past GRUB and received the following error:
24 : Attempt to access block outside partition
As it turns out, the GRUB Manual gives the following as a possible reason.
"This error is returned if a linear block address is outside of the disk partition. This generally happens because of a corrupt filesystem on the disk
So I inserted the Live CD and ran fsck.ext4 -f on the device in question, and no errors were found. Peculiar.
Some Google searching turned up this Launchpad issue, which in turn pointed me to a blog post called "Grub voodoo error no 13/24 and how do i fixed it" for a possible fix.
Allow me to quote from that post (thanks so much, Marius) the correct procedure to fix this beast in case anyone else runs into this little problem. Fill in /dev/sda with the correct device name for your disk containing the root partition.
$ sudo su $ mount /dev/sda1 /mnt $ mount --bind /dev /mnt/dev $ mount --bind /dev/pts /mnt/dev/pts $ mount --bind /dev/shm /mnt/dev/shm $ mount -t proc none /mnt/proc $ mount -t sysfs none /mnt/sys $ grub-install /dev/sda --root-directory=/ --recheck
I rebooted and everything was fine; crisis averted.
2010-02-06 09:43 at 09:02
2010-04-10 07:11 at 07:04
2010-06-10 05:01 at 05:06