Mac Dual Boot | Linux Server (ubuntu) and macOS together*

[su_shadow style=”default” inline=”no” class=”EditusIgnore”]
Box title

You may have to reinstall reFInd even after you have used it successfully. So far I have only had to do that from Ubuntu.

sudo apt install refind
also
refind-mkdefault 
– make it the default launcher – https://manpages.ubuntu.com/manpages/bionic/man8/refind-mkdefault.8.html
Also trying setting macOS as primary – not ubuntu
https://studysection.com/blog/how-to-change-boot-order-in-ubuntu-18-04-from-grub2-to-set-windows-as-default-launch/  

Using terminal

  1. Edit the configuration file via command: # sudo gedit /etc/default/grub Now, change the line GRUB_DEFAULT=0 to GRUB_DEFAULT=saved and now save the file. ubuntu1 In Ubuntu, use the command below to edit the Grub configuration file: # sudo nano /etc/default/grub And save changes in this file.
  2. To apply the configuration changes you need to run the Update grub command : # sudo update-grub
  3. Finally set a default boot OS simply using the below command: # sudo grub-set-default NUMBER Boot entries start from 0. If the Windows Boot Manager is the second entry, so the NUMBER is ubuntu2
 

Note: Ubuntu Bugginess

22. GET MISSING WINDOWS BACK IF YOU USE A DUAL BOOT SYSTEM
During the early testing of Ubuntu 22.04, I noticed a known bug that came with the new Grub 2.6. It had disabled the os-prober by default. This means that Grub won’t check for the presence of other operating systems. In other words, it won’t see Windows (or other Linux distributions) if you opted for a dual boot system. Now, I haven’t checked if this issue has been fixed or not but if you face this issue with your dual boot system, then edit the /etc/default/grub file to add GRUB_DISABLE_OS_PROBER=false to this file. Save this file, update grub and Grub should see other operating systems now.

Install Ubuntu on 2nd Internal Drive – MacOS on another

INSTALL WITH USB: https://help.ubuntu.com/community/How%20to%20install%20Ubuntu%20on%20MacBook%20using%20USB%20Stick

It seems to be entirely possible, this guide seems to be sensible. From what I've read on other tutorials, it's essential to install a utility called rEFInd, as Macs need their EFI boot loader to be modified correctly.

There are also some brief notes from a user who has completed the process earlier this year here.

This link has details on installing rEFInd, near the bottom of the page it has instructions for installing on another disk.

[/su_shadow]
Dual BooterGitlabDual Boot - Ubuntu / macOSmore...

This is the one I used

 

 

Method 2: Create bootable Ubuntu USB in macOS using command line

This is an old method but evergreen method. I used this method when Etcher did not exist.

Be careful while using the command. Following all the steps carefully will have you going. Let’s see what you need to for a bootable USB:

Step 1: Format the USB drive

Apple is known for defining its own standards and no surprises that Mac OS X has its own file system type known as Mac OS Extended or HFS Plus. So the first thing you would need to do is to format your USB drive in Mac OS Extended format.

To format the USB drive, plug in the USB key. Go to Disk Utility program from Launchpad (A rocket symboled icon in the bottom plank).

Disk Utility Mac

  • In Disk Utility, from the left hand pane, select the USB drive to format.
  • Click the Partition tab in the right side pane.
  • From the drop-down menu, select 1 Partition.
  • Name this drive anything you desire.
  • Next, change the Format to Mac OS Extended (Journaled)

The screenshot below should help you.

Format USB drive in Mac to  make it bootable

There is one last thing to do before we go with formatting the USB. Click the Options button in the right side pane and make sure that the partition scheme is GUID Partition Table.

Make a bootable USB in Mac

When all is set to go, just hit the Apply button. It will give you a warning message about formatting the USB drive. Of course hit the Partition button to format the USB drive.

Step 2: Download Ubuntu

Of course, you need to download ISO image of Ubuntu desktop. Jump to Ubuntu website to download your favorite Ubuntu desktop OS. Since you are using a Macbook Air, I suggest you to download the 64 Bit version of whichever version you want. Ubuntu 14.04 is the latest LTS version, and this is what I would recommend to you.

