Grub error 13: Invalid or unsupported executable format

Bug #365331 reported by sadicote on 2009-04-23
This bug affects 8 people
Affects Status Importance Assigned to Milestone
grub (Ubuntu)

Bug Description

I got this immediately after an update and reboot. Tried booting from live CD and using sudo grub-install /dev/sda1 but got a "device not found" message in the terminal. I am/was running Jaunty with occupies my entire 160 GB hdd. I think the Jaunty updater causes the problem when on ext4.

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x556b556b

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 19128 153645628+ 83 Linux
/dev/sda2 19129 19457 2642692+ 5 Extended
/dev/sda5 19129 19457 2642661 82 Linux swap / Solaris

sojourner (itsmealso2) wrote :

this occured to me after a fresh install of jaunty ( released version) with ext4 and then changing sources .lst to karmic and updating, all went well until I installed the 2.6.30-1 kernel , with that kernel I would get grub error 13 , with 2.6.28-11 the boot was ok , reinstalling grub from within karmic allowed me to boot the 30-x kernels , there are several reports of this in the karmic dev forum and reinstalling grub does not seem to work for everyone .

I've had exactly the same experience of sojourner above.

Vish (vish) wrote :

This solved the problem for me, from >

boot from the live medium and chroot into the Linux installation:

$ sudo mkdir /mnt/linux
$ sudo mount -t ext4 /dev/sda1 /mnt/linux
$ sudo mount -t proc proc /mnt/linux/proc
$ sudo mount -t sysfs sys /mnt/linux/sys
$ sudo mount -o bind /dev /mnt/linux/dev
$ sudo chroot /mnt/linux

If /boot is on a separate partition, this partition must also be mounted:

$ sudo mount -t ext4 /dev/sdaX /boot

Then, the following command should resolve the issue. :

$ sudo grub-install --recheck /dev/sda

Leo Milano (lmilano) wrote :

Same issue here. I upgraded from 8.04 to 9.04 on my eeepc. At some point, on 9.04, I switched to ext4. That would work fine. After that, there was a kernel upgrade that I install, and after reboot I got the dreaded grub error 13. Thankfully, the workaround reported by mac_v worked for me, too.

mathew (meta23) wrote :

Just hit this problem upgrading to 2.6.31 on a Karmic system, so it's still happening.

Selecting 2.6.28 from the menu allowed the system to boot. I then ran grub-install --recheck and rebooted again, and that killed it completely--I get "GRUB loading, please wait..." and then it hangs.

mathew (meta23) wrote :

Rebooted to 9.10 live CD, mounted my hard drives manually.

Ran grub-install --root-directory=/mnt/sdb1 /dev/sdb

That gave me a bunch of files in /mnt/sdb1/grub, but no grub.cfg. I did, however, have /mnt/sdb1/grub.d/*

Then did mount --bind /dev /mny/sdb1/dev && mount --bind /proc /dev/sdb1/proc && chroot /mnt/sdb1
and took a look around, and discovered I was running grub 1.x, but grub-common version was for grub 2.x. So I'm wondering if the problem is because upgraded systems are left with grub 1, but one or more recent upgrades result in a dependency on grub 2.

Installed grub-pc and ran update-grub2 /dev/sdb, which generated grub.cfg, though it gave an error "Cannot find list of partitions!"

Rebooted, and it died on "GRUB loading, please wait..." suggesting it was getting grub 1 from somewhere.

Finally got my system bootable again by burning a copy of the Ubuntu alt/recovery CD, booting that, using its menu option to launch a shell with /dev/sdb1 as root, then running grub-install and update-grub.

Fabien Tassin (fta) wrote :

Karmic, ext3 to ext4 migration a few weeks ago, no problem after a few reboot until a kernel update arrived.

Changed in grub (Ubuntu):
status: New → Confirmed
Jan Dvorak (snoutmate) wrote :

Same here, upgraded from jaunty to karmic (and ext3->ext4) week ago without problems, today after kernel update from 2.6.31-16 to 2.6.31-17 ended up with Invalid or unsupported executable format on boot - still was able to boot with 2.6.31-16

Alexander Sack (asac) wrote :

do you still have that broken kernel? please post output of ls -l /boot/

sadicote (mzsade) wrote :

Never had the problem since i switched to Mint (same kernels), have recently updated from 2.6.31-16 to 2.6.31-17 myself, so it's definitely something to do with the update manager.

Spang (hetkot) wrote :

I had this problem in Karmic x86, when upgrading to generic kernel 2.6.31-20.

Apparently kernel 2.6.31-19 was still bootable.

Just booting that and running

sudo grub-install --recheck /dev/sda

fixed it.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers