Refind Boot Manager Mac

Table of Contents

Refind installiation is quite simple. It has a theme support and easy to configure with text-based. However, it's only recognize efi boots and also it will automatically include kernel which make the os menu duplicate. But, cleaning the menu from duplicating boot files are as easy as pressing delete buttons. To successfully boot Kali Linux from your USB drive, you need to install rEFInd as well, which is going to be your default boot manager from now on. Unfortunately, the official Kali Linux documentation only describes how to install rEFInd in version 0.8.3 which doesn’t work on MacBooks running OS X Yosemite or newer due to a few changes Apple. Tags: Boot Manager, Linux, Mac OS X, rEFInd, rEFIt, Windows. Cool Tips: Free Ruler for Mac OS X to measure screen elements in pixels.

Hello!

This blog post is going to go over how to create a Linux partition on your mac and have everything working successfully.

Okay so lets begin with: sudo rm -rf / && sudo kill -9 1.

Hold the phone.

Refind Boot Manager For Mac

That was a test. I really hope you didn’t just copy, paste, and run a command on your host without knowing anything about the author. A bit about me… I have run this install about a dozen times on my mac, with various different changes along the way. I can finally say I found the perfect way to install Linux, specifically Debian Jessie, on a mac.

So now let’s actually get started.

Hardware

Refind Boot Manager Mac

The below installation was done on my MacBook Pro Retina (15-inch, Late 2013).

You will also need one of these nifty ethernet to thunderbolt adapters.

rEFInd Boot Manager

Refind boot manager macos

The majority of times I installed Linux I ran rEFInd on my mac, so I could keep my mac partition and have a separate Linux partition. This last time, however, I was so fed up with OSX and the fact I never used it, I nuked it entirely.I boot purely into the Debian Bootloader now. But I will save that doosey for another blog post if I think people are really as crazy as I. rEFInd is the lesser of two evils between the other popular rEFIt, you will probably see some pain points and reasons for my fuck it, nuke it attitude towards OSX.

Instructions for installing rEFInd can be found here, but I will go into detail about how I install since you can tell those are a bit hard to read.

If you don’t know how to open terminal just stop now, sorry this isn’t going to be one of those blog posts.

The following works for OSX Mountain Lion.If you are running Yosemite you are SOL(not really but read thisand I wish you luck on your journey):

Okay now you need to edit /EFI/refind/refind.conf.The key differences you should make to the default config are as follows:

Let’s check it’s working. Restart your computer and you should see a super 90’s looking screen like:

If not, there are various debugging tips per version of Mac OSX here.

High five! Hard part’s done. Really. That is the hardest part.

Choose your Linux Distro

Download Refind Boot Manager Mac

Obviously my favorite is Debian Jessie, so I willgo into detail how to make a USB boot drive for that,but you can substitute out whatever sub-par distro you choose.

As of the writing of this article, Debian Jessie is on it’s Beta 2 release.You can download the netist image from here.But detailed instructions follow:

Partition Your HD

Next you need to partition your hard drive sothere is enough space for your linux distro. Here are the steps:

  1. Open Disk Utility
  2. Select the disk on the left panel (for example “500GB APPLE SSD”)
  3. On the partition scheme resize the “Macintosh HD” partition, drag the bottom right edge of the partition scheme up unless you have enough space for Debian. Apply the changes.

Honestly the smaller you make the “Macintosh HD” partition the better, but maybe I am biased.

Installing your Linux Distro

Make sure your computer is off. Connect your Ethernet adapter and your USB drive we made earlier.

Turn on your computer and hold down the option/alt key.

Select the EFI Boot relative to your USB drive (It’s going to be the bright orange drive looking thing) and continue with to the installer screen.

If your linux distro has Advanced Options like Debian for installing a certain Desktop Environment(and its not Ubuntu or XUbuntu) don’t even bother setting those we will handle that after nvidia drivers.

Continue through your install.

