In this question I summarize a complete recipe for installing single-boot (this should be simple!) Ubuntu 18.04 LTS on a (possibly older) Mac Mini, iMac, or MacBook.
But it has an error. If you are doing an identical or similar set up, what is/are the flaw(s)?
Note 1: I'm selecting Ubuntu because I would like to have a local Linux machine that mirrors an AWS instance—for experiments that iron out differences (Docker, etc) between developing on macOS and deploying on Linux. If you can provide a complete, self-contained recipe for any distro (preferably: CentOS, Debian, Fedora, Suse, Arch, in this order), that will be just as good. For Docker etc use cases, they will all be identical.
Note 2: I'm selecting to single-boot because I have no need for running another macOS instance on this hardware. If you maintained a complete recipe for installing dual-boot Linux/macOS, that's also good, provided it doesn't add far too many steps.
- Download the Ubuntu ISO. Download Etcher. Use Etcher to prepare a USB flash.
- Insert flash. Press 'option' before chime. Choose EFI. [Puzzle: Why do two instances of EFI appear, both from the installation flash disk?]
- Press 'e'. Replace
quiet splash nomodeset.
- Install Ubuntu on Mac's disk.
[Edit 1: After less than 10 minutes we're now essentially done. If you're using this recipe, skip the rest of the question and continue from the answer. Still to-do: summarize the recipe in one place, ideally while also outlining a solution to the most obvious first roadblock after this recipe: setting up a wireless (Broadcom) driver.]
*[Edit 2: This recipe for setting up the wifi router didn't work. The 'additional driver' tab is empty.]
[Edit 3: This recipe works, but I needed to restart after each, and the first restart took a while—it appears to initiate an update that lingers after the command-line prompt returns. Short version: Control-Option-T (terminal).
sudo apt-get update. Do something else. Reboot. Perhaps wait again.
sudo apt-get install firmware-b43-installer. Reboot.]
[Edit 4: Find the machine's IP address on the local network by running
sudo apt-get net-tools followed by
*[Edit 5: Install/launch ssh server daemon by running
sudo apt install openssh-server.]
Booting from the Mac's disk will hang at the splash screen. The
nomodeset addition needs to be saved. [There may well be a quick exit at this point for a headless Linux instance (that's what one gets from AWS anyway). But let's keep that for a sequel. In this case we're after a working (KDE, etc) set up.
nomodeset to the boot script
- Boot once again from flash (press 'option'; press 'e'; adjust 'nomodeset').
- This time abort installation ('quit'). Launch the terminal (pressing the nine-dot icon brings up a search bar).
gparted(How to reveal this on the command line?
fdisk /dev/sda?) to determine the
ext4partition. Say it's
sudo mount --bind /dev /mnt/dev &&,
sudo mount --bind /dev/pts /mnt/dev/pts &&,
sudo mount --bind /proc /mnt/proc &&,
sudo mount --bind /sys /mnt/sys. [Something is wrong here. Still working on a complete, self-contained recipe.]
sudo chroot /mnt(see here). [Something is wrong here. Still working on a complete, self-contained recipe.]
sudo nano /etc/default/grub
The output at this last step is:
Sourcing file `/etc/default/grub` Generating grub configuration file ... Found linux image: /boot/vmlinuz-18.104.22.168-generic Found initrd image: /boot/initrd.img-5.0.0-23-generic grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map. done
How do I tell
sudo update-grub to use
Would using rEFInd simplify the recipe above? (update)
What is briefer, to use rEFInd or not to use it? I understand that the reason for the existence of rEFInd is to enable a dual-boot linux set up on a Mac. But if just single-boot linux is sought, does introducing rEFInd make the recipe simpler or more complicated?