How to install Linux on a Macintosh

Got one of those shiny Mac laptops, but Linux has you realising computer freedom is best?

This is the definitive guide!

Using a Macintosh is (mainly) a delight. The hardware is solid, fast, and beautiful, but over time, macOS has become dumbed down and in some places, downright silly. I long since realised that I could do exactly what I wanted to do with my macbook with Linux, rather than being encumbered by having to follow the ‘Apple’ way of doing things. I never looked back. Here’s the definitive guide to installing Linux on a Mac.

[Update: This article has been on this site since 2015, but it’s still a very popular article, so I’ve updated it a little for 2017, hope you find it useful. If you have any other changes you think should be made, let me know in the comments!]

NOTE: This is an advanced tutorial which works at the command line and can cause irreparable damage to your data. If you are a novice, it is not recommended that you undertake this tutorial. If you do proceed, make sure you have backed everything up with TimeMachine or such like tools. I must also acknowledge the awesome work of Jessie Frazelle, her blog entitled ‘Linux or Death’ was the inspiration for this article, and much of it is cribbed from there, simply because it worked, unlike any other blog on the subject we found on the interwebs!

This tutorial has been tested on a late 2013 Macbook Pro Retina 15″, however it should work with any EFI based Mac (more on that in a bit). The EFI based Macintosh started around 2008 (you can check the list of the Apple EFI systems here). This should include Macbook Pros, Macbook Air, iMac and probably Mac Pro’s…

Step 1: Dual Booting with Mac OS (yes, you can keep MacOS!)

I am also working on the basis that you want to keep Mac OS X on your hard drive and that you wish to dual-boot it at any time. You should have plenty of free space on your disk drive (the more the better), so either delete some cruft or move some of your old data onto a separate external archive hard drive (because I know you got one or ten of them lying around!).

Finally, we used Mac OS X 10.11.1, ‘El Capitan’, which is the latest OS X at the time of the release. El Capitan introduced a ‘security feature’ called ‘SIP’ (System Integrity Protection) which you will additionally have to overcome if you are using El Capitan or newer. More on that in a bit. We will be installing Ubuntu. Originally this tutorial was written with Ubuntu GNOME 15.10, but this should apply to any Linux distro (including Ubuntu 17.04 and later) more or less, although your mileage may vary with Video stuff particularly.

The tutorial you are about to read has six main sections. These are:

  • Installing the EFI boot manager
  • Downloading and converting your Linux distro of choice
  • Partitioning your hard drive
  • Installing Linux
  • Finishing up and nice to have items, including being able to see your Macintosh files from Linux.

Installing the EFI boot manager

EFI stands for Extensible Firmware Interface and is now pretty much commonplace in Macs and PCs across the industry. It replaced the trusty old BIOS system that PCs had used since the 1980s. Installing Linux on a BIOS based machine was trivial, but now with Apple’s take on EFI on their customised hardware, it can be a little challenging. No worries, this is the Ultimate Linux Newbie Guide. We got this!

Disabling SIP

Before we go ahead and install rEFInd, we will need to take care of that pesky SIP (System Integrity Protection) rubbish. There are a couple of ways to do this, but we found the easiest way to do so, is pop your system into recovery mode and issue a command from the terminal there. There is a bit more information on this process over here.

To enter recovery mode on your Macintosh, shut your machine down completely. Give the machine around 30 seconds and then switch back on. Now quickly hold down the Command and R key at the same time until at least you hear the Apple ‘chime’ sound. Shortly you will enter recovery mode. I recommend plugging in an Ethernet cable to do this, however it is possible to do with WiFi.

Once you are in the Recovery tool, enter the Utilities menu up on the top bar, and click on Terminal.

Issue the following command:

csrutil disable

That’s it! Restart your computer and you are done. If you ever want to re-enable the SIP functionality (why?), then you can transpose disable with enable using the same steps.

Now you should head back to the terminal. We are ready to install refind!

Download rEFInd

The red circle indicates where to download rEFInd

The red circle indicates where to download rEFInd

rEFInd is a boot-loader for EFI based machines. Think of it like bootcamp, or GRUB for GRUB 🙂 You’ll want to download rEFInd from the rEFInd website:

Now, if you take a look around the rEFInd website, you’ll see it looks like the guy that wrote it believes in punishing everyone that wants to use it. It took us about 20 minutes just to find the frigging download link! So the ULNG has taken the time to go through all the pertinent steps to make it shit tons easier for you!

The version of rEFInd that we used is 0.10.0, and we used the zip archive version. Once you download the binary, you are going to need to start the rest of your work from the Terminal, so open up the Terminal from the Utilities folder on your Macintosh and head over to your Downloads folder where you saved rEFInd to.

If the zip archive is not already unzipped, unzip it using the unzip command and head into the newly created refind-bin-0.10.0 folder:

$unzip refind-bin-0.10.0.zip

$cd refind-bin-0.10.0

We now want to install rEFInd, and we should install all the EFI drivers just in case we need them at any time. rEFInd 0.10.0 offers a substantially more improved installer than previous versions. Which is nice 🙂

$sudo ./refind-install --alldrivers

Now it’s time to edit the EFI config file, but you will need to mount that hidden EFI partition first. Thankfully, rEFInd has a little tool you can use to mount the partition:

$sudo mountesp

Edit /Volumes/ESP/EFI/refind/refind.conf. Like us, you may find the refind.conf file is in /Volumes/ESP/EFI/BOOT, instead of a folder called refind. This is probably because we fiddled around with rEFInd and it’s predecessor, rEFIt before. Just because.

$sudo nano /Volumes/ESP/EFI/refind/refind.conf (or use vi like me, if you are that way inclined. Just not emacs!).

locate the line that says scanfor and edit it to say:

scanfor internal

If no such line exists, add it into the file near the top.

Next, change the config file to load the appropriate Linux file system driver. Check for a line that starts fs0. If no such line exists, add it as below, otherwise edit it:

fs0: load ext4_x64.efi

fs0: map -r

Save the file and quit your editor. That’s pretty much it for the rEFInd bit. That is the hardest part over and done with. If you want to be sure it worked, you should power off your machine and power on again. If you see a grey screen with the rEFInd logo, then it has worked. You should be able to chose the Mac OS X logo and hit return to start up OS X again.

Step 2: Downloading and converting your Linux distro image of choice

Installing Linux on a Macintosh via USB stickNext, unless you haven’t already downloaded the iso image of your choice, it’s time to go grab it. For this particular demonstration, we are using Ubuntu, however most other Linux distributions should work. Using more hard-ass systems like Arch or Slackware, or even Debian, will be more challenging. This is challenging enough, so do what you will, but we will stick to the easier distros for now!

Make sure you download the x64 version of the distribution you choose, if there is an EFI boot version, choose that also.

Converting the ISO image to something your Macintosh recognises

Next, you need to convert the iso file into an image file that Mac OS X recognizes so that you can stick it on a USB stick to boot from. Although you are back at the terminal for this, thankfully it’s not that onerous a task.

cd (directory where you downloaded the distro to)

hdiutil convert -format UDRW -o <<filename you want.iso.img>> <<filename of the download.iso>>

(so, in other words, hdiutil convert -format UDRW -o ubuntu1704.iso.img ubuntu-gnome-17.04-desktop-amd64.iso would convert the latter file into ubuntu1704.iso.img, which would be in the RAW, or more specifically UDRW format).

Mac OS likes to rename the file with a .dmg extension, to avoid confusion over that, it’s probably best that you rename it. A simple mv command will sort that one:

mv ubuntu1704.iso.img.dmg ubuntu1704.iso.img

(renames the file ubuntu1704.iso.img.dmg to ubuntu1704.iso.img).

Next, quickly type in diskutil list in the terminal. It should list one disk drive (if you have any external drives connected, disconnect them for now). Take a note of your Mac OS disk. It should be called /dev/disk0. Look for tell tale signs in there like ‘Macintosh HD’

Next, locate that USB stick of yours and whap it into the usb port. Please note that you want to have an empty USB stick, because this process will destroy any existing data on it.

Once you have the USB stick plugged in and all settled down, issue the following command:

diskutil list

Write Linux ISO to USB stickYou should see a list of disks like the one in the screenshot to the left. Note the red box around /dev/disk2. You can see that it has a Windows FAT32 partition, our usb stick is 8 GB big, you can see the size there is 8.1GB, which is clearly much smaller than the main hard drive, which is 500GB in size. Just make sure you identify which disk your usb stick is and take a note of that. The one we are using is /dev/disk2.