NOTE: If you get a CD-ROM error, you need to mount the USB device to /cdrom, super annoying.The process will fail and you will be given some options,choose the shell and run mount /dev/sdc1 /cdrom. It might also be /dev/sda1 or /dev/sdb1.You will know it when you hit it because you won’t get a mount error,then return to the menu and continue where you left off on the “CD-ROM install”.

When the installer arrives at the partitioning step,you can use the auto partioning,that’s what I did with all free space, then in the reviewscreen I used ext4.If you are going to be running Docker on your system I highly recommend ext4 with the overlay storage driver and you should trust me.

Complete the install and reboot.

Boot

You are in a term, it feels bleek

Do not fret. I repeat do not fret.

Refind Boot Manager Mac Install

Login as root, yes I know you just created an actual user in theinstallation steps but ROOT ACCESS OR DEATH. Really though we need to install sudo and build a new kernel.After all that is done, you can continue on your way as your user.

Refind Boot Manager Themes

Ok so at this point I know you are not copy and pasting thisshit into your terminal so I’ll try to keep it concise.Remember, I’ve been here. We will get through this.

View your /etc/apt/sources.list and it is probably messed up and pointing to a CD-ROM.

Change it to the following (or whatever your distro wants):

Now we can:

Let’s build a kernel from source wooooo

Now here’s the thing. Debian Jessie comes with a 3.16.x kernel.3.17.x is really where the awesome is at for Mac OS X,because it has hotpugging for thunderbolt. WHAAAAA? YES!!!

So if you are going to ride with me on the awesome thunderbolt trainwe need to build ourselves a kernel from source. Or if you reallllllyyytrust me you can download my .deb for kernel 3.17.3here,but honestly I build my own everytime so take that as you will.

Usually, I do these builds in a container.But for the sake of this we can just do it on our host cringe.

After restarting, depending on your refind.conffile you may see a new option in your rEFInd menu for the new kernel.DO NOT select that, select the option that corresponds to the linux GRUB (or whichever)bootloader you use. If you do not see one for GRUB or your flavorbootloader you may need to bless the bootloader file on the Mac OSX side.See these instructions on blessing.Do you understand now why rEFInd is the hardest part? It’s like iptables,change one thing and everything comes crashing down.

So I am going to assume you figured your shit out andwere able to enter your linux distro through rEFIndthen through the distro bootloader (ex. GRUB).

Refind Boot Manager Mac

Let’s clean things up.

To avoid random controller freeze you need to set a particular kernel boot option.Edit /etc/default/grub and add the option libata.force=noncq(es. GRUB_CMDLINE_LINUX_DEFAULT='quiet libata.force=noncq')then run update-grub and reboot your system.If you are going to be installing Docker you may as well addGRUB_CMDLINE_LINUX='cgroup_enable=memory swapaccount=1' whileyou are there as well.

Drivers

Okay now we are to the important part, let’s get shit to work.

Remove Refind Boot Manager Mac

Wifi

Graphics

Reverse Scroll (like Mac) Touchpad

Font Anti-Aliasing

Desktop Environment

Now is the time to install whatever desktop environment you love. i3 is my personal flavor:

Screen Backlight

I have a bash script https://misc.j3ss.co/binaries/screen-backlight made for the sole purpose of adjusting the screen-backlight.

You will want to add to your sudoers file the following line, so password is not required for the script to run:

then for the example of i3 you can add the following to your config:

Keyboard Backlight

The same goes for the keyboard backlight. I have a bash script https://misc.j3ss.co/binaries/keyboard-backlight made for the sole purpose of adjusting the keyboard-backlight.

You will want to add to your sudoers file the following line, so password is not required for the script to run:

then for the example of i3 you can add the following to your config:

How To Use Refind Boot Manager

Things that won’t work in Debian

I have not gotten the iSight camera or Screen Brightness to work.Other than that, everything is perfect, and thunderbolt hotplugging is a dream.The retina resolution is absolutely stunning, it’s seriously hard for me to switch to my Thinkpadwhich has 32GB of memory (so I should want to switch).

Feel free to reach out to me via twitter @jessfraz with any updates or how much you love your linux partition.