Dual Booting Linux Mint on Windows and Mac

Please Note: Use of these instructions is at own risk to your machine. The authors take no responsibility if something goes wrong with your device. If you choose to follow these instructions, please follow all instructions carefully and be aware that to do so is at your own risk.

What is dual booting?
Dual booting (typically between Linux and Windows/ Mac and Windows) is the process of having two operating systems installed on the same machine, and the desired system is chosen to boot into when the system powers on. Using this system, it is possible to have two separate work spaces and two separate filing systems that will not interfere with each other.

The reasons for dual booting vary considerably: Types of dual booting covered in this page
 * A desire to learn about a new system without losing your original one
 * Need a certain system for work and another for home
 * Debugging purposes
 * Application testing
 * Because, why not?

- Dual booting Linux and Windows

- Dual booting Linux and MacBook Pro

The Basics
It is important to understand how a dual booting system works, and to understand that we must understand how a computer actually boots.

When a machine is powered on, the Boot Loader, a piece of software intended solely for loading an operating system, locates the operating system on the disc and initialises it, when dual booting, we need to install the new system alongside the current one, and update/replace the Boot Loader so it can identify and launch both systems.

In order to install a new operating system without deleting the old one, it is necessary to create a partition for the new system. When the partition has been created, we can install Linux onto the new partition, leaving the original operating system completely untouched, and as a bonus most Linux installations automatically replace the Bootloader/update it to accommodate the new operating system.

Another method of dual booting is to install the new operating system onto its own HDD/SSD, this avoids the ‘hassle’ of working with partitions, however it can also make the setup of the Bootloader marginally more complex.

BIOS and UEFI Definitions
BIOS: BIOS, or the basic input/output system, is the first piece of software that loads when a machine is powered on, it is responsible for starting the computer system itself, whether it is Windows, Mac, Linux or other.

UEFI: UEFI is the newer replacement for the legacy BIOS, it is superior because it supports bootable volumes that are greater than 2tb in size and it can utilise a drive even if it has more than 4 partitions.

Freeing space/Creating the partition
The first step, if the plan is to dual boot from a single drive, is to create a partition(s) on the drive for the new OS, in Windows this can be achieved through the disk manager, right click Computer and select ‘Manage”

Once this has been chosen, select Disk management and a display similar to the following should appear:

This window shows the partitions within the hard disk, providing the option to add, remove and modify partitions. In order to create a new partition, we must first ‘shrink’ the primary volume to free space for the new partition. This can be done by right clicking a volume and selecting shrink:



Next the drive will be queried to determine just how much space can be freed, this step may take some time. Once the query is completed, a window will appear that allows you to shrink the drive:

Once the new partition has been created, make sure you can identify it later (typically by the amount of space allocated), as this is the partition that Linux shall be installed to.

Preparing the BIOS/UEFI
The BIOS (Basic input/output system) or UEFI (Unified Extensible Firmware Interface) is the first software that is used when a machine first powers on, it is responsible for starting the boot manager software that starts the operating system. In order to dual boot, it is important to prepare the BIOS/UEFI (each individual machine could have either), in order to access the bios, when the machine first powers on you must press the required key (this key changes with every machine, traditionally it is delete or one of the F keys), once in the BIOS, two things need to be done:

-Change the computers boot order so booting from the CD drive is the first priority

-Disable SecureBoot (if your machine has it)