RELATED:   Ubuntu Budgie 17.04 Install and Overview / Review Video

Now you need to unmount the usb disk, to do that issue the following command

diskutil unmountDisk /dev/disk2

Obviously if your USB stick is not disk2 then change it to suit. It should tell you that the unmount of all volumes on the disk were successful. Now all we have to do is copy the UDRW version of the iso image to your USB stick. For that, we will use trusty old dd 🙂

sudo dd if=ubuntu1704.iso.img of=/dev/rdisk2 bs=1m

Things you have to be aware of here

  1. This is a fully destructive command. It will blow up any disk you point it to, that’s why we made sure you got the note of that USB stick in diskutil list, above.
  2. if= is short for input file, meaning the input file is the name of the iso file you converted into the iso.img file. We are using the shortened filename here just for an example filename.
  3. of= is short for output file. The output file, is in fact a device. In this case, we are using (r)disk2; disk2 obviously is the drive we noted earlier, we use the r in front of it because that allows raw device access, so its marginally quicker.
  4. bs=1m means block size, 1 megabyte. You don’t have to use this option, however it will significantly increase the speed of the transfer to your USB stick.

Mac OS is going to bitch and moan that you have a volume it can’t read inserted. If it says Eject, click that, otherwise type diskutil eject /dev/disk2.

Step 3: Partitioning your Macintosh hard drive

This part chops your disk up in the way you want it. Back in the bad old days of Linux, you used to have to download a partition manager and use that to resize your disk. These days, that’s mainly gone, but because of Journaled, Encrypted HFS+ partitions, that’s not a good idea to let a Linux based partition manager loose with, unless you want to toast your Mac OS data.

Using Disk Utility to resize your Macintosh OS X hard drive partition for Linux

Using Disk Utility to resize your Macintosh OS X hard drive partition for Linux

Thankfully, this can easily be solved. In your Utilities apps folder, you’ll find Disk Utility. If you like, quickly scan your hard drive for errors, just to make sure it’s all toot sweet before we get down to business. Repair any errors you may have.

Once you are ready, you will see a list of internal drives on the left hand side. Your Disk Utility may look different if you are using an older version of OS X, but it still offers the ability to resize a volume.

On the hard drive that your Mac OS X partition exists on, click on the top drive, not any subsequent partitions listed below it. Click on the ‘partition’ button, and you’ll see a pie chart like the one above (don’t worry if it’s not quite like that). You will see you can move the slider around the pie to resize your partition(s). Pull the size slider back for the Mac OS partition to release the free space on the disk. Make a blank partition until you have enough space for your new Linux system. As much space as you are willing to.

Apply the changes and let the resize operation complete. If you have an SSD, this should be relatively quick (a few minutes).

Step 4: Installing Linux on that Macintosh!

Woo-hoo! This is the fun part! Now we get to install the operating system that your Macintosh has been longing for. All hail Linux on a Macintosh!

Thunderbolt to USB Adapter - Apple

Using a USB or Thunderbolt Ethernet Adapter is going to save you a lot of headaches!

Switch your Macintosh off completely. Connect your Ethernet to Thunderbolt adapter (or USB Ethernet Adapter) and your USB drive we made earlier. If you don’t have one of those ethernet adapters, life is going to be tricky for you, you are going to have to download the wireless drivers and install them manually to get things working. If you don’t have one of the adapters, ask a friend for one, or buy one cheap from Ebay or such like. It will save your sanity.

Turn on your computer and hold down the option/alt key. You’ll see a menu pop up which you can see your Macintosh HD as well as the USB stick (it’s a yellow looking drive thing). It will be named EFI or something similar. Use the cursor keys to select that and hit return. PS: if you are having issues with your bluetooth keyboard at this point, make sure you revert to using your laptop’s keyboard and mouse for the time being.

At the step where you have to choose the partition and you are using the Ubuntu style installer, select ‘Something else’ from the options around partitioning. Locate the empty partition you made and create 2 partitions out of it. Make a big partition and a small partition (roughly 8-16 GB in size). The big partition should be the remainder of the free space. The big partition should be ext4 in type, and should be formatted with the mount point of “/”. The small partition should be formatted as swap.

