Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Ubuntu 15.04 on Mac Mini 2,1 with EFI boot (2007 Intel)

  1. #1
    Join Date
    Apr 2006
    Location
    Leeds, UK
    Beans
    29
    Distro
    Ubuntu 8.04 Hardy Heron

    Exclamation Ubuntu 15.04 on Mac Mini 2,1 with EFI boot (2007 Intel)

    I am posting this for the benefit of the community, in case it helps someone else along the way. I've had some problems getting Linux to install or even boot on this machine. At some point I did manage to install a version of Ubuntu Server (I think it was 12.04) alongside Mac OS X, booting in BIOS emulation mode, using rEFInd. However that install never worked correctly to my satisfaction. Requiring the use of the Mini as a server once more, I turned to the challenge of installing 15.04 Server, single-boot (no OS X), in pure EFI mode, using only the Mac EFI boot loader.

    The technical background is available at the rEFInd Boot Manager site.

    The guide which I followed and which, with a few tweaks, got me up and running, is by Jason Heeris.

    On my Mac, I started with a reasonably fresh but basic install of OS X 10.5 with the rEFInd boot manager installed.

    I downloaded the Ubuntu Server 15.04 server ISO and then created a bootable USB drive on my Windows 8.1 laptop with Rufus for Windows (although I suspect the Universal USB Installer on Windows and the Startup Disk Creator on Ubuntu would have worked as well).

    I soon realised (by repeated attempts) that I was never going to be able to boot the USB either via the Mac boot manager or rEFInd.

    The first thing to note about the Mac Mini 2,1 is that while it has an x64 processor (Core 2 Duo), it has a 32-bit EFI implementation. It took me a while to figure this out but once I did, I then knew what I need to do to get the Ubuntu Server installer to boot.

    I found an article by sturmflut detailing how to install Ubuntu on BayTrail tablets, which apparently also have a 32-bit EFI. Specifically, it talks about downloading a 32-bit bootia32.efi (for GRUB). This file is necessary because the Ubuntu installer only supports booting GRUB in EFI mode for 64-bit EFI implementations.

    After reading this, I did the following:

    1. Removed rEFInd from my Mac so it booted only using the Mac boot loader.
    2. Downloaded the bootable CD image of rEFInd from here and used Rufus (on Windows) to create a second bootable USB stick.
    3. Downloaded the bootia32.efi from John Wells.
    4. Placed the bootia32.efi in the /EFI/BOOT folder on the Ubuntu Server installer USB stick.
    5. Placed both USB sticks in the Mac, rebooted it, held down the ALT key on my keyboard to bring up the Mac boot manager, clicked "EFI Boot" which was the rEFInd boot image and rEFInd loaded. I then selected the option which included the words "bootia32.efi" in the options (it was an Ubuntu graphic) and selected it. The Ubuntu Installer USB stick then booted, presenting the GRUB menu, from which I could select "Install Ubuntu Server".
    6. I then installed Ubuntu server to the internal hard drive, using the partitioning option "Guided - use entire disk", which blew away the existing OS X install. At the end when it tries to install GRUB to /dev/sda, this failed (no matter, it would be re-installed later).

    I then manually booted using the same process as before with the rEFInd USB stick, broadly following Jason Heeris' guide.

    When I got to this line on installing extra packages:

    Code:
    sudo apt-get install mactel-boot hfsprogs gdisk grub-efi-amd64
    I instead ran:

    Code:
    sudo apt-get install mactel-boot hfsprogs gdisk grub-efi-ia32
    When I got to this line on installing grub:

    Code:
    sudo grub-install --target x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi --bootloader-id="$(lsb_release -ds)"
    I instead ran:

    Code:
    sudo grub-install --target i386-efi --boot-directory=/boot --efi-directory=/boot/efi --bootloader-id="$(lsb_release -ds)"
    sudo update-grub
    The second line is necessary to actually add the boot menu entries. Not sure why it was not required by Jason Heeris, possibly because his GRUB installed during the installation successfully?

    I then rebooted and my system booted straight into Ubuntu Server 15.04, in pure EFI mode. The system appears to be more stable than my last installation and will reboot headless (which the the 12.04 installation wouldn't).

    I have one outstanding issue (unrelated to the install) which I will post in another thread.

    This process should work on any Intel Mac which has a 64-bit processor and a 32-bit EFI (and for any variant, Desktop, Kubuntu, etc).

    Happy to answer any questions!

    Regards

  2. #2
    Join Date
    Jan 2016
    Beans
    2

    Re: Ubuntu 15.04 on Mac Mini 2,1 with EFI boot (2007 Intel)

    In addition to the above procedure, I had only a problem when at a certain point in Jason Heeris explanation you need in GRUB to start-up using the UUID of the just created boot partition - how to obtain that UUID.

    After some googling I found the response of terminator14 from which I copy the essential part below:
    I suppose the other option is to just run it without the 'root=' part, instead adding 'break' to the kernel like so:

    Code:
        set root=(hd0,msdos1)
        linux /boot/vmlinuz... break
        initrd /boot/initrd...
        boot
    This will stop the boot process at an initrd shell, at which point you can use:

    Code:
    ls /dev/sd*
    to see the available partitions, and mount them to a temp directory to see which is the right one. Once you find the right one, you can also use:

    Code:
    ls -l /dev/disk/by-uuid/
    to find the disk's UUID if you are concerned that the device name might change after a reboot, which you will have to do to get back to the grub menu.

  3. #3
    Join Date
    Jan 2016
    Beans
    2

    Re: Ubuntu 15.04 on Mac Mini 2,1 with EFI boot (2007 Intel)

    In addition - I have tested the procedure with linux mint 17.3 and that works as well - note that linux mint does not have the signed EFI vmlinuz executable, but that was no problem.

  4. #4
    Join Date
    Apr 2006
    Location
    Leeds, UK
    Beans
    29
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Ubuntu 15.04 on Mac Mini 2,1 with EFI boot (2007 Intel)

    As I recall, I didn't bother with that step regarding the UUID in the initial manual boot of grub. I have only one disk in my machine so I just used "root=/dev/sda2" as a kernel parameter. Of course my /etc/fstab has the UUIDs for the filesystems but I seem to think Ubuntu entered those correctly anyway.

  5. #5
    Join Date
    Jun 2016
    Beans
    15

    Re: Ubuntu 15.04 on Mac Mini 2,1 with EFI boot (2007 Intel)

    Quote Originally Posted by bench View Post
    4. Placed the bootia32.efi in the /EFI/BOOT folder on the Ubuntu Server installer USB stick.
    I'm trying to install Ubuntu on my Mac mini 1,1. I'm building the necessary boot/install USB sticks on a Macbook 4,1 which is already running Debian, and when I try to do the above step on this machine, I'm not able to write to the USB stick - it tells me that it's read-only, which I'm assuming is because it was formatted using an ISO. Did you have to do anything special to make the USB stick writable?

  6. #6
    Join Date
    Jul 2016
    Beans
    2

    Re: Ubuntu 15.04 on Mac Mini 2,1 with EFI boot (2007 Intel)

    Hi,
    I installed it succesfully and it kinda works now. I'm not sure what exactly is wrong, but the video performance sometimes is very good, but other times it just stands still with nothing happening. I don't understand what went wrong. Can somebody help me out? I think it has something to do with the video drivers, but I don't know how to check since 'Additional Drivers' is nowhere to be found. I btw have the same model as you do, but I'm using elementary os, since it has a lot in common with Ubuntu and it looks so good.

  7. #7
    Join Date
    Jan 2017
    Beans
    3

    Re: Ubuntu 15.04 on Mac Mini 2,1 with EFI boot (2007 Intel)

    The Ubuntu installer ISO is slightly non-standard so it doesn't mount cleanly on OSX or Ubuntu. I found that OSX would flatly refuse to mount it, and Ubuntu would mount it read-only.

    The workaround is to create a new ISO from the base Debian ISO, plus the extra file bootia32.efi in /EFI/BOOT, and then write the new ISO to a USB drive.

    I used ISO Master on Ubuntu (inside Parallels on my Mac) to add the file and create the new ISO, but there might be other apps out there.

  8. #8
    Join Date
    Jan 2017
    Beans
    3

    Re: Ubuntu 15.04 on Mac Mini 2,1 with EFI boot (2007 Intel)

    Very helpful guide, worked a treat on my 2007 MacMini 2,1. Thank you!

  9. #9
    Join Date
    Apr 2015
    Beans
    62

    Re: Ubuntu 15.04 on Mac Mini 2,1 with EFI boot (2007 Intel)

    A few months back I used this little guide to install 16.04 Server on my macpro 1,1 and it has worked like a charm. Even openvswitch with DPDK hums along on an 11 year old machine!

    I upgraded today to 17.04 (via 16.10) and the upgrade went fine, but I can only boot with the 4.4 kernel. The 4.10 kernel gets to the point where it loads the initrd and then the screen blanks and the keyboard locks up.

    The only obvious difference is that the new kernel boot scripts default to the signed version. Macs don't need secure boot, so I adjusted the boot setting in grub to boot the ordinary kernel, but no joy.

    Is anybody with a 32bit EFI mac able to run a kernel above 4.4?

    SORTED: I added "noefi" to my kernel boot parameters and I'm running 4.10.
    Last edited by kevin160; May 23rd, 2017 at 08:02 AM. Reason: fixed my problem!

  10. #10
    Join Date
    Apr 2006
    Location
    Leeds, UK
    Beans
    29
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Ubuntu 15.04 on Mac Mini 2,1 with EFI boot (2007 Intel)

    @kevin160, thanks for this information. I am currently running the same installation as I detailed above 2 years ago, but I have upgraded through to 16.10. I think I will hold off upgrading to 17.04 for the time being and do some research into this, seems it maybe a bug - the noefi parameter has been around a long time but has never been necessary before.

    Would you mind sharing any source information which pointed you to this kernel parameter?

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •