I recently decided to move install Xubuntu on my desktop, having gotten fed up of Arch Linux. Arch Linux will make it’s return, but I was having too much trouble with the AMD legacy drivers. When I’ve upgraded my graphics card (hint – for one that doesn’t have shit linux support), I’ll move back.
In the meantime, I had some problems with Grub.
To begin with, the install did not recognise my Windows partitions at all, but I could still boot from the EFI menu to Windows. I would rather have grub though, instead of having to hammer away at the F8 key on every cold boot.
According to the Ubuntu page about UEFI, you should use boot-repair.
I used boot repair, and the output from it can be found here.
This updated grub, found the Windows partition, and added Windows as an option (actually 2 options for Windows. Don’t know why, but there are multiple EFI files for Windows on the EFI partition).
I got this error:
error: no such file or device: 16E0-4903 error: no such file or device: 16E0-4903 error: file '/EFI/Microsoft/Boot/bootmgfw.efi' not found Press any key to continue |
The grub entry for Windows looked like this:
menuentry "Windows 7" { search --fs-uuid --no-floppy --set=root 16E0-4903 chainloader (${root})/EFI/Microsoft/Boot/bkpbootmgfw.efi } |
I checked the EFI partition, and sure enough the file is there. I checked the UUID of sda1 (the EFI partition), and it was correct.
I tried to fix it myself, by using the hard drive name instead of the UUID, but that gave errors about partition type.
Turned out I needed to add this:
menuentry "Windows 7" { insmod part_gpt search --fs-uuid --no-floppy --set=root 16E0-4903 chainloader (${root})/EFI/Microsoft/Boot/bkpbootmgfw.efi } |
I found the information here.
I don’t know why that line wasn’t added, but there we are.