Make linux default OS for dual booting system on Mac

My work machine is a iMac 27 inch model. However, it does not mean that macOS is my primary system. Rather, I spend most of my working time with Fedora, a linux distribution running on the machine through dual booting.

Since Apple’s new macOS Sierra was introduced, I have thought I would upgrade the fundamental system to the up to date one someday. Today was the day.
The first impression toward upgrading process was good, it seems to go fine without any problem. But I realized something wrong after first reboot. The default OS changed to mac OS, not Fedora! Even though I was able to choose the Fedora via apple’s boot loader by pressing ‘Alt’ key while booting time, it was really annoying to do that every time reboot. As I said, my daily OS is Fedora so I had to fix this as soon as possible.

If you are carefully reading this article, you probably have a similar issue to mine so that you are looking for a solution. Or you might have an experience of installing linux on Mac. So I assume you already know what UEFI is at least. You are not? Then read first.

The solution is quite simple. You can change efi booting order via efibootmgr in linux system. Be careful, it is not in macOS. In my case, I ran efibootmgr in GNOME terminal on fedora. Once you run the program, you would see something like this.

[changseok@imacstation:~]$ efibootmgr
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0080,0000
Boot0000* Fedora
Boot0080* Mac OS X
Boot0081* Mac OS X
BootFFFF*

The messages are quite clear. The current BootOrder is 0080 and then 0000, which are restropectively “Boot0080* Mac OS X” and “Boot0000* Fedora”. That is why macOS have been chosen first as default OS. We can change the order with a following command.

[changseok@imacstation:~]$ sudo efibootmgr -o 0000,0080

That’s it. Now try reboot.