[Bug 1369187] Re: Installation on Macs could use EFI booting instead of legacy BIOS

Jack Howarth 1369187 at bugs.launchpad.net
Sat Dec 17 04:54:29 UTC 2016


Tested on a fresh install of Ubuntu 16.10 x86_64 by...

gcc -o disable_journal disable_journal.c
chmod ugo+x update-efi-booter 
install disable_journal update-efi-booter /usr/local/bin

identify the device that the /boot/efi partition is mounted on, umount
it and then use gdisk to delete that partition and create a new one with
the code AF00 for HFS+. Write the changes out in gdisk and then execute
mkfs.hfsplus on the device to format it. Now change the boot/efi entry
in fstab to have 'hfsplus defaults', remount the boot/efi partition and
just execute the 'update-efi-booter' script.

Afterwards the /boot/efi subdirectory will contain...
# cd /boot/efi/      
# ls -lR .
.:
total 4
-rw-r--r-- 1 root root 34 Dec 16 23:04 mach_kernel
drwxr-xr-x 1 root root  3 Dec 16 23:04 System

./System:
total 0
drwxr-xr-x 1 root root 3 Dec 16 23:04 Library

./System/Library:
total 0
drwxr-xr-x 1 root root 4 Dec 16 23:04 CoreServices

./System/Library/CoreServices:
total 1968
-rw-r--r-- 1 root root 2009088 Dec 16 23:04 boot.efi
-rw-r--r-- 1 root root     380 Dec 16 23:04 SystemVersion.plist

and where the boot.efi is now blessed on a HFS+ filesystem. This allows
the option key boot selector on Macs to display the Ubuntu operating
system with a customized icon. Thus rEFind is no longer needed to be
able to switch between other installed OS releases.

** Attachment added: "Final copy of the update-efi-booter with all known bugs fixed"
   https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1369187/+attachment/4792576/+files/update-efi-booter_GM

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to debian-installer in Ubuntu.
https://bugs.launchpad.net/bugs/1369187

Title:
  Installation on Macs could use EFI booting instead of legacy BIOS

Status in debian-installer package in Ubuntu:
  Confirmed
Status in ubiquity package in Ubuntu:
  Confirmed

Bug description:
  I recently installed Ubuntu 14.04.1 LTS (Trusty) on my Mac Mini 6,1
  using the server installer. First I tried the "+mac" variant, which
  gave me a system that booted in legacy BIOS mode, and then then I
  tried the normal variant, which gave me an unbootable system.

  I eventually got the EFI installation working, resulting in an Ubuntu
  installation that boots directly from the Mac bootloader firmware (ie.
  no rEFInd/rEFIt). The basic steps are to use an HFS+ filesystem
  instead of VFAT for the EFI partition, to "bless" the EFI boot image,
  and to create a couple of files that the Mac bootloader requires.

  I wrote the full procedure up as a guide:

  http://heeris.id.au/2014/ubuntu-plus-mac-pure-efi-boot/

  While my guide only covers single-boot into Ubuntu on a Mac Mini, I
  hope there's enough detail there to illustrate what's needed for a
  more general case.

  Note that grub-efi-amd64 already does the right thing (except for
  Debian bug #716927 [1]). The only tool that isn't already in the repos
  is the mactel-boot utility (aka. hfsbless), which I've made available
  in my PPA[2] (see also the Github repo[3], which has the Ubuntu
  packaging metadata in various branches, and is git-buildpackage
  friendly).

  So it should be possible to install Ubuntu in EFI mode on Macs. This
  would reduce the options presented to a user when downloading the
  installer, and result in a more consistent experience for users across
  Windows and Mac.

  [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=716927#20
  [2] https://launchpad.net/~detly/+archive/ubuntu/mactel-utils
  [3] https://github.com/detly/mactel-boot

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/1369187/+subscriptions



More information about the foundations-bugs mailing list