3

In this question I summarize a complete recipe for installing single-boot (this should be simple!) Ubuntu 18.04 LTS on an Early-2011 Macbook 17".

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?

  • Looks like great content for an answer and we can make the question easy to search by summarizing the ask. – bmike Dec 7 '19 at 16:37
  • 1
    @bmike I see your point. I'll tell you what: If you identify the one or two points that are tripping me in the recipe above, and post a one- or two-liner answer that does the trick, I'll maintain your answer to make it a self-contained answer (and perhaps simplify the question afterwards to be a one- or two-liner). – Calaf Dec 7 '19 at 16:40
  • Aah. I thought you were working this up as the way to to it. No worries. We can host both versions. You’re not wrong. It’s a mater of preference how to ask. I like to make the question short and post a partial answer, but that is like/preference, not mandatory. – bmike Dec 7 '19 at 17:18
  • My 15" Macbook Pro late 2013 has thermal issues with Linux. This article helps for disabling GPE events. Used with conjunction of mbpfan and/or macfanctld: medium.com/@racter/… – modlin Dec 7 '19 at 20:41
2

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

| improve this answer | |
  • It really is as simple as you describe, which makes me wonder how difficult it would be to suggest a patch so that a future Ubuntu (there is no point in adding to the existing already formidable number) release would work on some subset of Macs. – Calaf Dec 8 '19 at 13:32
  • If you are installing for a dual boot with macOS, then the GRUB menu is enabled by default. So, you do not have to press the ESC key. When Ubuntu is the only operating system, then the GRUB menu by default is hidden. – David Anderson Dec 8 '19 at 13:38
  • Brilliant! I began my quest to install LinuxMint on my late 2011 17" MBP yesterday, but it failed - perhaps due to not knowing to press the esc key, perhaps something else? I burned an iso to USB using balenaEtcher, boot fm USB by holding option key. I get a bit of text, but it never leads to anything. I was trying to install to a new, blank SSD - is that what you did? – Seamus Mar 18 at 1:17
  • I gave up on LinuxMint - at least temporarily to try your Ubuntu recipe. The nomodeset option seems to be a key to making this work. I say this 'cause LinuxMint "compatibility mode" gave me console output for a bit, but stopped at a line that sounded like adjusting the video config. However: After starting the Ubuntu install, it says "This computer currently has no detected operating systems". I've re-thought the single-boot idea, and for now would prefer to retain my High Sierra install - any thoughts? Shouldn't Ubuntu recognize that macos is installed? – Seamus Mar 18 at 7:00
  • @Seamus: I believe a tested my answer using VirtualBox. In other words, I never actually installed any version of Linux on a physical drive. – David Anderson Mar 19 at 0:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .