Macbook EFI boot to KDE Neon

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

Lamar Tony Daughma

Posted 2017-07-20T18:14:58.773

Reputation: 533

Answers

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.

Rod Smith

Posted 2017-07-20T18:14:58.773

Reputation: 18 427

excellent, this sounds like a solution, im not at home right now but ill give it a try tonight. thank you – Lamar Tony Daughma – 2017-07-25T13:40:14.717

Just a thought by emergency Linux drive you mean a live boot media right? – Lamar Tony Daughma – 2017-07-25T13:50:48.050

Yes, a live boot medium, like Ubuntu booted in its "try before installing" mode. – Rod Smith – 2017-07-25T14:06:19.510

Right I'm home and after using your (god send of a piece of ) software I have ok ISH results reading the partition table – Lamar Tony Daughma – 2017-07-25T19:15:38.247

MBR: Hybrid, GPT Present – Lamar Tony Daughma – 2017-07-25T19:16:11.030

http://imgur.com/VAc9yNg here are my results from the live disk, im gonna try and shoot for the EFI boot – Lamar Tony Daughma – 2017-07-25T19:20:44.357

is it possible to get a more simple to follow guide for converting and MBR-Hybrid to a GPT table without deleting everything? i dont know how to use your software unfortunately and im seeing things about advanced menu... – Lamar Tony Daughma – 2017-07-25T19:50:03.710

You can use GParted or parted: Make any trivial change and then exit the program. That should change it to a regular protective MBR. By "trivial change," I mean something like changing the partition's name or type code. (If you change the type code, you might need to change it back, too.) Note that the partition's name is distinct from the filesystem's name. – Rod Smith – 2017-07-25T22:51:31.927

right ok. ill give that a try – Lamar Tony Daughma – 2017-07-25T23:06:05.923

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.

Cory T

Posted 2017-07-20T18:14:58.773

Reputation: 111

I'm getting an EFI variables are not supported on this system error – Lamar Tony Daughma – 2017-07-22T02:02:20.460

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 – 2017-07-22T06:46:49.947

sys/firmware/efi doesnt even exist (this is in the pure KDE install btw) – Lamar Tony Daughma – 2017-07-22T14:22:07.510

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 – 2017-07-22T15:04:21.540

good shout, hold on. – Lamar Tony Daughma – 2017-07-22T18:52:37.737

I tried with ubuntu but got the same message – Lamar Tony Daughma – 2017-07-22T18:59:35.843

Weird! You could try booting to the Apple internet recovery (command-option-r on boot, select your wifi under the globe when it comes up). From there open the terminal from the Utilities menu and do 'diskutil list' to list all partitions, you'll see the physical drive listed and a bunch of virtual ones, ignore the virtual ones. If you can figure out which partition under the physical device is the one you want to boot, let's pretend it's disk0s3, try: sudo bless –device /dev/disk0s3 –setboot –legacy –verbose – Cory T – 2017-07-22T23:44:22.623

would it work the same if i live boot osx? also i currently have an EFI, a Bios and an EXT4 partition – Lamar Tony Daughma – 2017-07-23T00:18:18.713

The live boot of OS X should work using my instructions, go for it! – Cory T – 2017-07-23T00:44:07.097

I just tried making a live boot image on a USB and got a white screen with a grey do not enter sign on it. I'm starting to despise EFI – Lamar Tony Daughma – 2017-07-23T01:34:20.797