Proper Linux kernel boot with EFI on Macbook
- Transfer
I suggest a somewhat free translation of the Gentoo programmer about the correct way to boot on laptops with EFI instead of BIOC on board.
I recently bought a Macbook Pro 13.3 inch and I decided to install Gentoo Linux on it.
No sooner said than done. In general, the installation was successful, apart from small misunderstandings like a broken keyboard from under LiveCD, the kernel sees the console only with
The only thing that bothered me a bit was the BIOS emulation. Macs use Intel EFI to boot, and for the rest of the OS, Apple added a BIOS emulation level. This is how Ubuntu loads on Macs.
It seemed to me wrong in technical terms and in principle. I got a little stressed and I managed to start the Linux kernel from under EFI without any emulations. There is not enough documentation, so I want to share my way.
It can be used
Instructions for installing the EFI image
Of course, you need to set EFI support in the kernel, but that’s all. Now you are aware with some manic obsessive satisfaction that you should not connect an extra link to support another proprietary interface that is beyond your visibility and control.
I recently bought a Macbook Pro 13.3 inch and I decided to install Gentoo Linux on it.
No sooner said than done. In general, the installation was successful, apart from small misunderstandings like a broken keyboard from under LiveCD, the kernel sees the console only with
vesafb
. The only thing that bothered me a bit was the BIOS emulation. Macs use Intel EFI to boot, and for the rest of the OS, Apple added a BIOS emulation level. This is how Ubuntu loads on Macs.
It seemed to me wrong in technical terms and in principle. I got a little stressed and I managed to start the Linux kernel from under EFI without any emulations. There is not enough documentation, so I want to share my way.
- EFI starts at boot.
- It launches rEFIt , a program that extends the capabilities of the default bootloader by adding a normal boot menu, command line, etc.
- Scans
FAT/HFS
partitions (ext * are not supported) looking for a bootable directory that would contain/efi/
; and boot images. - Starts an
Grub2
EFI image from aFAT
partition. - Boots the Linux kernel from
/boot
(+initrd/initramfs
if specified). - The kernel, as usual, is loaded from the root partition, you can select any file system.
It can be used
elilo
, but Grub2
(more precisely Grub 1.97.1
) it copes better, or rather, it is the only thing that somehow works with small modifications (add a flag efi
via ebuild USE --with-platform=efi
). I managed to configure the /boot
partition on the FAT file system, but this installkernel
causes a script to be launched from the kernel source directory to create symbolic links to the new and previous kernel images. Instructions for installing the EFI image
Grub2
here . Install the EFI image in a directory, something like /efi/grub
(there must be a path /efi
). You bless
can skip the commands , they are for OS X. You can create a simple config file with the commandgrub-mkconfig
and then modify it. However, in order to do Over Mind ™ manually edit the files from /etc/grub.d/
. Of course, you need to set EFI support in the kernel, but that’s all. Now you are aware with some manic obsessive satisfaction that you should not connect an extra link to support another proprietary interface that is beyond your visibility and control.