XtGem Forum catalog
HomeBlogAbout Me

How To Install Linux On Macbook Air



Antivirus for macbook air. More and more Linux operating system becomes popular especially for geeks, system administrators or developers. Several popular Linux operating systems for desktop are Ubuntu, LinuxMint and Elementary OS. This post will show you how to install LinuxMint 17.3 on MacBook Pro dual-boot with OS X El Capitan. This method should also be applicable for Ubuntu 15.10 and Elementary OS 0.3.2 Freya.

Prepare the partition

We can use Disk Utility to partition our disk. Create around 50GB of disk space for Linux. Set the partition format to MS-DOS(FAT). We can change to EXT4 Linux file system format later in the installation stage.

To make it easier, I have created a video how to partition the disk on OS X El Capitan.

How can I install Ubuntu on a MacBook Air? I want it to dual boot, is it possible? Do I get any benefits by installing Ubuntu or Linux? Because OS X has Unix tools like bash, isn't is the same? I am not a Linux noob I have experience in Kali, black arch, and mint. However it seems like it’s impossible to install any version on this computer. Iv made my partition already that’s not the problem. The problem is there are no USB ports on the computer and I have to use a usb c to USB adapter to plug the jump drive in to install. Installing Linux Mint on your PC or Mac opens up a whole range of new open-source software and capabilities. It involves some initial preparation, but in the end, you'll find it worth the investment. It involves some initial preparation, but in the end, you'll find it worth the investment.

Create Ubuntu / LinuxMint bootable USB Stick Installer for Macbook

We will install the Linux operating system using a USB stick. You need at least 4GB of USB stick. Ubuntu website already provides how to create a bootable USB stick on OS X on this page.

The steps is as follows:

To make it easier I have created a video on how to create Ubuntu / LinuxMint bootable USB stick on OS X

Restart the MacBook to boot on USB stick

After successfully create the bootable USB stick, it is time to boot the Macbook to USB stick. Press and hold Option key while booting to go to Mac boot menu. Select the EFI boot disk. If there are two EFI boot disks just select one of them. The Mac should boot into Linux running on USB stick.

Basically you can run the Ubuntu / LinuxMint / Elementary OS just from Linux. It is called Live USB Linux. You have to always and keep the USB plugged in to run Live USB Linux. If you wish to install it to hard disk, double-click the Install Linux Mint icon in the Desktop. Welcome windows will pop up. Just click Continue to start the installation.

On the ‘Installation type’ step above, choose ‘Something else’. We will install Linux Mint on the partition we have created on the above step. Then click Continue.

As you can see in the image above, select the partition then click Change to edit the partition. Format it as EXT4 file system and mount it as ‘/’. Click OK and then click Install Now. You may be warned that there is no SWAP space configured at the moment. Just ignore it. We can create swap space later.

Follow the on screen installation step. Once the installation complete, DO NOT reboot it now. Click Continue Testing. We need to install EFI boot manager, a tool used to modify the Intel Extensible Firmware Interface (EFI) Boot Manager.

Open Terminal program then run the following command to install EFI boot manager.

Then run ‘sudo efibootmgr’ to see current boot status. See the image below for example.

As you can see above, BootCurrent is 0000 which is Ubuntu (Linux Mint is based on Ubuntu). BootOrder is 0000,0080 which means Ubuntu first then Mac OS X. To make sure the boot order is correct, run the following command:

You can now restart the Linux Mint Live USB. You should see Grub boot menu with Linux Mint in the first order.

Post-install configuration

Setting the Grub menu

As you can see in the Grub menu above, the Grub automatically probes and detects other operating systems installed in other partitions. It detects Mac OS X (32 and 64 bit) on /dev/sdb4. Unfortunately when we select it, it does not boot into the system. We need to manually add a menu entry of the OS in /etc/grub.d/40_custom file as follow for example:

https://bestdfil938.weebly.com/wonderpen-1-2-1-download-free.html. As both menuenty of Mac OS X (32-bit) / (64-bit) (on /dev/sdb4) do not work, we need to remove it by disabling the Grub probe option. It can be done by simply make the file /etc/grub.d/30_os-prober not executable.

Then re-run the update-grub

Restart to see the new Grub menu as follows:

Install Wireless / WiFi driver

The wireless is not detected by default. We need to install the wireless kernel driver as follows:

Macbook Pro is using Broadcom BCMxx for the wireless firmware so we need to install it as above.

I’ve been feeling the pull of desktop Linux for a while now.The last time I tried to use Linux as my daily desktopwas almost 10 years ago.It was a pretty big failure.

But after so many years of using,and falling in love with,Linux on the server,I wanted to give it another chance.

So last week I hunkered down and,over the course of a few days,managed to build a functionalLinux environment on my laptop.I took rigorous notesas I struggled and encountered breakthroughs,the results of which you’ll find below.

The steps in this guide will take you froma single-boot OS X install on a Macbook Airto a dual-boot system with OS X and NixOS.Many of the steps apply to installinganother Linux distribution, too,in particular those dealing withdisk encryption (in OS X and Linux)and the requirement for Broadcom drivers.

Other than that,make sure you have any important bits saved somewhere safe,and enjoy the path to Linux below!

Table of Contents

What is NixOS?

There are many, many Linux distributions:distrowatch.com tracks 278 at the moment.Of those 278,you’ve probably heard of some of the major ones:Mint, Ubuntu, Arch, etc.NixOS is not one of the major ones.

So why did I choose it?

D16 group decimort 2 1 4 download free. I’ve experimented previously withusing the Nix package manager,on which NixOS is built,and found it very interesting and powerful.

I really like the ideaof having a handful of declarativeconfiguration filesfrom which my entire system can be built.It means I can store it in gitand track the history of my configuration,just like with my dotfiles.It also means I can quicklyget up to speed on a new machine.