When these two steps have been accomplished, make sure to save changes and exit (the appropriate keys should be listed onscreen.

Installing Linux
Now that the CD drive has been set as the primary boot device, it is time to insert the Linux CD of choice (for this tutorial, we are using Linux Mint 17.1 Rebecca)

The computer should automatically begin loading from the CD please be patient as this step can take some time. Once loading has been completed, you will be in a fully functional Live session of Linux Mint, from here you can explore Linux and use it as you would use any normal PC, however we will be going straight for the install Linux link on the desktop. It may take a minute or so for the installation menu to load correctly, once it has there will be a screen that will display something similar to this:

Choose the required language and click continue, click continue on the next screen, which will then present you with the following screen:

If your machine uses a normal BIOS the system will automatically detect your current operating Windows OS and will give you the option to install side by side (will appear at the top of the page), if you have this option, select it now and proceed to the simple instillation section of this document.

If your system uses UEFI or does not detect the already present windows operating system, select “other” and proceed to the “other installation” section of this document.

Simple Installation
If your system detected your currently installed Windows then congratulations, your install will be considerably more simple and straight forward than the ‘other’ method. Basically follow the instructions as displayed on screen.

(note this tutorial is focussing on dual booting UEFI based systems, there are more than enough tutorials that explain the process of dual booting onto a normal legacy BIOS system)

Other
If your system uses UEFI, or the instillation medium cannot detect your currently installed Windows operating system, then this section will guide you through the rest of the installation process.

First, select the ‘other’ installation option from the menu and click continue. Now you will be greeted with a partition window similar to the one to the right:

Firstly, on the bottom of the screen we will install the Bootloader to the partition that is marked as ‘efi’ Once this is done, we must create a partition for the root system, do this by clicking the plus icon to the left of the change button, allocate the desired amount of space (15,000 mb is a good number), the file system can be whatever you wish, however traditionally Linux uses ext4, and set the drive type to Logical.

Now, we are going to create a partition for home (we could have merely used a single massive partition for root and not bothered with the home partition, however for the tutorial we shall create two separate ones) allocate as much space as you wish (however leave at least four (4) gigabytes of memory free for later use, select the mounting point as ‘Home’ and leave any other options to their default settings, then click ok.

Finally, we can create the swap area, basically a form of Hard Drive Ram, Traditionally this is the same size as the amount of ram your machine has, so we shall set it to be 4gb (4086 mb), mounting point is set to swap area, then click create.

Now that the partitions are created, we can click continue, note that if a window appears warning of writing changes to some partitions, click continue, this is merely warning that the Linux partitions are going to be created.

Next we select the desired time zone, set up the user account and passwords, then installation shall begin.

When installation has completed, the system will ask you to reboot, DO NOT do this yet, select continue testing.

Installing the custom boot manager
With UEFI systems, by default they will not detect a Linux install, thus we either have to redirect the Windows boot manager to GRUB, replace the Windows boot manager with GRUB, or redirect (or replace) the UEFI with a custom boot manager. We shall do the latter, as rEFInd, the custom boot manager that we are going to be using, is capable of detecting and booting virtually any operating system, and is more stable than GRUB.

Open Firefox and google search ‘refind’, or open the following sourceforge download link and proceed to download and install rEFInd, using the default settings should work.

Installation guide for Sony Vaio
NOTE: If you are using a Sony Vaio, open a terminal and follow the instructions listed below:

cd /boot/efi/EFI/Microsoft/Boot

mv bootmgfw.efi ../

cd /boot/efi/EFI/refind

mv refind_x64.efi refind_x64.efi.default

cp refind_x64.efi.default /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi

cp refind.conf /boot/efi/EFI/Microsoft/Boot

cp -r ./icons ./keys ./drivers_x64 /boot/efi/EFI/Microsoft/Boot/

Note: These instructions were obtained from here Once these instructions have been followed, you can reboot your machine, and when the machine powers on, you should be presented with a rEFInd launch screen which will look similar to this:

MacBook Pro
Before we begin, it’s useful to note that these instructions were created using a Mid-2012 MacBook Pro. Running OSX Yosemite 10.10.8.

Unlike Windows, MacBook’s use the HFS+ file system, which was developed by Apple Inc. HFS stands for ‘Hierarchical File System’, and this is used as the primary file system. It may also be referred to as ‘Mac OS Extended’. It’s interesting to note that the user also has access to use “HFS+ Journaled”. So what does this mean? Basically it’s a file system that keeps track of the changes of a file, before committing them to the main file system. Of course this is the simple answer, and it’s actually a lot more complex than that, but it’s not really that important to discuss here. It’s important to know the file system for MacBook’s because when installing Linux Operating Systems, the Mac OS hard-drive won’t readily be able to be read. This is the case with Linux Mint OS.

Unfortunately, while MacBook’s have a pre-installed application that is helpful for dual booting, this is only the case when dual booting with Windows. Linux is not currently supported with this method, and therefore it’ll have to be done the “hard way”.

Install a boot loader
The first step to dual booting with a mac is to install a custom boot loader. This is because the MacBook will automatically boot into Mac OSX rather than give you an option to load either the GRUB boot loader (Linux), or the Mac OSX boot loader. The recommended bootloader to use is rEFInd - sourceforge link here.

This is the easiest to install, but it should be done before partitioning and installing Linux.
 * 1) Download the refind zip file form the link above, or search ‘refind for mac’ on google, and choose the source forge option. Once this is downloaded, unzip the file.
 * 2) Open a terminal. Once the terminal is opened, drag the install.sh file from the folder you just unzipped to the terminal and press enter.Terminal001.png
 * 3) Since the terminal you just opened doesn’t have root access, the terminal will ask for you password, enter your password and press enter. If all was successful, it should state that it was successful. It should look like the below image:

Now you’re ready to partition your hard drive. Move on to the next step.

Partition the hard drive
The next step is to launch the Disk Utility application from the launchpad. Can’t find it? View the below image for the default location). Another method to find it is to use Spotlight - the command is Command + Space. Just hit Escape to get rid of it if need be.

If using Spotlight, it should look like the below image. You’ll want to choose the top option (assuming it looks like this). If not, find the application that looks like the one pictured below.

Once Disk Utility is open, you’ll be faced with this screen (on the right).

From here, you’ll want to select your hard-drive, and split it. If your hard-drive isn’t a very large one, it’s recommended that unless you plan on using Linux as the main operating system, only split as much as you need (you can re-join the split partitions later if need be) – even if that’s only 20gb. Linux doesn’t require much space to run, unlike both Windows and OSX.

