0

I have a MacBook air that I converted to a Chrome OS machine with a Crouton KDE Linux environment, and I was wondering if I could configure the EFI somehow to boot straight into Chromium OS (Neverware Home Version) instead of holding down alt/option every boot. (mac os isn't on this machine, I don't like it.)

if I don't hold option I just get a flashing white folder, but booting via EFI allows it to see the chromium os install funnily enough. I havent worked with a MacBook on this level before so small words please >.<

Edit: I made some progress thanks to @cory-t but now I'm stuck here, and I don't know what to pick in case I brick my MacBook => Terminal Output

Update: I grew a pair and tried all 4, no success. all I see is a white folder with a question mark in it. still.


Update: I completely uninstalled Chrome OS and replaced it with KDE and I'm still getting

efibootmgr: EFI variables are not supported on this system

2 Answers 2

1

Broadly speaking, there are two ways to get this going, but there are lots of variants within both categories. Note that you should understand your partition table layout before you begin. I recommend you type sudo gdisk -l /dev/sda from an emergency Linux disk. Among other things, this will show something like this:

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

This example shows a pure GPT disk -- GPT: present means that the disk is a GPT disk, and MBR: protective means that it's a standard legal GPT disk. If it instead reads MBR: hybrid and GPT: present, that identifies a GPT disk with a hybrid MBR; and if it reads MBR: MBR only and GPT: not present, that identifies a pure-MBR disk. Which disk type you've got determines how the Mac's firmware might behave, as detailed shortly.

You should also look for a partition with a Code column of EF00. If present, this is an EFI System Partition (ESP), which is important for EFI-mode booting.

With this information in hand, you can begin considering your boot-mode options....

BIOS/CSM/Legacy-Mode Installation

For a Linux-only installation on a Mac, a BIOS/CSM/legacy-mode install on a pure-MBR disk is generally simplest. This causes the Mac to boot in BIOS mode, bypassing the need to configure EFI boot variables. Precisely how to get to this state from where you are, though, depends on your current disk layout. Possible steps include:

  1. Boot to a Linux emergency system.
  2. Convert the hard disk from GPT to MBR. This step might or might not be necessary, depending on the disk's current state. See this documentation (part of my gdisk documentation) for general information. Note that, if you have more than four partitions, or expect to need more than four in the future, you'll need to set up some partitions as logical, and there are placement issues with that. I can't be more precise without knowing the sector-precise current partition layout.
  3. Install a BIOS-mode boot loader. For Ubuntu and related distributions, the easiest way to do this is with Boot Repair. I can't promise this tool would work well with other distributions, though. You may need to do it manually, and I'm afraid I don't have ready pointers on this task. Some distributions install GRUB manually as part of the OS installations, and for them, their installation instructions should tell you how to do it.

Getting EFI-Mode Booting to Work

Macs have EFI firmware, so doing native EFI-mode booting is doable; however, Macs are always a bit weird. For most EFI-based computers, the Compatibility Support Module (CSM), which provides BIOS compatibility, is a complication if you want to boot in EFI mode. (See my page on this subject for details.) On Macs, the CSM is activated by the presence of an MBR or hybrid MBR on the hard disk, so you want to be sure this does not exist. GParted and parted wipe a hybrid MBR if the disk is partitioned as a GPT disk, and gdisk can wipe a hybrid MBR via the n option on its experts' menu. Note that GPT is generally the partition table type used with EFI-mode boots. Thus, if the disk uses MBR, you may want to convert it, which gdisk can do. (Loading the partition table and then saving it back out via the w command will probably do the job. You might need to create an EFI System Partition (ESP), though.)

Macs can also boot in BIOS/CSM/legacy mode if an optical disc or USB flash drive supports this boot mode. It sounds like this has been happening to you with some of the media you're trying.

One way to help gain control of your boot mode, to enforce an EFI-mode boot, is to use my rEFInd boot manager. Download the USB flash drive version of rEFInd, write it to a USB flash drive, and then edit the EFI/BOOT/refind.conf file on the disk: Uncomment the scanfor line and ensure that the three BIOS-mode boot options (hdbios, biosexternal, and cd) are not present on the scanfor line. When you boot the rEFInd medium, it should show you EFI-mode boot options only. This should enable you to boot another medium in EFI mode -- provided, of course, that this medium supports EFI-mode booting (not all do). Note that rEFInd is sometimes slow to show some boot options. Hitting Esc causes it to scan again for bootable media.

In any event, once you boot to a Linux OS in EFI mode, you should be able to use efibootmgr to add, delete, and modify EFI boot manager entries. Cory T has outlined how to make a particular entry active, but it's not clear that you've got one for your Linux boot loader -- or even if one is installed. If you don't have a Linux EFI-mode boot loader installed, one way to do so is to install rEFInd to your hard disk. This is best done once you've booted to the target OS itself. (The refind-install script should work even from an emergency disk, but that code is relatively poorly tested, and it just can't figure out everything it might need to, making a boot to the target OS a safer option.) Another option would be to use Boot Repair -- but as above, I don't know how well it would work with distributions that aren't closely related to Ubuntu. I'm not familiar enough with the distribution you're trying to install to know if it even provides an EFI-mode boot loader. If not, you'll have to install one yourself. See my EFI Boot Loaders for Linux page for suggestions.

9
  • excellent, this sounds like a solution, im not at home right now but ill give it a try tonight. thank you Jul 25, 2017 at 13:40
  • Just a thought by emergency Linux drive you mean a live boot media right? Jul 25, 2017 at 13:50
  • Yes, a live boot medium, like Ubuntu booted in its "try before installing" mode.
    – Rod Smith
    Jul 25, 2017 at 14:06
  • Right I'm home and after using your (god send of a piece of ) software I have ok ISH results reading the partition table Jul 25, 2017 at 19:15
  • MBR: Hybrid, GPT Present Jul 25, 2017 at 19:16
1

You can use efibootmgr to adjust your EFI boot variables. I did the same on my black Mac Pro, instantly goes to my systemd-boot.

If you run:

sudo efibootmgr -v

It will print a list of all the efi boots in the system. They will be listed in hex (0000, 0001, 001A, etc). Any changes we make will be printed on screen after we do them. Let's suppose the one we want to be default and first in the boot order and its hex code is 00B6, you would:

sudo efibootmgr -b B6 -a

That will make boot 00B6 active. It will show all the known efi boot entries with an asterisk (*) next to all active entries, those will probably include the available physical block devices like hard drives, SSDs, optical drives, etc. Next let's make sure that boot is the first one efi looks for:

sudo efibootmgr -o 00B6

That will make the boot order start with your desired efi boot entry. You will see it in the BootOrder after you do the command when it prints the settings again. Ensure it's first then restart, you should boot right to that, no option key needed.

10
  • I'm getting an EFI variables are not supported on this system error Jul 22, 2017 at 2:02
  • That's... a bit disturbing. Does anything exist in /sys/firmware/efi/efivars? If not then you're booted in MBR mode unless chromium os does something different for handling efi.
    – Cory T
    Jul 22, 2017 at 6:46
  • sys/firmware/efi doesnt even exist (this is in the pure KDE install btw) Jul 22, 2017 at 14:22
  • I think your next move is to boot to a live CD or other boot medium running Linux and try my instructions again. You won't need to chroot, but boot off of one of the utility distros that support EFI and try my instructions again. I think you could use Knoppix, the Arch installer or a number of others (I use parted magic).
    – Cory T
    Jul 22, 2017 at 15:04
  • good shout, hold on. Jul 22, 2017 at 18:52

You must log in to answer this question.

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