You are not logged in.

#1 2012-08-26 05:45:05

DrKillPatient
Member
Registered: 2011-07-28
Posts: 85

[SOLVED] Macbook 6.1, dual boot with pure EFI, will not reboot

I've just finished installing Arch from the latest image on my Macbook 6.1. I primarily followed the Beginners' Guide, while paying attention to the exceptions mentioned in the Macbook article on the wiki. Rather than use the rEFIt/rEFInd bootloaders, I opted to use pure EFI and followed this article in order to do so (the relevant part starts from the header "Setup EFI grub2"). All the basics, including the bootloader (I dual-boot OSX and Arch), seem to work, with the exception of the reboot functionality. In general when using Linux in a Mac, the 'reboot' and 'shutdown -r' commands will hang after trying to shutdown the system. To restore normal functionality, the line "reboot=pci" needs to be added to the kernel line in /boot/grub/grub.cfg.

Thus, I added "reboot=pci" to GRUB_CMDLINE_DEFAULT in /etc/defaults/grub and ran "grub-mkconfig -o /boot/grub/grub.cfg". (As the pure-EFI article mentions, in order to apply such a change I also needed to recreate the GRUB EFI standalone and place it in the correct path-- a process which completed without error.) By all my assessments, the change seems to have been applied, and a manual check into /boot/grub/grub.cfg reveals that "reboot=pci" is indeed in the right place. However, reboots still hang before shutting down. Do I need to do something with my setup, or have I done something incorrectly along the way?

Last edited by DrKillPatient (2012-08-26 16:47:49)

Offline

#2 2012-08-26 09:06:39

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] Macbook 6.1, dual boot with pure EFI, will not reboot

What exactly do you mean with "pure EFI boot", as the article you refer to seems to involve installing grub?


ᶘ ᵒᴥᵒᶅ

Offline

#3 2012-08-26 15:27:47

DrKillPatient
Member
Registered: 2011-07-28
Posts: 85

Re: [SOLVED] Macbook 6.1, dual boot with pure EFI, will not reboot

By "pure EFI", I refer to using only Apple's boot menu (the one the appears when you hold down the Option key as the computer starts), as opposed to using a third-party program like rEFInd to modify the Mac bootloader. This gives me the advantage of needing to deal less with OSX (rEFInd needs to be installed on its partition), as well as the ability to set Arch as the default instead of automatically booting into Mac OS X (not a rEFInd feature)-- and thus saving time by not opening a boot menu unless I want to boot a non-default OS.

The article's section on GRUB was referring to what modifications need to be made in order to have it be detected by Apple's EFI bootloader, which is hardcoded to use a certain path:

Make the grub standalone image

cd /
grub-mkstandlone --directory="/usr/lib/grub-x86_64-efi" --format="x86_64-efi" --compression="xz" \
--output="/root/grub2-standalone.efi" "boot/grub/grub.cfg"

Change its name and move it here:

/boot/efi/EFI/BOOT/BOOTX64.EFI

Offline

#4 2012-08-26 15:49:21

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] Macbook 6.1, dual boot with pure EFI, will not reboot

You can also install rEFInd directly to the EFI-partition, simple steps to accomplish this are:

- copy the contents of the rEFInd folder to /boot/efi/EFI/BOOT/
- rename refind_x64.efi to BOOTx64.efi
- uncomment the "scan_all_linux_kernels" parameter in refind.conf
- place a refind_linux.conf file directly in /boot, containing the boot parameter. E.g:

$ cat /boot/refind_linux.conf
"Default" "root=/dev/sda5 ro quiet init=/bin/systemd acpi_backlight=vendor"

This way you can get rid of grub, and have a clean bootmenu to select between Arch and OSX. You can set the boot preference in refind.conf, to make it start Arch by default.


ᶘ ᵒᴥᵒᶅ

Offline

#5 2012-08-26 16:47:32

DrKillPatient
Member
Registered: 2011-07-28
Posts: 85

Re: [SOLVED] Macbook 6.1, dual boot with pure EFI, will not reboot

I wasn't aware of that solution. It seems to make the restart work now. Thanks! I'll mark this as solved.

EDIT: For those who don't wish to use rEFInd, I just noticed what I did wrong earlier; I had indeed copied the GRUB standalone to /boot/efi/EFI/BOOT, but I'd forgotten to mount the actual EFI partition ("mount LABEL=EFI /boot/efi") before doing so. The standalone was simply copied to the wrong place, which is why it was not updating.

Last edited by DrKillPatient (2012-08-26 17:24:50)

Offline

Board footer

Powered by FluxBB