Press next and let the good times roll. Everything else should be pretty normal.

Once the install has finished, restart the computer, no need to hold down alt/option this time. All going well, you should be seeing the rEFInd menu. Use the cursor key to select your Linux installation and hit that return key. Fingers crossed, your system will start up without much of a hitch!

Notably though, you probably won’t have a few things that work out of the box. Most of these can be covered off on the next section.

Nice to have items

Wifi.

Some lucky people will experience that their WiFi works straight out of the box. For most of us, we are going to need to install the drivers for it, because Apple do weird things with their hardware. Many Apple users these days will find this a bit of a conundrum, since most macbooks don’t come with ethernet ports any more. As noted earlier, the easiest solution by far is to plug a USB Ethernet dongle into your Macintosh. If you don’t have one, I recommend you buy or borrow one, however you can head over to the Ubuntu packages search, select your version of Ubuntu and download the relevant packages, installing them with dpkg, but this gets very messy, very quickly and is not for the faint of heart!

If you have an ethernet connection you can install the drivers for wireless easy by entering the following at the Terminal:

sudo apt-get install firmware-linux-nonfree broadcom-sta-dkms

The broadcom wl, bcwl43 and fwcutter software should all be installed. Reboot to enable the puppy and all should be good when you select your wifi from your system’s networking setup menu.

Graphics.

The graphics display should generally work out of the box, however there may be ‘interesting’ graphical issues. Not all of these might be fixable, but give the NVidia drivers a try, and if you still don’t have any luck, read the many forums until you get a solution that works for you.

sudo apt-get install nvidia-driver xserver-xorg-video-intel

Note if you are not using xorg, you’ll need to make the appropriate changes here. Maybe best to stick with xorg for now!

Screen backlight, Keyboard Backlight and Volume control hotkeys

A package is now available for Debian and Ubuntu called ‘pommed’, which handles the hotkeys found on the Apple MacBook Pro, MacBook and PowerBook laptops and adjusts the LCD backlight, sound volume, keyboard backlight or ejects the CD-ROM drive accordingly.

Installation is as simple as installing the package through apt-get:
sudo apt-get install pommed

If that doesn’t work for whatever reason, Check out Jessie’s blog for a more manual solution.

Accessing your Macintosh files from Linux

Okay cokey. Now here’s the thing. Apple can be real pains in the asses some times (read, all the time, at least these days). It is quite likely that you have what’s called CoreStorage, if you have anything OS X 10.10 or newer. This provides an encrypted, journaled file system; even if you haven’t installed FileVault (if you have, turn that off!).

To give full read/write access to your Mac OS X partition from Linux, you will need to revert it back to standard HFS+. To do this, you can pretty much enter one simple non-destructive command.

First up, at the terminal, issue the command diskutil cs list. You will see something like the below. If you know LVM in Linux, this is pretty much the same thing. Your main Mac OS X partition (Logical Volume) should be in Apple_HFS format.

Revert a volume to HFS+ using diskutilAs long as the ‘Revertible’ flag is set to Yes, you are good to go. Simply enter the following command:
diskutil coreStorage revert [THAT LONG STRING OF TEXT]

The long string of stuff is that big long alphanumeric string of text highlighted in the red box, you want to use copy and paste it to make sure you don’t make a mistake!

The conversion took ages for us, however your mileage may vary, depending upon how much data is on your drive, and how fast your drive is. If you type diskutil cs list again, you’ll see how much % of the conversion has been accomplished. Don’t reboot your machine until that’s over and done with, but after then, you can safely mount your OS X partition with full read/write access.

First, make sure that you have hfsprogs installed. Example installation command:

sudo apt-get install hfsprogs

Next, mount or remount the HFS+ drive; commands need to be as follows:

sudo mount -t hfsplus -o force,rw /dev/sdXY /media/mntpoint

or

sudo mount -t hfsplus -o remount,force,rw /mount/point

If you want it to mount each time you start up your tux-ified Macintosh, you’ll need to add the entry to the fstab (sudo vi /etc/fstab):

/dev/sdXY    /media/mntpoint    hfsplus   force,rw,gid=1000,umask=0002    0 0

Where your user gid is 1000 (use the id command to find out your gid)

