I have a late 2015 Mac book pro with Ubuntu 16.04 Mate as the default OS and Mac High Sierra
as the secondary OS.
When upgrading to High Sierra (or the Mac recovery partition gets updated) Mac makes itself
the default boot system.
This is a bit awkward to fix inside MacOS, to fix it create a live Ubuntu 16.04 Mate USB stick,
boot into the live environment (hold the option key at boot and select EFI boot).
Note my system uses a luks encrypted disk with LVM paritions, odds are if you're reading
this you've done the same.
In the live environment run the following:
1 2 3 4 5 6 7 8 91011121314151617181920
#!/bin/shset-ex
#unlock the drive
cryptsetupluksOpen/dev/disk/by-uuid/fc1952a7-6dbd-4f0d-87b4-94f2067cfbedcrypt_root
#activate the lvm volumes
vgscan
vgchange-ay
sleep2#mount the lvm parititions
mount/dev/mapper/root-root/mnt
#this is your unencrypted ubuntu /boot paritition possibly /dev/sda3
mount/dev/disk/by-uuid/6dca495f-15e5-483a-92c6-228bb23b60ea/mnt/boot
#this is your Mac EFI parition /dev/sda1 unless you've done something weird
mount/dev/disk/by-uuid/67E3-17ED/mnt/boot/efi
#bind mount dev/proc/sys
mount-obind/dev/mnt/dev
mount-obind/proc/mnt/proc
mount-obind/sys/mnt/sys
#chroot into the os
chroot/mnt
Once inside the chroot run the following:
123456789
#!/bin/shset-ex
#update the device map, probably not required but better safe than sorry
grub-mkdevicemap
#find out the device which the EFI partition is part of, you if you know it's /dev/sda1 #then you can run grub-install /dev/sda1 instead
grub-install$(blkid|grep67E3-17ED|awk'{ print $1 }'|sed's/://')#update grub!
update-grub