reinstall of precise breaks grub with invalid arch independent ELF magic

Bug #934614 reported by Alan Bell
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
High
Unassigned
Precise
Expired
High
Unassigned

Bug Description

I did an over the top install of precise without formatting the drive to preserve the home partition. I can now not boot the computer and can't reinstall grub.

ubuntu@ubuntu:~$ mkdir target
ubuntu@ubuntu:~$ sudo mount /dev/sda1 target
ubuntu@ubuntu:~$ ls target/
bin etc lib lost+found proc selinux usr
boot home lib32 media root srv var
cdrom initrd.img lib64 mnt run sys vmlinuz
dev initrd.img.old libnss3.so opt sbin tmp
ubuntu@ubuntu:~$ sudo mount -o bind /proc target/proc
ubuntu@ubuntu:~$ sudo mount -o bind /dev target/dev
ubuntu@ubuntu:~$ sudo mount -o bind /sys target/sys
ubuntu@ubuntu:~$ sudo chroot target
root@ubuntu:/# grub-install /dev/sda
Installation finished. No error reported.
root@ubuntu:/# exit
ubuntu@ubuntu:~$

reboot, same error, grub rescue prompt with invalid arch independent ELF format.

The computer was installed as 64bit 11.10, upgraded to 12.04 and updated frequently. I broke unity a bit and decided to try the full reinstall process from a live USB. The computer is a core i3 laptop, with a 320GB drive, default partitioning /dev/sda1 is big and all the data /dev/sda5 is swap. Installing precise 64bit from daily live CD image.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
bwalex (ahornung) wrote :

Bug also affects me. I installed Ubuntu 12.04 amd64 (beta 1) using the alternate installer. After rebooting, grub failed miserably with the aforementioned error.

root@ubuntu:/# dpkg -l | grep -i grub
ii grub-common 1.99-17ubuntu1 GRand Unified Bootloader (common files)
ii grub-efi 1.99-17ubuntu1 GRand Unified Bootloader, version 2 (dummy package)
ii grub-efi-amd64 1.99-17ubuntu1 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 1.99-17ubuntu1 GRand Unified Bootloader, version 2 (EFI-AMD64 binaries)
ii grub2-common 1.99-17ubuntu1 GRand Unified Bootloader (common files for version 2)

Revision history for this message
Gema Gomez (gema) wrote :

Having witnessed this problem bwalex has, I don't think it has anything to do with Ubiquity or alternate install, it looks more like a grub problem.

affects: ubiquity (Ubuntu) → grub (Ubuntu)
Revision history for this message
bwalex (ahornung) wrote :
Revision history for this message
bwalex (ahornung) wrote :

I've attached the lspci -vv output as well as a tarball of most of /var/log/installer (except the partman log) if it helps.The motherboard is an Asus M5A97.

Using ubuntu-bug or apport is a no-go because of the requirement of a full-blown X and GTK environment - it'd be a pretty great idea if ubuntu-bug didn't need all that eye candy and had a command line option...

Steve Langasek (vorlon)
affects: grub (Ubuntu) → grub2 (Ubuntu)
Changed in grub2 (Ubuntu):
importance: Undecided → High
Revision history for this message
bwalex (ahornung) wrote :

Manually changing from grub-efi to grub-pc "solves" the issue - in that at least grub works now.

While I do have an EFI "bios", it emulates the classic BIOS behaviour, so I'm not sure why ubuntu outsmarted itself by picking the EFI grub.

Revision history for this message
Colin Watson (cjwatson) wrote :

Is there no /var/log/installer/syslog? It's not in the tarball you attached, and none of the other files are especially useful I'm afraid.

Revision history for this message
Gema Gomez (gema) wrote :

I can see the syslog in the tarball, attached for reference

Gema Gomez (gema)
tags: added: iso-testing precise qa-manual-testing
Revision history for this message
John Johansen (jjohansen) wrote :

I have a machine (x120e) that I have recreated this problem on. Manually installing grub-pc "solves" the issue here as well, as long as the bios is set to emulate classif BIOS behavior.

I am willing to reinstall, and run tests etc, just let me know what if you need anything.

tags: added: rls-mgr-p-tracking
Revision history for this message
Colin Watson (cjwatson) wrote :

I'm afraid I've been unable to reproduce this on my UEFI system. I did an erase-whole-disk install and it just worked (with the exception of some screen corruption at boot).

The only thing I can think of is that a UEFI GRUB core image is somehow trying to find and load BIOS-platform GRUB modules, or vice versa. The output of 'sudo boot_info_script' from http://bootinfoscript.sourceforge.net/ (the boot-info-script package is only version 0.60 which doesn't support UEFI, so please make sure to use at least version 0.61) may be useful in tracking this down.

Changed in grub2 (Ubuntu Precise):
status: Confirmed → Incomplete
Revision history for this message
Gema Gomez (gema) wrote :

Is your install working with UEFI or BIOS? Because the kernel as it is doesn't really support UEFI until we apply the changes from bug 959286.

Revision history for this message
Colin Watson (cjwatson) wrote :

My install was UEFI.

Revision history for this message
John Johansen (jjohansen) wrote :

I haven't been able to replicate again either

I have done i386 and amd64, doing both with a erase-whole-disk, and install along side windows, cycling through the different bios efi options (efi, bios, bios first ..).

About the only thing left to try is installing an older release and then doing a clean install over top

Revision history for this message
Mr. H (thomas-hecker) wrote :

This also effects me. I did a fresh Installation of precise beta2 into an extended partition. After reboot, i get the message "error: unknown filesystem" and the grub rescue console.

Revision history for this message
Gema Gomez (gema) wrote :

Mr. H, any chance you could run the script cjwatson asked for in comment #10?

Thanks!

Revision history for this message
Mr. H (thomas-hecker) wrote :

Attached you find the results from boot-info-script. sda is my hdd, sdb is a ubuntu live stick.

Revision history for this message
Mr. H (thomas-hecker) wrote :

Board is Intel DH55TC, BIOS option "EFI Boot" enabled. This configuration worked without problems with Ubuntu 11.04

Revision history for this message
Mr. H (thomas-hecker) wrote :

Maybe this is related to bug 916299?

Revision history for this message
Colin Watson (cjwatson) wrote :

This log seems to support my previous analysis: a BIOS version of GRUB is installed in the MBR, and it seems likely that the system is trying to boot from that.

Revision history for this message
Colin Watson (cjwatson) wrote :

Mr. H, are you sure you did an EFI install at all? I guess /dev/sda5 might be an EFI System Partition, but it's hard to tell. /var/log/installer/syslog and /var/log/installer/partman would be helpful in determining whether your problem is actually related to this bug at all.

Revision history for this message
Mr. H (thomas-hecker) wrote :
Revision history for this message
Mr. H (thomas-hecker) wrote :
Revision history for this message
Mr. H (thomas-hecker) wrote :

Hi Colin, Were you able to read something out of it?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu Precise) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu Precise):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Mark Stosberg (markstos) wrote :

I had this problem using the official "Dell Recovery Media" for the just-released Haswell Dell XPS 13 with Ubuntu 12.04 pre-installed.

After using the official recovery media, I couldn't boot, receiving the same grub error.

Revision history for this message
JonMarkGo (jonmarkgo) wrote :

I'm having the same issue running the Dell Recovery ISO from here: http://goo.gl/s4Atrh
I am running it from a USB disk on the latest XPS 13, and it gets most of the way through installing and then dies when it gets to the grub install with the error: "The 'grub-efi-amd64-signed' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot."

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.