Okay, that about wraps it up for this ditty, I hope it has worked for you. If it hasn’t, or you have some feedback to offer, we would love to hear it! Drop it in the comments, y’all 🙂

Related Post

33 Comments on "How to install Linux on a Macintosh"

  1. Everything went according to Hoyle, on my MBP 8,2 late 2011, OS X 10.11.3 was very easy to follow (Thank You) except the last three commands, not that they were not easy to follow, it was I didn’t understand them. Would I mount my OS X partition to read and write from Linux MInt 17.3 Cinnamon x64 or back in OS X? And why would I want to when I want to use Linux as my operating day to day system? I’m beginning to hate OS X as much as I hate Windows.

    Can I put a plug in for tips, tricks, and tweaks for Linux Mint (mainly) but there is tweaks for Ubuntu also.
    https://sites.google.com/site/easylinuxtipsproject/mint-cinnamon-first

    Now on to read Jessie’s blog. Once again thank you for putting refind in noob’s terms.

    • Thanks Dave! The only reason for mounting your Mac OS partition would be to be able to either move or access your docs/music/photos from your Mac partition. You would be mounting from linux for this .

      Plug accepted! If you’d like to see more mint stuff or other tips and tweaks on the site I’m open to ideas, and if you fancy being a contributor, let me know!

  2. So I had Kubuntu partitioned on my drive before installing El Capitan, that I was able to dual Boot into simply by holding optino and selecting it from the Mac’s startup screen (it read Windows, like a Boot Camp partition). I tried this, and wasn’t clear on loading the Linux file system driver, and how to access that. I won’t need to delete and reinstall Kubuntu will I? I figured once I can get reFInd working it will recognize the partition that’s there already.

    • In theory, yes, as long as you re-install grub, it should boot your existing Kubuntu partition without having to re-install. I’d recommend you do it though, and just save your data into a separate partition. It’ll make things cleaner.

  3. Thanks a million!!! I’ve spent days trying to install Ubuntu on my Macbook Air 13 2013 for at least five times without any success. With the help of your guide, I have now successfully dual-booted Ubuntu 14.04 on my Mac!!! Can’t thank you enough!!!

  4. Thanks for your detailed tutorial.

    I’m trying to install Linux Mint 17.3 64-bit on a MacBook Air (Early 2015), with OSX 10.11.3 (El Capitan).

    I followed your tutorial, but when I boot from the Live USB and I arrived to the “partitioning screen”, I don’t see any partition, and my /dev/sda seems to be empty.

    What I’ve tried so far:

    1) turn off the encryption of the hard disk

    2) disable SIP protection and install rEFInd 0.10.2, which is working properly at boot time

    However, my /dev/sda still seems to be empty.

    Any help about how to manage to install Linux Mint on this MacBook Air would be very much appreciated.

    • hmm, it’s not 100% clear what you mean when you say your /dev/sda is empty. Have you created the new Linux partitions at the installation phase? Are you saying that they are created, yet they don’t have any data in them?

      Can you paste the output of sudo fdisk /dev/sda here? Your disk might not be sda. It should be, but sometimes it can be something else.

      • Hi,

        Thanks for your reply.

        When I arrive to the “partitioning screen”, the only partition I’m able to select is ‘sda’, because there are no other alternatives in the dropdown menu box. Therefore, I’m not able to install Mint or Ubuntu because I don’t see any hard drive to store the installation files.

        After a lot of ‘googling’ I finally found a pretty similar issue:

        https://askubuntu.com/questions/728988/ubuntu-live-usb-cant-see-internal-drive-on-macbook-air-early-2015

        and if they are correct, the next Kernel 4.4 should solve my problem. The bad news is that I’ll have to wait until Ubuntu 16.04….

  5. Hi,
    It appears that after I installed ubuntu, I was unable to boot back into osx (didn’t see refind). Luckily I just got a new computer so I didn’t have anything on it, but do you have any suggestions for restoring osx as well? I’m not sure what went wrong.

  6. This is what worked for me. After install of LM on mbp 8,2 I had 3 icons, osx, lm, and a penguin (ubuntu) following instructions above. I tried everything in refind.conf to get rid of the third icon, adding dont_scan_ volumes, dirs, folders, (three separate lines), nothing worked. Booted into LM opened the file folder then clicked on file system, did a search of efi, there are a lot of returns. Open the efi folder that is capitalized EFI as root deleted the ubuntu folder, restart, now only two icons OSX, LM.

  7. Most everything went off without a hitch. Though REFInd doesn’t seem to be doing quite what it’s supposed to. I followed all the instructions to a tee, aside from the “fs0: load ext4_x64.efi” and “fs0: map -r” as it was unclear if I was supposed to have those as two seperate lines or what, anyways, Ubuntu is installed and runs. However, when I go to power the computer on it just boots directly into Ubuntu without the REFInd menu coming up at all. If I hold alt/option on power up I can select Macintosh HD and boot, but otherwise it seems REFInd doesn’t actually do anything. What should I do?

  8. Thank you for this guide, it helped me qite a bit with understanding the modifications to the Refind’s .conf file.

    Installed Kubuntu 16.04 on Macbook Air 4.2 (mid 2011) with OS 10.10 (did not upgrade to 10.11). Everything worked out of the box: wifi, backlight, sound, etc. One difference: I dropped –alldrivers from ./refind-install command because of the refind warning (said that it might affect Apple partitions) and that did not have any effect (it worked). However one quirk occured and i don’t know why: Kubuntu 16.04 logo is now the first thing that comes up on starting, No Apple, and no Refind menu, not even Grab menu is being showed. I am quite OK with that but it would be nice to have Grab at least.

    Why did this happened?

    One more thing. When I was booting first time Kubuntu from the flesh drive there were two icons of the flash drive, one saying EFI version and the other saying Classic. I booted into EFI version and then run install. maybe this explains why the Kubuntu now runs on the this macbook just like Apple system used to, without menu…

    • Alistair Ross | May 25, 2016 at 6:07 am | Reply

      Hi Alex, as long as you can boot everything just fine, and you can use the Option key to choose which OS to boot, then it doesn’t matter a damn about seeing ReFIND. Perhaps the newer Macs are a little friendlier on multiple EFI based systems!

    • See my question above, I had a similar issue, only with a different model macbook and regular Ubuntu, but I have a feeling it’s the same issue. Sometimes when one OS installs or even updates it will modify the boot order of things. I discovered that much on my own, just didn’t know how to fix it. Here is the link to my question on AskUbuntu. The REFInd guy himself answered the question and provided a link to the REFInd site on how to prevent future boot order hijacking. http://askubuntu.com/questions/771086/dual-boot-ubuntu-on-mid-2010-macbook-pro-questions/771776#771776

  9. Good stuff – but the fstab entry at the end has an error which caused me hours of head scratching until I spotted it: it should say “umask=0002” instead of “unmask=0002” 😉

  10. Hey, I’m having an issue that no one else seems to be having.

    I followed the instructions and everything works great until it comes time to boot to the alternate OS (I’m doing Linux Mint 18.1). When I go to select the second option from the rEFInd boot screen, it seems my keyboard doesn’t work. As best I can tell, it doesn’t initialize until after the OS starts. (Worth noting, I’m on a Mac mini, not a macbook, so the keyboard is a peripheral plugged into a usb port)

    I’m not a mac guy and have no idea what to do about this.

    Also of note, I can’t resize the OSX partition because it’s a startup partition but that’s fine because I intend to blow out OSX entirely and replace it with Linux anyway.

    • Alistair Ross | May 15, 2017 at 8:23 pm | Reply

      Hey they’re. You need to hold the option key. If you are using a PC keyboard, this is usually the Alt key. Make sure the keyboard you use is USB, not Bluetooth and make sure its plugged directly into the rear of the mac, not in a hub. YMMV but I’d recommend using an official Apple keyboard. Other than that, make sure you use the cursor keys. If you have used them already, try the number pad cursor keys. Otherwise I haven’t tested this on the mac mini as I don’t have one to test with.

      • Hey, thanks for your reply. Yeah, I was holding the option key, but I wasn’t able to change anything with the cursor keys. Or do you mean hold option WHILE making the selection? Because I think I probably let go once the rEFInd screen came up of and then went to make the selection and I don’t think I tried it while holding the option key too.

        Other than that, it is an Apple keyboard, and it is directly connected by a usb cord.

        • Alistair Ross | May 16, 2017 at 2:32 am | Reply

          Option key only during boot. Sounds like you have everything covered, not sure why you are seeing this issue. Check with refind website for known issues maybe?

  11. Thanks a ton for the clear and concise instructions. Minor things that I faced:

    1) The “diskutil coreStorage revert” needed a reboot to start doing the decryption.
    2) After I booted to OSX and did the decryption, I lost Refind somehow. Re-installing Refind did the trick and I can now see both OSX and Ubuntu options in the Refind menu.

    I am back on Ubuntu, thanks to you.

  12. Hi,

    I would like to know if you have a step-by-step version of installing ubuntu 16.04 Server on a Macbook Pro 11,3? I need the server side because I need to install a network emulator barebones. If I install an ubuntu desktop, that OS will just eat up the RAM that I want dedicated to the emulator.

    Any help is gladly appreciated!

    Cheers,

  13. Hi, great tutorial, I’m a super newbie at the terminal and I keep getting hung up at the edit config steps.

    ***
    Now it’s time to edit the EFI config file, but you will need to mount that hidden EFI partition first. Thankfully, rEFInd has a little tool you can use to mount the partition:

    $sudo mountesp

    Edit /Volumes/ESP/EFI/refind/refind.conf. Like us, you may find the refind.conf file is in /Volumes/ESP/EFI/BOOT, instead of a folder called refind. This is probably because we fiddled around with rEFInd and it’s predecessor, rEFIt before. Just because.

    $vi refind.conf (or nano, if you are that way inclined. Just not emacs!).

    locate the line that says scanfor and edit it to say:

    scanfor internal
    ***

    I can get it to mountesp, but then when I go to $vi refind.config it just gives me a bunch of ~ in a row. nothing to edit and seemingly no way to execute more commands. What am I missing?

    dk

    • Alistair Ross | June 3, 2017 at 12:10 am | Reply

      Hi dk, It looks like the file you are editing is empty, or it doesn’t yet exist. Either way, that’s not correct.

      Assuming that you have installed refind properly, the config file will be somewhere in /Volumes/ESP.
      Use the find command to search for it:
      $sudo -s
      (this gives you an admin ‘root’ prompt. Enter your own mac’s password here)
      #cd /Volumes/ESP
      you should now be in the ESP folder. If this doesn’t exist, you did something wrong installing rEFInd.
      now, search for the refind.conf file:
      #find . -iname “refind.conf”
      After a moment or two, it will then show the folder(s) where the refind.conf file exists, for example:
      ./EFI/BOOT/refind.conf
      if that’s the case, that means the file is located in /Volumes/ESP/EFI/BOOT. If find returns 0 results, then the file is not there at all, then again, rEFInd is not installed properly.
      to edit the file, maybe use the nano text editor rather than vi, if you are a complete novice with Linux. Let’s say that your result showed ./EFI/BOOT/foo/refind.conf, you’d do
      #nano /Volumes/ESP/EFI/BOOT/foo/refind.conf

      To exit and save after you make the relevant changes, hit Ctrl+X and say Y for yes (note it’s control key, not command).

      Hope this helps.
      Alistair

  14. Thanks Alistair,

    OK! The nano editor worked. I got the Scanfor set to internal.
    Now I dont know how to “Load the linux file system driver” to change

    fs0: load ext4_x64.efi

    fs0: map -r

    It’s not in the config file, and I suspect its in that driver, but I don’t know how to get that in the editor.

    Sorry for such (i suspect) simple issues.

    Thanks again!

    best
    dk

    • Alistair Ross | June 10, 2017 at 6:06 am | Reply

      I think perhaps my wording in that section should be revised – what I mean is that to load the driver, you must add the lines into the config file.

  15. I am running Sierra and your csrutil disable command does NOT work!

  16. hello, I get a warning when i’m about to install refind: –alldrivers is meant for creating USB flash drives with (-near) universal boot support. using it on hard disk partition runs the risk of creating serious problems, up to and including rendering your computer unbootable. Any advice or comments thanks

  17. Thanks man. This worked just fine on my late 2012 Mac-mini except

    I had to run
    sudo apt-get install firmware-b43-installer
    to get the wifi working

    I did have to buy a cheap usb keyboard to walk through the install process. after that my wireless keyboard worked great

Leave a Reply