Question

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.

RECIPE

Install Ubuntu

  • 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 with 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 /sbin/ifconfig -a.]

*[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.

The following is from these three recipes.

Introduce 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).
  • Use gparted (How to reveal this on the command line? mount? parted -l? fdisk /dev/sda?) to determine the ext4 partition. Say it's /dev/sda2.
  • 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
  • Add nomodeset to GRUB_CMDLINE_LINUX_DEFAULT.
  • sudo update-grub.

The output at this last step is:

Sourcing file `/etc/default/grub`
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.0.0.23-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 /dev/sda2?

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?

Was it helpful?

Solution

You are trying to boot from the flash drive after you have installed Ubuntu. Instead, you need to boot to GRUB installed on your internal drive. This can be done by pressing the esc key once immediately after selecting Ubuntu from the Start Menu. (I assume here you installed for a UEFI boot.) It took me a couple tries before getting the hang of it. Once booted to GRUB, you can add nomodeset, then proceed to boot to Ubuntu.

First thing I would do is turn the GRUB menu back on. Below are the steps to do so.

  1. Press the keyboard combination control+option+T to open a Terminal window.
  2. Enter the command sudo gedit /etc/default/grub.
  3. Change GRUB_TIMEOUT_STYLE=hidden to GRUB_TIMEOUT_STYLE=menu.
  4. Save and exit the editor.
  5. Enter the command sudo update-grub.

To add nomodeset to GRUB, follow the same steps as above, except change step 3 to the following.

  1. Change GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset".

References

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top