r/SurfaceLinux • • Dec 16 '15

Problems Installing GRUB on Surface Book

Hey guys.

I just got a Surface Book and had Ubuntu working on it for a bit, but GRUB stopped loading properly (I have no idea why. The system just booted straight into Windows), so I decided to do a reinstall of Ubuntu using a USB. My installation process is simple. I use Disk Management to shrink C:\ and then boot from the USB and choose the first option to install alongside Windows. This whole process worked, but now after the GRUB incident I can't install because I'm getting an error during the installation process.

Unable to install GRUB in /dev/nvme Executing grub-install /dev/nvme failed. This is a fatal error.

I'm hoping you guys have an idea of what's going on. I can't figure out what would be the issue since this was once working. Thanks in advance for the help.

5 Upvotes

8 comments sorted by

2

u/tigerite Dec 16 '15

Did you disable Fast Startup in Windows beforehand?

1

u/magicjammer Dec 16 '15

Yep. Turned off hibernate completely with powercfg.

2

u/tigerite Dec 16 '15

It sounds to me as if the EFI partition has gotten corrupted. Could you try the USB version of rEFInd? The author describes the process in this thread. It seems quite similar to your issue, as the original poster had it working originally, but then it stopped..

1

u/magicjammer Dec 16 '15

Thanks for leading me in the right direction. This is clearly the problem. Even after a full reset, there is still an ubuntu directory under EFI in the EFI partition. That folder is corrupted, as I cannot delete it in Windows. It just lets me know that it's corrupted. I'm now trying to delete it in Ubuntu from a USB, but I cannot seem to do so because it's being presented as a read-only file system when I mount the EFI partition. When I ls that directory, I get an Input/output error. I'm not finding too many sources on how to deal with this type of issue. Everything is in root and rm -rf isn't working. Thanks for the help so far.

2

u/tigerite Dec 16 '15

I'm guessing you've tried efibootmgr and used it to delete that boot entry, and Boot Repair in Ubuntu, but if not those are a good place to start. If you can't mount EFI other than read-only I'm not sure rEFInd will help much, either. But you could download the USB version and try to boot from it anyway, I guess it can't hurt?

2

u/magicjammer Dec 17 '15

I think I now have my system at a working and stable state. I managed to remove that directory using fsck until fsck realized that the only solution was to remove the directory. I was then able to properly reinstall Ubuntu and then boot into it. Problem is that once I booted into Windows (repeatedly booting into Ubuntu worked fine), Windows seemed to somehow corrupt /EFI/ubuntu on the ESP to the state from before. I managed to perform the same fix, but instead I ran Boot Repair before booting into Windows and now everything seems to be working well together. Thanks again for pointing me in the right direction. This was definitely an interesting endeavor.

1

u/NewbieSone Dec 16 '15

I had a problem with grub when I installed Fedora. It turned out the Fedora UEFI it creates doesn't work, but when I boot into "Internal Storage" I do get grub and it creates new, second Fedora UEFI entry at boot that works subsequently.

1

u/jantari Dec 29 '15

Scratch GRUB, use rEFInd.