Step 3: Convert ISO to IMG

The file you downloaded is in ISO format but we need it to be in IMG format. This can be easily done using hdiutil command tool. Open a terminal, either from Launchpad or from the Spotlight, and then use the following command to convert the ISO to IMG format:

hdiutil convert -format UDRW -o ~/Path-to-IMG-file ~/Path-to-ISO-file

Normally the downloaded file should be in ~/Downloads directory. So for me, the command is like this:

hdiutil convert -format UDRW -o ~/Downloads/ubuntu-14.10-desktop-amd64 ~/Downloads/ubuntu-14.10-desktop-amd64.iso

ISO To IMG conversion

You might notice that I did not put a IMG extension to the newly converted file. It is fine as the extension is symbolic and it is the file type that matters not the file name extension. Also, the converted file may have an additional .dmg extension added to it by Mac OS X. Don’t worry, it’s normal.

Step 4: Get the device number for USB drive

The next thing is to get the device number for the USB drive. Run the following command in terminal:

diskutil list

It will list all the ‘disks’ currently available in the system. You should be able to identify the USB disk by its size. To avoid confusion, I would suggest that you should have just one USB drive plugged in. In my case, the device number is 2 (for a USB of size 8 GB): /dev/disk2

create bootable USB drive in Mac OS X

When you got the disk number, run the following command:

diskutil unmountDisk /dev/diskN

Where N is the device number for the USB you got previously. So, in my case, the above command becomes:

diskutil unmountDisk /dev/disk2

The result should be: Unmount of all volumes on disk2 was successful.

Step 5: Creating the bootable USB drive of Ubuntu in Mac OS X

And finally we come to the final step of creating the bootable USB drive. We shall be using dd command which is a very powerful and must be used with caution. Therefore, do remember the correct device number of your USB drive or else you might end up corrupting Mac OS X.

Use dd command in the following manner to create live USB:

sudo dd if=/Path-to-IMG-DMG-file of=/dev/rdiskN bs=1m

Here, we are using dd (copy and convert) to copy and convert input file (if) IMG to diskN. I hope you remember where you put the converted IMG file, in step 3. For me the command was like this:

sudo dd if=~/Downloads/ubuntu-14.10-desktop-amd64.dmg of=/dev/rdisk2 bs=1m

As we are running the above command with super user privileges (sudo), it will require you to enter the password. Similar to Linux, you won’t see any asterisks or something to indicate that you have entered some keyboard input, but that’s the way Unix terminal behaves.

Even after you enter the password, you won’t see any immediate output and that’s normal. It will take a few minutes for the process to complete.

Step 6: Complete the bootable USB drive process

Once the dd command finishes its process, you may see a dialogue box saying: The disk you inserted was not readable by this computer.

Bootable USB Mac OS X

Don’t panic. Everything is just fine. Just don’t click either of Initialize, Ignore or Eject just now. Go back to the terminal. You’ll see some information about the last completed process. For me it was:

1109+1 records in 1109+1 records out 1162936320 bytes transferred in 77.611025 secs (14984164 bytes/sec)

Create_bootable_USB_Mac_OSX_1

Now, in the terminal use the following command to eject our USB disk:

diskutil eject /dev/diskN

N is of course the device number we have used previously which is 2 in my case:

diskutil eject /dev/disk2

Once ejected, click on Ignore in the dialogue box that appeared previously. Now your bootable USB disk is ready. Remove it from the system.

Step 7: Checking your newly created bootable USB disk

Once you have completed the mammoth task of creating a live USB of USB in Mac OS X, it is time to test your efforts.

  • Plugin the bootable USB and reboot the system.
  • At start up when the Apple tune starts up, press and hold option (or alt) key.
  • This should present you with the available disks to boot in to. I presume you know what to do next.

For me it showed tow EFI boot:

Booting Ubuntu from USB in Mac OS X

I selected the first one and it took me straight to Grub screen:

Ubuntu grub in Mac OS X

I hope this guide helped you to create a bootable USB disk of Ubuntu for Mac in OS X. We’ll see how to dual boot Ubuntu with OS X in next article. Stay tuned.

 

 

 

 

 


https://www.makeuseof.com/tag/install-linux-macbook-pro/amp/

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 with balenaEtcher:

  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.

alt="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.

alt="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.

alt="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.

alt="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!

alt="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!

[su_shadow style=”default” inline=”no” class=”EditusIgnore”]
Install ReFind on Ubuntu as well

Refind – Ubuntu

Ubuntu instructions
Ubuntu Linux has excellent support for the rEFInd bootloader. Getting it working is very easy, as the console does virtually everything for you. To start the installation of the rEFInd bootloader on Ubuntu, open up a terminal window. A terminal window can be opened by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard.

Once a terminal window is open and ready to use, use the Apt package manager to install the rEFInd bootloader package from the “Universe” software repository.

Note: if you do not have “Universe” already enabled, turn it on with sudo add-apt-repository universe in the command line.

sudo apt install refind

As you enter the installation command, your Ubuntu PC will go through the process of collecting several different dependencies required to run the bootloader on the system. Be patient as it installs, and don’t take your attention away from the terminal window.

Following the installation of the program, a text-based graphical user interface will appear on the screen. In this screen, you’ll see a message asking you if you’d like to automatically install rEFInd to the ESP (UEFI boot partition). Allow it to install. If everything is successful, rEFInd will be ready to use on Ubuntu.

[/su_shadow]

https://about.gitlab.com/install/#ubuntu


https://eshop.macsales.com/blog/67497-mac-mini-as-linux-server/

 

Mac mini – as linux server using ubuntu.

I recently showed you how to use a used Mac mini as a media server for your home. Today, I continue the theme of recycling and reusing older Mac minis by turning one into a Linux server.

What’s a Linux Server?

For businesses, a server is a computer that provides services for a group of users. The services can include:

  • Mail server
  • File server (shared and private directories)
  • Directory server
  • Domain Name Service server
  • Web server
  • Wiki server (not widely used anymore)
  • Calendar server

And more…

When you set up an email account on your Apple device, you’re connecting to a mail server. Visiting a website? Your computer is connecting to a web server. You get the picture…

Many companies find it is more cost-effective to use cloud services instead of their own server. For the security of your data, nothing beats having a server on-site in a locked server room. Running your own server also provides more flexibility in customizing services.

Linux is a family of open-source UNIX-like operating systems and is used on many servers.

Why a Linux Server and not macOS Server?

Are you wondering why I’m talking about using the Open Source Linux operating system and not macOS? Apple used to sell and support a Server version of macOS. The Rocket Yard featured a series of articles on Mastering macOS Server in 2017. By early 2018, Apple removed most of the useful features of macOS Server and rendered it essentially useless.

For an Apple-centric shop, buying into the Microsoft Windows Server world is a costly and counterintuitive move. All Apple operating systems are UNIX-based, and Linux is a form of UNIX. Linux was estimated to run 67% of all web servers in 2016, and that number has probably grown since that time.

Most important for our experiment is that Linux distributions (“distros”) easily run on Intel-based Macs. That may change in the future when Apple Silicon rules the world of Mac, but since Linux runs on ARM processors (the heart of Apple Silicon), it should run on future Macs.

The Hardware for our Linux Server

For this article, I’m using the same 2014 Mac mini that took the starring role in the Plex Media Server article. One thing that’s important for this experiment is to have a Mac that supports EFI — Extensible Firmware Interface. EFI lets users select between multiple operating systems at boot time by holding down the Option key on the keyboard. EFI came along with the advent of Intel processors in Macs in 2006, and any Intel-based Mac should support the dual-boot setup we’ll use in this article.

Selecting a Linux Server Distribution

There are about as many Linux distros as there are stars in the sky. OK, I’m exaggerating, but there are a lot of different possibilities. You can choose openSUSE, CentOS, Debian, RedHat, or one of the other hundreds of distros. One of the most popular is Ubuntu Linux by Canonical, which comes in many different subtypes. I’m most interested in a version that runs on “desktop” hardware like our Mac mini.

I have a choice of Ubuntu Desktop or Ubuntu Server. While you might think I’d jump on the Server version, I want to make this as simple an exercise as possible. I’m going with the Desktop version because it has a graphical user interface. For Mac users who might not have much experience using a command-line interface (like the one available from the macOS Terminal app), a GUI just makes a lot more sense.

Create a Bootable Clone

It is a very good idea to create a bootable clone of your Mac mini prior to beginning the installation. Should something go wrong during the process, you can always plug in the bootable clone for access to Disk Utility and other Mac apps you may need.

Trust me on this point: I needed to completely restore our Mac mini’s SSD while writing the post. It would have been impossible without having a bootable clone. To create the clone, we used Carbon Copy Cloner. This is an excellent backup utility for Mac in that it creates exact clones of any drive, and it’s extremely easy to use.

Note: Mike Bombich, developer of Carbon Copy Cloner, recently expounded on the use of the app with macOS 11 Big Sur. It’s worth reading if you’ll be upgrading your Mac to Big Sur.

Prepare Your Mac

I recommend using an Ubuntu installation DVD to install Ubuntu on the Mac mini. There are other methods available that require an Ethernet connection and a USB flash drive, but I found that the DVD method helped by letting me set up a Wi-Fi connection during or just after installation.

I have an Apple SuperDrive connected to this Mac mini, so I created an Ubuntu installation DVD. This page on the Ubuntu website describes the process.

Cleaning Up

The test Mac mini has only 120GB of SSD storage and iCloud synchronization had quickly filled that. I found it useful to “nuke it from orbit” by booting into Recovery Mode (hold down Command (⌘) – R during a restart), selecting Disk Utility, selecting the disk volume that contained “Macintosh HD” and “Macintosh HD Data”, and erasing it.

Once that was quickly completed, I quit Disk Utility, then selected “Reinstall macOS Catalina”. Within about 25 minutes my Mac had a fresh installation of macOS. To keep things from getting crowded again, I immediately shut down iCloud syncing for Photos and Documents. This opened up all but about 20GB of the 120GB SSD.

Create Linux Partitions on the Mac Drive

For dual-booting our Linux server, I need two partitions — one for Linux and the other for swap space. The swap partition must be the same size as the amount of RAM in the Mac. To find that number, go to  > About This Mac.

About This Mac showing 4GB of RAM in this Mac mini / Linux serverAbout This Mac showing 4GB of RAM in the Mac mini / Linux server

Our Mac has 4GB of memory, so our Linux server swap partition will also be 4GB in size.

Launch Disk Utility in Recovery Mode

It’s best practice to resize the startup volume from the macOS Recovery partition. We begin by rebooting the Mac mini while holding the Command (⌘) and R keys, then releasing the keys when the Apple logo appears.

1 – Select Disk Utility from the macOS Utilities window that appears, and click Continue.

2 – In the top-left corner of the Disk Utility window, click the View button and select View > Show All Devices

3 – Select the highest-level drive listed. On the test Mac mini, that drive is called OWC Mercury EXTREME Pro 6G SSD Media. Click the Partition button in the Disk Utility toolbar.

4 – Our drive is set up as an APFS volume. A dialog appears asking if you wish to add a volume to the APFS container or partition the device. Click Partition.

Create the UBUNTU Partition

5 – A pie chart appears showing the current partitions for the drive. Click the Plus button below that chart to create a new partition. If you wish to make the UBUNTU partition a specific size, drag the “dot” slider on the pie chart to make the partition larger or smaller. Name the partition UBUNTU and set the format to MS-DOS (FAT).

6 – Click Apply and a dialog appears. Click Partition to partition the storage. When Disk Utility displays “Operation successful”, click Done.

Not every partitioning attempt may be successful. In my case, it showed that the partitioning failed and it had left the partition as an APFS volume. I then erased the volume in Disk Utility as MS-DOS (FAT) and it partitioned the volume successfully.

Create a SWAP Partition

7 – Now repeat step 5 to create the SWAP partition, also formatted as MS-DOS (FAT). In this case, you’ll need to drag the handle in the pie chart so that the SWAP partition is exactly 4GB in size (or matches the RAM amount for your Mac mini). Click Apply, and then Done when Disk Utility affirms that the operation was successful.

8 – Select Disk Utility > Quit Disk Utility. This takes us back to the macOS Utilities.

9 – Remember the Ubuntu DVD we created earlier? Place it into the DVD drive attached to your Mac mini. You may see a message that says the disk is not readable; click the Ignore button.

10 – Restart the Mac by selecting  > Restart. Hold down the Option key on the keyboard to select a boot drive. You should see three: one that says Macintosh HD, another that says Windows, and one that says EFI Boot. Select EFI boot with your mouse, then press Return to begin loading Ubuntu. Warning! From now on, the screenshots you see are from my iPhone as it’s impossible to take screenshots while setting up Ubuntu. Sorry!

 Select EFI Boot to begin installing Ubuntu Linux from the Install DVDSelect EFI Boot to begin installing Ubuntu Linux from the Install DVD

Install Ubuntu Linux

The first thing that happens is that you see a lot of text commands scrolling by on the screen, after which the installer begins doing a lengthy series of disk checks. Go ahead and let it happen, although you may feel like it’s never going to stop! Eventually it finishes and you’ll see this:

The Welcome Screen: Select your language of choice, then click Install Ubuntu on our Linux ServerThe Welcome Screen: Select your language of choice, then click Install Ubuntu.

Select your language choice on the left, then click Install Ubuntu. On the next screen (Keyboard Layout), select the keyboard layout you’re using. We selected English (US). Click Continue.

Join a Wi-Fi network if you’re asked to

At one point, you may see a prompt to select and join a Wi-Fi network. If this appears, go ahead and enter the Wi-Fi network name (SSID) and password. This helps along with the installation by allowing Ubuntu Linux to download updates. If not, you’ll have the opportunity to select your Wi-Fi network later once Ubuntu is installed.

Click the radio button for Normal Installation and check the box for "Install third-party software..."Click the radio button for Normal Installation and check the box for “Install third-party software…”

On the next screen (see screenshot above), select “Normal Installation” and Install third-party software for graphics and Wi-Fi hardware and additional media formats. Click Continue.

Now we get to an Installation Type screen. Do NOT just “Erase disk and install Ubuntu”, because this erases everything…including your macOS partition. Instead, click “Something else” and then “Install Now”.

Choose "Something else" and click the Install Now button to choose partitionsChoose “Something else” and click the Install Now button

The next screen (below) displays how the disk is formatted. The Orange (sda2) is macOS, the blue (sda3) is the Swap partition, and the green (sda4) is our Ubuntu partition.

How Ubuntu installer sees the Mac mini diskHow Ubuntu installer sees the Mac mini disk

Assign the partitions to Linux

To set up the partitions to use Linux, select the Swap partition first (4GB in our case) by clicking on the correct Device (/dev/sda3 fat32 in my example) to highlight it, then click Change…

Editing the swap partition of our Linux serverEditing the swap partition

A dialog titled “Edit Partition” appears (see screenshot above). See the “Use as” drop-down? Select “swap area” from the list, and then click OK. Note that you’ll see a “Write previous changes to disk and continue?” dialog — click Continue and let the installer do its thing.

Editing the primary Ubuntu partition of our Linux serverEditing the primary Ubuntu partition

Now it’s time to allocate the larger partition to be our main Ubuntu partition. Click on the Ubuntu partition (/dev/sda4 fat32 in this example) to highlight it, then click Change. The Edit Partition dialog appears again. In this case, select “Ext4 journaling file system” from the drop-down menu, check the “Format the partition” box, and select / as the mount point. Click OK.

At this point, you should have two partitions — a smaller one of type “swap” and a larger one that is going to be formatted as “Linux ext4”. These partitions coexist with the macOS partitions.

Time to Install Ubuntu on our Linux Server

Feeling lucky? Click the Install Now button. Before anything happens, the Ubuntu installer gives you one more chance to make sure you’ve done everything right.

One final chance to make sure everything's ready to go...before we install Ubuntu on our Linux serverOne final chance to make sure everything’s ready to go…

I’m feeling lucky, so with a click of the Continue button, we’re on our way to setting up our Linux server.

You’re asked to pinpoint your location on a map in order to set the proper time zone. If Ubuntu has selected the correct time zone, click Continue. If not, click on the map to denote your time zone, then click Continue.

Set up a user account on our Linux server

The next screen asks information for setting up your administrative account. It asks for your name, the name you wish to give the computer (we called this MINI-SERVER), a username, and a password. Fill the blanks and click Continue.

Who are you? Who, who, who, who. Setting up a user account for our Linux server.Who are you? Who, who, who, who. Setting up a user account for our Linux server.

While Ubuntu is installing, it displays a splash screen showing the features of the most recent version as well as a progress bar. When everything is ready to roll, you’ll see an “Installation Complete” dialog with a Restart Now button. Click that button.

You’ll see some code on the screen, then a dialog asking you to “Please remove the installation medium, then press ENTER” (that’s the Return key on your Mac keyboard). Once the install DVD has been kicked out and you’ve retrieved it, press Return.

First boot of our Linux server

The Mac boots into Ubuntu Linux, and you’ll be asked to log in with the password you set earlier. Type it in and press Return.

Before you do anything else, it’s a good idea to set up Wi-Fi. In the extreme upper right corner of your screen, you’ll see what appears to be a “power button”. Click it, and you’ll see some settings. It will show Wi-Fi as “Not Connected”. Click the downward-pointing disclosure triangle, then choose “Select Network” from the choices available.

Click the name of the Wi-Fi network you wish to connect to, click Connect, and then enter the password for the network. As soon as you see that the computer is connected to your Wi-Fi network, you can continue to go about your business.

Livepatch and Ubuntu One

You may see a dialog asking you to set up Livepatch, which is a tool to keep your Linux server machine secure by automatically applying patches that normally require a reboot. You’ll need to re-enter your Ubuntu password to authenticate, and then set up an Ubuntu One account.

Create an Ubuntu One (single sign-on) account. Livepatch automatically applies updates to our Linux serverCreate an Ubuntu One (single sign-on) account

Click the “I want to register for an account now” radio button before clicking Connect. This launches Firefox (the default web browser for Ubuntu). Fill in your email address, select a username, and a password.

You’ll need to verify the email address. Since you haven’t set up email on the Linux server machine yet, check your iPhone, iPad, or another Mac for an email from Ubuntu One. Click the confirmation link and follow the instructions.

When in doubt, test it out

At this point, it’s not a bad idea to make sure that we can actually dual-boot the Mac/Linux hybrid! Go to the upper right corner again, and Power Off.

Now, press the Option key on the keyboard, and power up the Mac mini again. You’ll see two volumes to boot from — EFI Boot (Linux) and Macintosh HD (macOS). Select EFI Boot to head back into Linux, or select Macintosh HD to boot into macOS. I tried both of them just to be sure that everything was working as desired.


Until Next Time…

This has been a lot of time-consuming work so far. The Mac mini is now set up as a dual-boot macOS / Ubuntu Linux server machine.

In the next installment of this series, we’ll look quickly at the basic Ubuntu operating system, then dive into setting this mini to be a full Linux server.

 

https://www.makeuseof.com/tag/install-linux-macbook-pro/

Whether you need a customizable operating system or a better environment for software development, you can get it by dual booting 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.

RELATED:Things That Ubuntu Does Better Than Windows

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.

Running Linux on an Apple Silicon Mac

Despite what we’ve said above, dual booting Linux isn’t currently possible if your Mac uses an Apple silicon chip, whether it’s an M1, M1 Pro, or M1 Max. Instead, you’re only real option for running Linux on an Apple silicon Mac is to use a virtual machine such as Parallels or UTM.

RELATED:The Best Virtual Machine Apps For Mac (Great For Running Windows)

For everyone else, we’ll explain how to dual boot Linux on Intel-based Macs 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. Open the Apple menu and go to About This Mac > Storage to check that you have at least 25GB free (but preferably more).

About This Mac storage window with over 100GB available

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 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 > 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 (FAT32)

    . 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 something like 4GB, 8GB, or more.

  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 after.

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 with balenaEtcher:

  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!

Scroll to Top