News Trending

How to Install and Dual Boot Linux on Your Mac

ad+1

linux-macbook-pro-retina

Whether you need a customizable operating system or a better environment for software development, you can get it by installing Linux on your Mac. Linux is incredibly versatile (it’s used to run everything from smartphones to supercomputers), and you can install it on your MacBook Pro, iMac, or even your Mac mini.

Apple adding Boot Camp to macOS made it easy for people to dual boot Windows, but installing Linux is another matter entirely. Follow the steps below to learn how to do this.

Why Install Linux on a Mac or MacBook Pro?

Your Mac offers excellent performance, superb battery life, and long durability. The hardware on a Mac is difficult to match, which makes it an incredibly powerful machine for running Linux.

What’s more, Linux breathes life into old Macs that are no longer eligible for macOS updates. Rather than letting your old MacBook Pro turn into an expensive paperweight, install the latest version of Linux and keep it going for years to come.

Ubuntu Is Our Linux Distribution of Choice

There are many different versions of Linux available, but for the purposes of this tutorial, we suggest installing Ubuntu on your Mac. Ubuntu is the most popular Linux distribution, which means there are lots of active support communities available if you ever need help.

We even wrote an extensive beginner’s guide to Ubuntu you can use to get started with it.

To Dual Boot or Not to Dual Boot

With a dual boot system, both macOS and Linux are installed on your Mac. Hold Option while your computer boots up to choose which operating system to use. The main difference between a dual boot system and a virtual machine is that you can only use one OS at a time while dual-booting, but you get better performance.

If you don’t plan to ever use macOS again, you might want to completely replace it with Linux instead. That way, none of your storage is used up by its system files.

However, if you ever change your mind, it’s difficult and time-consuming to restore macOS again in the future. This is especially true since Linux writes over the macOS Recovery partition.

For that reason, we recommend you dual boot Linux on your Mac. If you’re really certain you don’t want to do that, just skip the Partition step in the instructions below.

Step 1: Prepare Your Mac for Installing Linux

To install Linux on your Mac, you need a USB flash drive with at least 2GB of storage. You’ll erase the flash drive in a future step to put an Ubuntu installer on it, so make sure you’ve backed up any important files first.

Use an Ethernet adapter to connect your Mac to the internet. This is important, because your Wi-Fi may not work in Ubuntu without third-party drivers. Similarly, iMac users should get hold of a USB keyboard or mouse, in case Bluetooth doesn’t work.

If you plan to dual boot your Mac with Linux, you also need to make sure you have enough free storage. Go to Apple menu > About This Mac > Storage to check that you have at least 25GB free (but preferably more).

Mac Storage info

Finally, make a backup of your Mac. You shouldn’t lose any data by installing Linux in a dual boot partition. However, if something goes wrong, you may need to erase your entire Mac to fix it.

If you plan to replace macOS with Linux, rather than creating a dual-boot system, use Carbon Copy Cloner to back up your macOS Recovery partition. This makes it far easier to revert back to macOS again in the future.

Step 2: Create a Partition on Your Mac Drive

Disk Utility window showing Linux and Swap partitions for Dual Boot on Mac

For a dual boot system (which we strongly recommend), you need to create a Linux partition on your Mac’s hard drive. If you don’t want to create a dual boot system, skip ahead to the next step.

In fact, to dual boot Linux on a Mac, you need two extra partitions: one for Linux and a second for swap space. The swap partition must be as big as the amount of RAM your Mac has. Check this by going to Apple menu > About This Mac.

Use Disk Utility to create new partitions on your Mac:

  1. Open Disk Utility from the Utilities folder in your Applications, or search for it via Spotlight.
  2. In the top-left corner, select View > Show All Devices.
  3. Select the highest-level drive for your Mac hard disk, then click Partition.
  4. Use the Plus button to create a new partition. Name it UBUNTU and set the format to MS-DOS (FAT). Give it as much space as you want to use for Linux.Ubuntu partition information in Disk Utility
  5. Click Apply to create the partition.
  6. Repeat the steps above to create another partition. Name this partition SWAP and set the format to MS-DOS (FAT) again. Make the size match the amount of RAM in your Mac. This might be 4GB or 8GB, for instance.
  7. Click Apply to create the partition.

If you can’t create new partitions, it could be because FileVault is encrypting your hard drive. Go to System Preferences > Security & Privacy > FileVault to turn it off.

Install rEFInd for Better Boot Options

Boot EFI option from rEFInd boot manager

The standard boot manager on your Mac doesn’t always work with Ubuntu. This means you need to install a third-party boot manager instead, which will let you easily choose between macOS or Linux when you start up your computer.

Thus, your next step is to download rEFInd, which is the boot manager we recommend. To install rEFInd, you need to temporarily disable System Integrity Protection. This is an important security feature for macOS, so make sure you enable it again afterward.

