Install Linux Mint 12 (Lisa) on 13inch MacBook Air 4.2 (2011 model)
Linux Mint 12 (Lisa) is based on Ubuntu 11.10 so the script created by Joshua Dillon that is referenced on the Ubuntu MacBook Air site would in theory work, however as I found I needed to do a little tweaking to get this to occur. Below are the steps that enabled me to run Mint 12 on my MacBook Air.
NOTE:It is assumed in the how-to that you have already partitioned your MacBook Air ready for linux, if you have not done this already then follow this link, as I explain it in another blog post.
Step 1: Install Linux Mint 12 (Lisa)
Attach installation medium to MacBook Air, I used an external DVD drive connected to the USB using the DVD ISO downloaded from the Linux Mint site, located here.. I used the torrent of the 64-bit version, which can be found here.
Boot up MacBook, then select the Linux icon with the little CD located next to it.
Step 2: Alter Boot Parameters
If you let the boot up run as normal, the system will not boot. You need to tell the the GRUB loader that it does not need to load any of the default drivers. As the MacBook display with the Sandy Bridge Chipset does not seem to play well with the default drivers.
When the countdown to automatic boot is on the screen, press “TAB”, then press “TAB” again to edit the boot up parameters. You need to add “nomodeset” before the “–”, as shown below:
Then press enter and the Mint 12 Live DVD will now boot as expected.
Step 3: Configure Installation
Double click on the “Install Linux Mint” icon the desktop, then select your language. When the installation type option is on the screen ensure you select “Something Else”
Now you will be presented with the option for selecting your partition to install Linux on. For my system this was “sda4″, be cautious here as you do not want to format the wrong partition. When you select the correct partition, ensure that you select “EXT4″ and to format the partition, then you need to set the mount point to “/”
Now select the partition that has been set aside for the “Linux Swap”, this was “sda5″ on mine, a 4GB partition. When you select this partition, you need to choose the file system as “swap”.
The last and Very Important step is to set the “Device for boot loader installation”, this needs to be set to the partition that was configured with the mount point “/”, on my system this was “sda4″.
Now you will be able to select the keyboard, this step does not really matter as this will be set later, but I chose “English (Macintosh)”
Now continue through the installation and select reboot when asked.
Step 4: Resolve “Missing Operating System” Error
If when selecting to boot Linux after the installation has finished and you are presented with the error below, don’t be alarmed.
Once installed open a terminal and run the following:
sudo gdisk /dev/disk0
Then complete these options:
r o p
It should look like the below:
This will now display the partitions currently setup on the system. These will be used in the next part, next a hybrid partition table is needed. To do this select “h”.
Now the partitions that need to be included in the new partition table are to be listed out based on the information just printed out to the terminal. The first partition (the GPT partition) and the linux swap are not required to be listed in the new partition table. So on my system the included partitions were 2, 3 and 4. This is selected in the following way:
2 3 4
–Take note of SPACES between the numbers
Then each of the partitions need to configured, select “y” to placing the EFI GPT partition first in the MBR, then for all the other partitions select the default MBR Hex code and select “n” for bootable. The only difference is change the MBR Hex code to “83″ for the Linux partition and set this to bootable. As shown below:
Once done, select “o” will display the changes that are about to be made. Once 100% sure they are correct type “w” to write them.
NOTE: If you are unsure at all about this do some research, as doing this step wrong will BRICK your MacBook Air.
STEP 5: Boot Linux Mint 12 for the first time
Reboot the system then select the Linux icon from the boot screen.
When the GRUB loader is on the screen you will need to select “e” on the top line to adjust the default options, as the default boot will still not start correctly.
Add the “nomodeset” as done before, but this time press “ctrl+x” once complete to boot.
STEP 6: Updating Linux
Once Mint 12 has started, open a terminal window and run the following commands:
sudo apt-get update sudo apt-get upgrade
This will take quite some time, so let this finish.
STEP 7: Configure source.list to include source (SRC)
By default Mint 12 does not have any source repositories included in the sources.list for apt-get, these will be required later as the script for the required drivers downloads and recompiles the kernel. At a terminal run the following command:
sudo gedit /etc/apt/sources.list
Modify this to look like the below, copy each line and add the “-SRC”
Save the file and close, now update the apt-get listing:
sudo apt-get update
STEP 8: Update the Kernel
When Mint 12 was released the Kernel version was at 3.0.0-12, when writing this the Kernel was at version 3.0.0-13, so I updated my Kernel to the latest, as the script that will be run later appeared to have issues if the Kernel version on the system was not the latest version obtained from apt-get.
To update you kernel first determine what kernel version you have by running at a terminal
It will show something like the below, this was run on my system after updating, so a default Mint 12 will be 3.0.0-12-generic.
Now search the apt-cache to see what is available:
apt-cache search linux-image-
The results will look like the following, remember the latest version, in the case of the image below this is “linux-image-3.0.0-13-generic”
To install the latest version run the following command, with the x’s being replaced with what you have found out above:
sudo apt-get install linux-image-x.x.x-xx-generic"
Wait for this to occur then reboot the system, when it boots up again you will need to complete the “nomodeset” fix still.
Once up and running, check the installed kernel version by running this command again
STEP 9: Update Kernel Dependencies
To ensure everything is configured correctly and the source information is accessible, update the Kernel’s source dependencies, by running the following command:
sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)
If this works correctly move onto the next step, if not you will need to resolve this before moving on.
STEP 9: Configure the Correct Drivers
Download this script to you system, post-install-oneiric.sh (I saved this script to “Downloads”). Then run the follow script.
cd ~/Downloads/ chmod a+x post-install-oneiric.sh sudo ./post-install-oneiric.sh
When asked to select “y/n” answer all the questions with a “y” on the first run through.
This again will take quite some time to complete so please be patient.
STEP 10: All Complete
Now if everything has gone well you should be able to reboot you MacBook Air, when the GRUB Loader appears, just let it run through as default. The screen everything else should function as per the list on the Ubuntu page.
Again a special thank you to Joshua Dillon for creating this script to get the MacBook Air drivers working correctly.