The ability to easily apply–and later rollback–configurations was also appealing,since I knew it would take a lot of experimentationto get the system working like I wanted.

I’d encourage you to read more aboutNixOS and Nix,especially if you intend to follow the guide below!

Download minimal 64-bit NixOS livecd

The steps below were performedwith the minimal installation CDfor NixOS version 14.12found on the NixOS Download page.

(Optional) Disable OS X disk encryption

If you’re not using FileVault for full-disk encryption,you can safely skip this step.

If you use FileVault to encrypt your disk,you will not be able to use Disk Utilityto update your disk’s partitions,which will need to be donein a later step.

Open FileVault and disable disk encryption,following the on-screen instructions.After rebooting,re-open FileVault and waitfor the disk to be fully decrypted before continuing.This will probably take a while—for me, about 30 minutes.

(Optional) Prepare Broadcom driver

Depending on your particular hardware configuration,it may be necessary to use Broadcom’s unfree drivers.You’ll need to follow the instructions belowfor any Apple laptop from the last few years.

Linux On A Macbook

The steps that follow are almost certainlynot the quickest or easiest wayto prepare the Broadcom driver for installation.But I had already written most of the stepsfor a future blog post,so it was something I understood how to do.

Attach your USB device,and configure two partitions in Disk Utility:NIXOS_ISO (600 MB), and DATA (the rest).Each should be formatted as “MS-DOS (FAT)”.

Eject the drive,but keep it plugged in.

Now in the terminal,we’re going to create a VirtualBox VM running the NixOS livecd.If you’re more comfortable with the VirtualBox GUI,you can do all of the following steps there instead.

You should be able to copy and paste the script below,remembering to set nixos_livecdto the path of the downloaded iso.

You should now be at a login prompt in a VM window,which you can login to with root and no password.

From the menu bar,select “Devices” and thenthe name of your USB device to attach it.

Now in the VM window,mount the device:

Now we’ll install the driver:

Then we will export the driver and all of its dependencies

Finally,unmount the USB drive and shutdown the VM:

Prepare livecd

Open “Disk Utility”and change the USB partition name to NIXOS_ISO.

Mount the downloaded livecd,and then copy its contents onto the USB device.

Eject the ISO and the USB device.

Prepare partition

Open Disk Utility,click on “Macintosh HD”,add new partition,choose size (e.g., half),choose format as free space,apply.

Boot into livecd

Now reboot the machine,with the USB device inserted,and hold down the Option key.

You should be presented with three choices:“Machintosh HD”, “Recovery”, and “EFI Boot”.Select EFI Boot. How to update my macbook pro operating system.

(Optional) Install Broadcom driver

Skip this if you didn’t followthe steps in “Prepare Broadcom driver”.

First,mount the USB device’s DATA partitionand import the Broadcom driver and dependencies.

Now install the driver:

Finally, load the driver:

Create disk partitions

We will be creating two new partitionsin the free space we made in the previous step.The first will be 512MB,and be used as our Linux boot partition.The second will use the remaining free spaceand be used for our Linux swap and root partitions.

How To Install Linux On Macbook Air

Make note of the partition numbersassigned to the partitions.You can always find them againby running fdisk -land reading the device name of the last two entries,whose types should be “EFI Boot” and “Linux Filesystem”.

Configure disk encryption

On OS X,the standard for disk encryption is FileVault.On Linux, it’s LUKS.

We’ll be using a strategy called LVM On LUKS,where the partition we created aboveis an encrypted LUKS partition,on top of which we’ll layer root and swap partitions with LVM.

Format partitions

And then mount them:

You can recover back to this step,by booting into the livecdand running:

Connect to wireless network

You will need a network connectionto complete your NixOS installation.The following commands will update your wireless configurationto recognize your local wireless network.

Within a few seconds,you should be connectedand a command like ping -c 1 google.comshould be successful.

Configure and install system

Start by generating a template configuration:

This will produce two files:

  • /mnt/etc/nixos/configuration.nix:the system’s configuration file
  • /mnt/etc/nixos/hardware-configuration.nix:the system’s hardware configuration

Install Linux On Mac Pro

If you followed this guide’s Broadcom instructions above,you’ll need to apply an edit to hardware-configuration.nix.Find the line which starts with boot.extraModulePackagesand enable the Broadcom kernel moduleby removing the surrounding quotes:

Now we will need to edit configuration.nixto contain the minimum requirements:

How To Install Linux On Macbook Air Command

Also, you should ensure that the grub deviceis correct. For me, this was:

Blender software download for pc 32 bit. Now copy your wireless configuration:

And then install!

If everything goes well,reboot to boot into your new NixOS system!

OS X final steps

When you updated the partition table with gdisk,the recovery disk partition lost some metadata,and shows up as “EFI Disk” instead of “Recovery”.If you go into Disk Utility,and hit “Repair” on “Macintosh HD”,that will fix this.

Install

Also, don’t forget to re-enable FileVaultif you turned it off earlier!

Where to go from here

At this point,you should be able to dual-bootinto a functional, if not particularly useful,NixOS system.

Now starts the fun part,which I’m still going through myself,of exploring Nix, NixOS, and Linuxto build your new environment.I can recommend some resourcesto help you on your way:

  • NixOS Options—browser-based searchand documentation for NixOS configuration options.
  • man configuration.nix—the same information as above,in your terminal.
  • GitHub code search—include language:nix in your searchto turn up other user’s configurations.
  • My current system and userNix configurations.

References and credits

  • Lots of helpful people on Linux forums and StackOverflow.




How To Install Linux On Macbook Air
Back to posts
This post has no comments - be the first one!

UNDER MAINTENANCE