grub fails to install. x86_64-efi system Windows 8.1 primary

Bug #1462676 reported by d3bug
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub-installer (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Ubuntu 15.04 x86_64

Windows 8.1 is my primary OS. I tried to install Ubuntu along side Windows. I created 2 partitions (swap and / [ext4]). Install goes flawlessly till it gets to grub. Grub tries to install and fails. No error #, etc. The system is a DELL with: AMD A10-5745M APU with Radeon(tm) HD Graphics (Gallium 0.4 on AMD ARUBA).

DELL Model #: Inspiron M731R (5735, Late 2013)
RAM: 8gb (6.9 usable)

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: ubiquity 2.21.25
ProcVersionSignature: Ubuntu 3.19.0-15.15-generic 3.19.3
Uname: Linux 3.19.0-15-generic x86_64
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CasperVersion: 1.360
Date: Sat Jun 6 16:22:32 2015
InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed cdrom-detect/try-usb=true noprompt floppy.allowed_drive_mask=0 ignore_uuid boot=casper quiet splash ---
LiveMediaBuild: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: grub-installer
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
d3bug (therealcyrano) wrote :
Revision history for this message
Phillip Susi (psusi) wrote :

Your EFI system partition is corrupt. You will need to repair it with dosfsck in linux or chkdsk in windows.

Changed in grub-installer (Ubuntu):
status: New → Invalid
Revision history for this message
d3bug (therealcyrano) wrote :

Actually, it's not corrupt. I discovered the problem. Apparently grub will not install to the MBR of an EFI system. I discovered this purely by accident as I found this information absolutely nowhere. It will however install to the Windows EFI partition. So I solved my own problem. Someone might want to update the installer so that if it is running in EFI, it should automatically choose the existing EFI partition to install to as default instead of the MBR of the HDD (which will always fail).

Revision history for this message
Phillip Susi (psusi) wrote :

That is exactly what it does. The reason it failed is because your EFI system partition was corrupt, so it could not write the files there.

Revision history for this message
d3bug (therealcyrano) wrote :

No... you are not listening. The reason it failed is because it tried to install to /dev/sda instead of /dev/sda1. Aparently in an EFI system that does not work. If my EFI partition was corrupt, I would not have been able to boot into Windows either. The moment I realized what it was doing, I pointed it to /dev/sda1 specifically (which it should have known to do as it was running on an EFI system) then it worked. I don't know how many other ways to explain this.

That is why I wrote that perhaps, the writers of the installer script should take into account an EFI system and maybe have it look for the EFI system partition instead of always defaulting to the MBR instead. That was just a friendly suggestion.

Revision history for this message
Phillip Susi (psusi) wrote :

No, it didn't. From your syslog:

Jun 6 20:21:36 ubuntu ubiquity: grub-install: error: cannot open `/boot/efi/EFI/ubuntu/shimx64.efi': Input/output error.
Jun 6 20:21:36 ubuntu kernel: [ 921.974168] FAT-fs (sda1): Corrupted directory (i_pos 133127)

It wasn't so corrupt that it couldn't be read, but enough that a new file could not be written.

The EFI version of grub completely ignores the destination argument. You can tell it to install to /usr/bin and it it will work just fine, provided that it can write to /boot/EFI.

Revision history for this message
d3bug (therealcyrano) wrote :

Well, then it somehow corrected itself through no intervention on my part other than to specify /dev/sda1
I guess my DELL is possessed like Christine.

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.