Instructions for splitting harddrive:
 * 1) Find your hard-drive, which should be called “Macintosh HD”, or select which ever hard-drive you want, if you aren’t partitioning your main HD. There should be two options to select – we want the top option. We want the screen that shows the First Aid/Partition options, not the screen with the First Aid/Erase/Restore options. Your screen should now look like this (image to the right).
 * 2) Now that you’ve selected your hard-drive, we want to partition it. Chose the partition option in the top menu (the one located beside First Aid). From here, we want to click the + button below the Macintosh HD box. If you want the partition to be a certain size, you must drag the bigger partition to enlarge, or shrink it (see below image for where to drag).Partition004.png
 * 3) Choose the format you’d like to use for your new partition. We’ve just used Mac OS Extended (Journaled). This is the default HFS+ file system. Click Apply. A pop up box will appear telling you some partitions will be changed. Click the “Partition” button. Be sure to be patient, this make take some time to create the partition – even if it seems to have stopped, don’t get impatient and just turn off the computer, this can damage your hard-drive. Be Patient!! Note: Disk Utility will not notify you when the partition is created, be sure to check back from time to time.
 * 4) If everything was successful, you should now be faced with something that looks similar to the above and to the right image.

Congratulations on successfully partitioning your hard-drive! You’re now ready to move to step 3.

Booting Linux
Ensure that you have a bootable USB/CD that has Linux Mint (or whichever Linux distribution you wish, just keep in mind this is formulated for Linux Mint). If you have trouble creating a bootable USB or CD, look around google, there's quite a few instructions on how to do it, but in terms of creating a bootable CD, simply burning the Linux iso to the disk should work.

Now that you have your partitions ready, it’s time to boot up your MacBook from the bootable device. The easiest way to do this is to restart your computer and to press and hold the ‘C’ key. This boots the computer from a bootable CD, DVD or USB thumb drive. Another method is to press the Option ⌥ key. This brings you to the Startup Manager,

So, without further ado, insert your bootable device, and turn on your computer. Press and hold your choice of key immediately after you turn your Mac on and hear the startup sound, and keep holding it until you get the screen relevant to the button you pressed. This should show your Macintosh HDs, and the CD you just booted – if the CD isn’t there straight away, wait a minute or two, it takes a moment to load the disk. Choose the EFI choice of disk, and press enter. If you used a bootable USB, it acts the same way, but with a USB rather than a disk.

If the bootable device wasn’t created properly, please note that you may be presented with the GRUB boot loader. This is easily fixed though – simply turn off your computer by holding down the power button, and let the computer boot into OSX. From here, return to Step 2 and try again.

Once the Live Session of Linux is loaded, you’ll want to install Linux. Keep in mind that the live session doesn’t allow you to use all Linux features.

So, to install Linux, follow the following steps:
 * 1) Click the ‘Install Linux’ disk icon from the desktop to begin installation of Linux.
 * 2) Choose your language – in this case we’ve chosen English. Click Continue.Install002.png
 * 3) Click Continue. Note: It’s preferable to have your power cord connect in order to not run out of battery during the installation process. Do not worry about the Internet connection however; we’ll cover internet connections later.Install003.png
 * 4) Once you reach the “Installation type” window, you’ll be presented with two radio buttons with options, as shown in the following window. If you’re lucky, Linux will recognise Mac OSX and offer to install alongside it. Unfortunately I wasn’t that lucky and didn’t get that option. If you get that option however choose it, and click next. Do not worry about Step 4, and move on to Step 5.

So, to begin, choose the ‘something else’ option and click ‘continue’. From here, we want to mount the partition to root, so choose the ‘/’ option, and click okay.
 * 1) This is the difficult step. In this step, we want to change our new HFS+ partition to an EXT4. So, what you want to do is highlight the partition you want to change, and click the change button beside the + and – buttons. When the popup appears, change the “use as” to EXT4, and if you wish, shrink the volume – this will be used for swap space. Click OK.Install005.png the partition is formed, double click it again. You'll be faced with the below image.
 * 1) Choose some of your free space, and double click it. Do the same as you did to reformat the eft4 partition, but this time select “swap space” instead of eft4. This will be used to put your computer to sleep, and to wake it up easily.Install007.png
 * 2) Once you’ve set your swap partition, you want to set your Device boot loader installation to be sda1 (the efi partition), and click “install now”.
 * 3) Follow the instructions to install Linux. When asked for your city, choose what you want, choose your language, and just follow the installer instructions, and then wait for Linux to install. Once installed, you’ll be instructed to restart your computer. Restart it, and eject the Linux disk, but keep it on hand, we’ll need it soon.
 * 4) Once you’ve booted your computer again, the refind boot loader should appear with Linux, and Mac. You’ll want to choose the EFI Linux, if more than one appears as the other in a Virtual Box – we don’t want that one, we want the EFI. Boot up Linux. Congratulations, you’ve successfully set up Linux! But we’re not done yet! Because unfortunately, your WiFi drivers aren’t installed yet, but we can fix this easily. First, insert your Linux disk (or connect to the internet via Ethernet cord). Next, use the start menu, and hover over the Administrator options, and open Driver Manager. Choose the Broadcomm driver, and install it. If it doesn’t work the first time, try again as it doesn’t always install the first time.

__INDEX__