Comments for Ubuntu + Mac: Pure EFI Boot - The Slightly Disgruntled Scientist
- Ccrunchy2
You're the man! Thanks so much for sharing. It worked wonderfully to make my new and shiny Mac mini 7,1 late 2014 boot Ubuntu 14.04.1 LTS Desktop. One remark though: you missed the step to re-mount /boot/efi before chapter "Installing GRUB".
- JJason Heeris
Good catch! It was right there in my notes, but I overlooked it. Should be fixed now.
- IIn reply toUnknown [DwE4KFYW2]:israel
It would be amazing if the future +mac ISOs would make an HFS partition and 'bless' it
Thanks for this tutorial!! You are rad!- JJason Heeris
I filed bug #1369187 on Launchpad about this, actually. It might be helpful if people who try this on different systems leave a comment there detailing success or failure so the devs know how whether this approach is reliable, and what needs to change for various systems.
- BIn reply toUnknown [DwE4KFYW2]:BMourelo
Only to comment that in some Macs you can install Ubuntu using the EFI partition (vFAT) and Grub, see https://help.ubuntu.com/com...
- JJason Heeris
Is that just for Macs prior to a certain model? Or can you do this on recent models as well?
- AIn reply toUnknown [DwE4KFYW2]:Alex Rodenberg
Unfortunately does not work for 12.04, the grub-install does not have the efi parameters to install on the HFS partition :( and I get /boot/efi doesn't look like an EFI partition.
if just run with that target.- JJason Heeris
grub-install
used to be a shell script, not a compiled binary, and so you could patch in the desired behaviour. Go to Mike Hommey's instructions, do actrl+f
foredit /usr/sbin/grub-install
, and see if those instructions help.I know I did this for 13.10, I have no idea if it'll work for 12.04. Prior to 2012, EFI support even on non-Apple devices was pretty sketchy, so you might be out of luck
:/
.- AAlex Rodenberg
I'm trying my current system install with 14.04 as we speak :) But I will give it a go if I run into problems with 14.04.
- JJason Heeris
Let me know how it goes!
- AAlex Rodenberg
hmm i end up in my initramfs when i write boot at the grub console, and it doesn't go any further at a busybox console..
- AAlex Rodenberg
had to add bootdelay=20 (could probably have used less) on the linux kernel line, I do have a harddisk and not a SSD so dunno if that factors in.
- JJason Heeris
No, the Mac Mini I used had a spinning-platter HDD too. I wonder what could be causing that.
- In reply toAlex Rodenberg⬆:
How did you add the bootdelay? Was it something you did from the grub prompt?
- In reply toJason Heeris⬆:AAlex Rodenberg
thats it, rest of install done according to your instructions working :) Imac 14,4 21,5" model.
- In reply toJason Heeris⬆:
Mike's instructions don't help. I think these methods are outdated. I'm using an Ubuntu MATE 14.04 to try to get a USB stick with a bootable HFS+ partition with Grub in it. I'm stuck right at the point where I'm supposed to "edit /usr/sbin/grub-install, look for xfat" according to his instructions. Well, grub-install is a binary as you said, so no go.
I still think that his and your instructions are missing some crucial steps. I've tried approaching this from the Mac OS X side, and from the Ubuntu side, and I'm stuck.
- B2In reply toUnknown [DwE4KFYW2]:baniowskinet
Great thanks! Your post has saved many hair pulling hours :)
- UIn reply toUnknown [DwE4KFYW2]:Ubuntu
I tried but I am stuck with the step where its trying to install mactel-boot, I am getting message that "mactel-boot not found" please help
- JJason Heeris
Did you add the necessary PPA?
$ sudo add-apt-repository ppa:detly/mactel-utils
$ sudo apt-get update
$ sudo apt-get install mactel-bootFirst two commands ran fine with no errors, but when ran third one it's says not able to find mactel-boot
- JJason Heeris
What version of Ubuntu are you trying to install? Maybe I need to add another series to the PPA.
- JJason Heeris
Ah okay, I'll have to upload new packages for that. I hadn't realised I'd only done it up to 14.04. I'll do it later tonight and ping you again when it's done.
- In reply toUbuntu⬆:JJason Heeris
New packages uploaded for Utopic/14.10 — let me know if it works now!
It's throwing error while running the command add apt repository and after this my wired internet connection also getting off. I am new to u
click to show- In reply toJason Heeris⬆:PPeter R. Wood
Any chance of getting packages for Xenial/16.04?
- JJason Heeris
Should be up now. Let me know if they work, because I don't have a 16.04 system to test them on!
- PPeter R. Wood
Yes, this did work correctly. Thanks!
- In reply toJason Heeris⬆:TThorin Hanson
Any chance we could get Yakkety/16.10? :D
- JJason Heeris
Yes, but I'm travelling ATM, so not until early January
:)
- A3In reply toUnknown [DwE4KFYW2]:a_big_noob
This is a great walk-through of a process I'm currently attempting with an early 2009 Mac Mini that stopped properly booting up after the OS X update a couple months ago.
Unfortunately, I get stuck pretty much right at the very beginning! When I boot from the USB I've created and select to install Ubuntu, my display "wigs out" and becomes totally unreadable/unusable. For some reason, it seems the Linux installer doesn't play well with my broken version of OS X. I've tried multiple different versions of multiple different distros and so far, no luck.
Currently, I'm reinstalling OS X to see if I can at least get that running. Then I'm going to follow this to a T.
- JJason Heeris
Another option might be to wipe the disk and use the server installer (which only needs console graphics).
- A3a_big_noob
It looks like that's how I'm able to use the text-based installer, so I'm guessing you're right. But I may not be knowledgable enough to make that work. This is only the second computer I've ever installed Linux on, and I'm by no means a "computer guy." Just someone bored with extra hardware lying around.
Of course I'll try, though! Thanks for the recommendation.
- A4In reply toUnknown [DwE4KFYW2]:asterix
Great Job, Jason !!!
I had only a error when i try this command:
$ sudo grub-install --target x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi --bootloader-id="$(lsb_release -ds)"
Show me a not possible to found a grub unity to /dev/sda1. Verify your device map.any sugestions?
- JJason Heeris
From reading some forum posts about this, I'd guess that a good first bet would be: reboot and try reinstalling grub again.
Failing that, I'd need some more information, eg. the output of
fdisk -l
and the contents of/etc/fstab
.
- J2In reply toUnknown [DwE4KFYW2]:Justin Time
What would you recommend to *double-boot* a Mac with the choice of OS X or Ubuntu at startup? As you said, the most elegant way is what I am looking for as well.
- JJason Heeris
I've tried a variant of this approach for dual booting on a Mac Mini server (two hard drives). I put OS X on the first drive, and did a normal Ubuntu EFI install on the second drive ie. I had two EFI partitions after that (
/dev/sda1
and/dev/sdb1
). GRUB was installed on/dev/sdb1
. Oddly enough, the one for OS X was vfat, and the Mac bootloader sees that fine; it didn't see the Ubuntu one.I then followed the instructions here for the Ubuntu EFI partition (leaving the OS X EFI partition alone) ie. converted it to HFS+, added the
mach_kernel
files etc. Then Ubuntu showed up in the Mac bootloader.The one problem I've been unable to solve is getting Ubuntu to boot by default. No matter what
efibootmgr
commands I run, I cannot get the Mac bootloader to boot Ubuntu by default. I'm still trying to figure that out.If you don't have two hard drives, I think as long as you (a) resize your OS X partition so there's some empty space at the end, and (b) carefully check the partitions that the Ubuntu installer wants to create, you should be fine.
- J2Justin Time
Thanks for clarifying this! This is helpful information because for day-to-day operation, the ideal way for me is a default boot option which sticks until I deliberately choose the other one. grub has this with their DEFAULT=saved / GRUB_SAVEDEFAULT=true options, rEFInd has it automatically.
My macmini has two disks, but from my perspective, two EFI partitions complicate things. I want one EFI partition on the system SSD to boot either OS X or Ubuntu from a partition of the SSD. Choosing with the option key at bootup is fine. From what you write, this should be feasible just with the mac bootloader.
- JJason Heeris
Just be warned: I actually tried to do this with a single EFI partition too (ie. mounting
/dev/sda1
as/boot/efi
and installing GRUB), but I couldn't get it to work. Let me know if you figure out how!
- OIn reply toUnknown [DwE4KFYW2]:obrientimothya
+1 here - fantastic stuff! Thanks Jason :-)