I installed Debian Jessie 8.5 on my MacBook Pro over my old Bootcamp partition (Windows 8.1). I deleted the bootcamp partition with the partition manager in the Debian Installer and created two new partitions, rootfs and swap. I had my hard drive previously partitioned as listed below:
- disk0s1: EFI (where GRUB is currently installed. I'll say more about this later)
- disk0s2: OS X
- disk0s3: Recovery HD
- disk0s4: Windows 8.1 installed with Bootcamp Assistant, I deleted it later to install Debian.
My current partition layout:
- disk0s1: Same as before, but with Grub installed at: (mount point)/EFI/debian/grubx64.efi
- disk0s2: Same as before
- disk0s3: Same as before
- disk0s4: ext4 partition with Debian /
- disk0s5: swap partition for Debian
I was able to get GRUB installed (I don't remember exactly what I did and I tried to reproduce it but did not succeed which is why I'm asking here).
It was working until I cleared NVRAM (don't ask why I cleared NVRAM, it was a very stupid action of me). Before I cleared nvram, I got the GRUB menu when I booted without holding Alt, but when I booted when holding Alt and chose the Debian main partition, it would say "Missing Operating System", same for choosing it from the Startup Disk prefrence, or setting it manually with bless
(because GRUB is installed on the EFI partition, not the Debian root partition. Please correct me if I'm wrong).
So I presume that before I cleared NVRAM without holding Alt the system tried to boot from EFI, now it's trying to boot OS X from disk0s2 (there are no set variables that relate to the OS X root, so I guess the system automatically boots the first bootable HFS partition if there are no variables about booting). (To clarify, my problem is that the only way to boot Debian was to boot Grub, and the only way to boot Grub was if it was default startup disk when the system started, Grub can't be booted from the boot menu displayed when booting while holding Alt, and when I performed the stupid action of resetting NVRAM, the default startup disk went back to the OS X partition.)
So how do I change the startup disk back to EFI/Grub (disk0s1/efi/debian/grubx64.efi)?
bless
to set Debian Linux as the default startup operating system. I would recommend, as an alternative, that you setup your Mac so you can choose the default operating system from the Startup Manager.