To install the rEFInd boot manager:

  1. With SIP disabled, open Terminal from the Utilities folder in Applications (or search for it using Spotlight).
  2. Open Finder in a separate window and navigate to the rEFInd download.
  3. Drag the refind-install file into your Terminal window and press Enter.
  4. When prompted, enter your administrator password and press Enter again.
  5. After the installation, remember to enable SIP again.

Dropping refind-install file into Terminal window, with the code that appears

Next time you restart your Mac, the rEFInd menu should appear automatically. If it doesn’t, hold Option while booting up to load your boot manager.

Step 3: Create an Ubuntu USB Installer

Download the latest version of Ubuntu as a disk image from the Ubuntu website. You need to use a third-party app to create a USB installer from the Ubuntu disk image. One of the simplest apps for this is balenaEtcher, but you can use anything you like.

To create an Ubuntu USB installer:

  1. Open balenaEtcher and click Select Image.
  2. Navigate to the Ubuntu disk image you downloaded and click Open.
  3. Insert your USB flash drive and balenaEtcher should automatically select it. If it doesn’t, click Select Target or Change to select the flash drive yourself.
  4. Make sure the correct drive is selected, since the next step erases it.
  5. Click Flash and enter your administrator password to erase the USB flash drive and create an Ubuntu USB installer.
  6. When it’s finished, macOS prompts you to Eject the flash drive.

balenaEtcher window ready to create an Ubuntu USB installer

Step 4: Boot Ubuntu From Your USB Installer

Restart your Mac while holding Option and reinsert the USB flash drive directly into your computer. When the boot loader appears, use the arrow keys to select the Boot EFI option and hit Enter.

An Ubuntu loading screen appears, followed by the Ubuntu desktop.

Ubuntu desktop showing Install Ubuntu disk image

Use this opportunity to test Ubuntu on your Mac. Keep in mind that because it’s running from your USB flash drive, it may be slow. Since Ubuntu can’t use your Mac’s Wi-Fi by default, use an Ethernet adapter to connect to the internet.

Disable Secure Boot on Macs With the T2 Security Chip

In 2018, Apple introduced the T2 security chip to new Macs. This advancement might stop you from booting other operating systems on your machine. If you experience any boot issues, follow Apple’s instructions to disable the T2 chip.

Step 5: Install Ubuntu on Your Mac

When you’re ready, double-click the Install Ubuntu item on the desktop.

Follow the on-screen prompts to choose your language and keyboard layout. Choose a Normal installation and select the option to Install third-party software. You need to connect your Mac to the internet using an Ethernet cable to install this software, which makes functions like Wi-Fi and Bluetooth work. Then click Continue.

Normal Ubuntu installation with third-party software selected

If prompted, choose to keep your partitions mounted.

Option 1: Dual Boot Ubuntu With macOS

From the Installation type screen, select Something Else and click Continue.

On the next screen, you need to identify and select the UBUNTU partition you created. Unfortunately, there are no recognizable partition names, so look for a device with fat32 in the name that matches the partition size, measured in MB.

Ubuntu Installation Type window selecting fat32 partitions

Double-click to select it and choose Use as: Ext4 journaling file system. Set the Mount point to / and check the box to Format the partition. Click OK. In the popup alert, click Continue to write previous changes to the disk.

Now identify your SWAP partition, which should also have fat32 in the name. Double-click it and choose to Use as: swap area, then click OK.

Open the Device for boot loader installation dropdown menu and select your UBUNTU partition again. The name should match what you selected for it from the table above.

Take a moment to ensure you selected the correct partitions, then click Install Now. Click Continue in the popup alert to confirm you want to write changes to those disks.

Finally, follow the on-screen prompts to choose your time zone and create a user account, then wait for the installation to complete.

Option 2: Replace macOS With Ubuntu

From the Installation type screen, select Erase disk and install Ubuntu.

Be warned: this erases everything from your Mac, including the operating system and the Recovery partition!

Erase disk and install Ubuntu option

When you’re ready, click Install Now and select your hard disk.

Follow the on-screen prompts to set the correct time zone and create a user account, then wait for the installation to complete.

Make Using Linux on Mac Even Easier

Congratulations! You successfully installed Linux on your MacBook Pro, iMac, or Mac mini! If you chose to dual boot Linux on your Mac, hold Option while booting up to choose between macOS and Ubuntu.

Next, take a look at some tips to make your switch from macOS to Linux easier. By adding some familiar macOS features to Ubuntu, you’ll make the most of Linux on your Mac in no time!

Read the full article: How to Install and Dual Boot Linux on Your Mac



from MakeUseOf https://ift.tt/2vuyoZu
via IFTTT

0 comments: