[conspire] Some notes about installing Linux distros on Intal Macs

Rick Moen rick at linuxmafia.com
Sun Feb 12 01:11:36 PST 2023


Here is a set of notes I quickly researched and wrote up prior to this
past evening's visit of Eric, our new member who wanted our help
installing Linux onto aging (Intel-type) Macs.  Incidentally, Eric
was entirely successful -- using a recent Xubuntu ISO.



This document is about Linux on Intel-based Macs.  It won't address
ARM-based (M1 / M1 Pro / M1 Max / M2) Macs, PowerPC-based Macs, or
Motorola m68k-based Macs.

Which Linux distro?  Any Linux distro with an x86_64 (sometimes called
AMD64) flavour.  Look for that flavour, when downloading the ISO file
you will use for installation.



Methods:

1.  You can run your choice of distro as a guest under VirtualBox,
VMware, or Parallels for MacOS.

2.  You can multiboot a Linux distro and MacOS, after installing the
rEFInd bootloader in MacOS.
https://www.howtogeek.com/187410/how-to-install-and-dual-boot-linux-on-a-mac/

The rEFInd bootloader, recommended by _older_ HOWTOs such as 
https://www.linux.com/training-tutorials/how-install-linux-intel-mac-boot-camp/
,  is now deprecated because it's unmaintained.  (Apple's proprietary
Boot Camp bootloader _can_ boot Linux, but only with some extra work.
https://www.systranbox.com/can-i-use-bootcamp-to-install-linux/)

There are many other bootloaders that can be used, provided they support
EFI booting (used by all Intel Macs).




Before installing any bootloader, it will be necessary (on recent
versions of MacOS, since 10.11 El Capitan) to temporarily disable System
Integrity Protection:
https://www.makeuseof.com/tag/disable-system-integrity-protection-shouldnt/

Restart.  During bootup, hold down Command-R to enter Recovery Mode.
Enter Utilities, Terminal.  Type:
  csrutil disable
Restart.
Reverse the change by typing
  csrutil clear



MacOS's GUI utility "Disk Utility" can non-destructively resize Mac
partitions.


3.  Or you can overwrite the system storage, and (more simply) install
Linux as the solo operating system.


4.  Or you can install Linux onto removable, external media, such as a
USB flash drive or external USB drive, and boot from that device any
time you wish to run Linux.  Note that runtime performance will
generally take a bit of a hit from slower media access and from reliance
on (slower) USB transport.


Creating bootable Linux USB drives on MacOS
(https://www.howtogeek.com/741125/how-to-create-a-bootable-linux-live-usb-on-your-mac/):
In Disk Utility, format the drive to FAT.  4GB is fine.  

Convert ISO to MacOS's native IMG aka DMG format (and note that filename
extention ".DMG" will be autoapplied:

  hdiutil convert /path/to/downloaded.iso -format UDRW -o /path/to/image


Use diskutil to find the target partition on your USB drive:

  diskutil list


Use diskutil to umount it.

  diskutil unmountDisk /dev/diskX


Overwrite the partition with the DMG contents, using dd.

  sudo dd if=/path/to/image.dmg of=/dev/diskX bs=1m


To select current boot device at Mac startup time, hold down Option key.


Open source utility UNetbootin is a cross-platform tool for creating
"live" Linux systems on USB flash devices, and can make bootable on such 
devices a variety of open-source Unixes and other OSes including Ubuntu,
Fedora, openSUSE, CentOS, Gentoo, Linux Mint, Arch Linux, Mandriva,
MEPIS, Slackware, FreeDOS, FreeBSD and NetBSD.  Optionally, it can
network-install the OS rather than pulling it from a local ISO image.
_More-modern_ equivalents include balenaEtcher and Ventoy, and there are
others:
https://en.wikipedia.org/wiki/List_of_tools_to_create_bootable_USB
Notably, balenaEtcher and Ventoy are multi-OS capable, i.e., can set up
a removable drive to offer a boot-time bootloader choice among several
OSes whose ISOs are also on the drive.






More information about the conspire mailing list