i'm not the first one with this kind of problem, but my specific nuance, i did not yet encounter: i have a 2014 macbook pro with os x plus a windows 10 bootcamp partition. now i wanted to have a look at ubuntu and managed to install that on an sd-card. all that worked, but the situation i have now is:
- if i start without the sd-card inserted and option pressed, i can choose between os x and windows. loading os x works, loading windows does not and results in a grub prompt.
- if i start with the ubuntu sd-card inserted and option pressed, i get all three options. again, os x works and windows fails, but this time with a grub error message. choosing ubuntu successfully starts grub and gives me the option of booting either ubuntu or windows: which both work.
from my understanding (which might be wrong), part of grub ended up on the windows (or efi??) partition, the rest with the actual configuration on the external ubuntu sd-card. is there any way to move this second part to the windows partition? so i can still start windows without this external sd card? in an ideal world, i would just get rid of grub and use the apple bootloader for all of this, but i assume this is not a possibility, is it?
Best Answer
You can setup a grubless boot of Ubuntu which can be executed by the Mac boot loader, however the Mac Startup Manager will not detect such an arrangement. You would have to use a different boot manager such as rEFInd.
Another solution would be to install grub entirely on the SD card, leaving the EFI partition on the internal drive use by Windows. Or, create a second EFI partition on the internal drive, so the grub and Windows boot files will not overlap.
Moving Grub Boot Files to the SD Card
When installing Ubuntu on the SD card, an EFI partition should be created on this card. The Grub boot files should be installed in the EFI partition. The However, the Ubuntu installation software will install the Grub boot files on internal drive EFI partition instead. Below are instructions for moving these files to the EFI partition on the SD card.
Boot to Ubuntu.
Turn off automatic updates. Open "Software & Updates" and set "Automatically check for Updates:" to
Never
. See the image below.Open a Terminal window.
Verify the first partition on the SD Card is FAT formatted. Enter following command.
If the
TYPE
is not equal tovfat
, then the first partition on the SD card is not an EFI Partition. IfTYPE
is equal tovfat
, then record theUUID
value and proceed with these instructions.Move the Grub boot files to the SD Card. Enter the following commands.
Update the
/etc/fstab
file so Ubuntu will know the new location of the Grub boot files. Enter the following command.Find the line with the mount point
/boot/efi
. Replace theUUID
value on this line with with the value recorded in step 4. Exit the editor and save the change.The installation of Ubuntu replaced the
bootx64
file that was first created by the Boot Camp installation. The following commands rectify this replacement. (Thebootx64.efi
andbootmgfw.efi
files used by Windows are the same.)Restart the Mac and boot back to Ubuntu.
If necessary, restore automatic updates to the previous setting.