You are not logged in.

#1 2013-06-24 11:11:00

archolith
Member
Registered: 2013-06-17
Posts: 8

[SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

Hi,

I have made an install of Arch on my MacBook Pro. I have made the installation of Arch to work before but I decided to make a clean install since I changed WM. I have written down my instructions thoroughly and followed them like a slave. It worked before but now it just decided not to work. When I was starting my Mac before I ended up at the GRUB menu being able to chose to load Arch. If I pressed the alt button I was able to load OS X. But after the reinstall the computer did not load GRUB.

I have reinstalled OS X again just to make sure everything is clean, especially the boot partition.

During the installation I mounted the partitions like so (sda4 = boot, sda5 = root, sda6=swap, sda7=home)

# mount /dev/sda5 /mnt
# mkdir /mnt/boot
# mount /dev/sda4 /mnt/boot
# mkdir /mnt/home
# mount /dev/sda7 /mnt/home
# mkdir -p /mnt/boot/efi
# mount /dev/sda1 /mnt/boot/efi

After installing base and base-devel and modifying the system I did the following:

# pacman -S grub-efi-x86_64
# modprobe dm-mod
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

NB! I executed these commands with /dev/sda1 still mounted on /boot/efi in the chrooted environment. This put the arch_grub bootloader-id under /boot/efi/EFI on /dev/sda1. I made sure to remove the old /boot/efi/EFI/arch_grub before I executed this command. This way is a little bit different from the Wiki but as I said before, /dev/sda1 was already mounted on /mnt/boot/efi when I followed these instructions.

Without installing the os-prober (I don't want to have OS X in grub) I then executed

# grub-mkconfig -o /boot/grub/grub.cfg

exited, unmounted and rebooted. After the reinstall, suddenly the computer does not load grub? Instead I just end up booting into OS X.

Does anyone have any clue on what to do here? I have tried to reinstall a couple of times without success.

Last edited by archolith (2013-06-30 07:22:10)

Offline

#2 2013-06-24 12:28:27

archolith
Member
Registered: 2013-06-17
Posts: 8

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

I've been reading up a bit and I guess my best option is to install the rEFInd in OS X first to make it locate /boot/efi on /dev/sda1 first. Maybe I was just lucky that my computer decided to load arch_grub before APPLE on /boot/efi/EFI. I thought that it was possible to install Arch without using rEFInd. Or is there a way to force the bootloader to chose arch_grub?

Offline

#3 2013-06-24 22:07:03

archolith
Member
Registered: 2013-06-17
Posts: 8

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

Ok, that was obviously the problem. I removed everything except OS X, installed rEFInd with the install script in OS X and reinstalled Arch Linux. So that was stupid of me not to install rEFInd first.

BUT, and this is a problem I first saw before everything started to go wrong...

After choosing Arch in rEFInd I am redirected to GRUB. When choosing to run Arch I get stuck while "Loading initial ramdisk ..." This also happens when booting in fallback mode.

This was working fine before and now I don't know how to fix this. Does anybody have any idea?

//Thanks

Offline

#4 2013-06-25 03:17:25

dmj
Member
Registered: 2013-06-25
Posts: 8

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

archolith, I have the same issue. On my macbook pro retina.

Offline

#5 2013-06-25 10:23:27

Legogris
Member
Registered: 2012-09-11
Posts: 36

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

Same issue with "Loading initial ramdisk..." here. Fresh Arch install on 2013 Macbook Air, using EFI boot.

Offline

#6 2013-06-25 10:44:00

archolith
Member
Registered: 2013-06-17
Posts: 8

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

OK, good to know I'm not the only one. Here are some facts:

1. My installation worked for a couple of days without rEFInd installed. I just booted directly into grub
2. Out of nowhere the boot sequence got stuck while loading the initial ramdisk (this was after a fresh install exactly like the previous install that worked)
3. Aftera proper reinstall with rEFInd installed first booting Arch stops while loading initial ramdisk
3. arch_boot is on /dev/sda1 under /boot/efi/EFI
4. /dev/sda1 have a line in /etc/fstab since this was mounted when I generated fstab. I will try tonight to do a reinstall without having /dev/sda1 mounted under /boot/efi when I generate fstab.

I will continue to try to troubleshoot...
5.

Offline

#7 2013-06-25 12:39:43

Legogris
Member
Registered: 2012-09-11
Posts: 36

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

I have tried with GRUB installed both on a separate /boot ext2 partition and as a folder on my ext4 root partition (both as described here: https://wiki.archlinux.org/index.php/Gr … systems_2), with the same result.
I don't know if ithis is of any relevance, but when it is stuck at "Loading initial ramdisk...", my USB pendrive is blinking like crazy, even if it's inserted after it hangs.

Offline

#8 2013-06-25 15:19:27

Legogris
Member
Registered: 2012-09-11
Posts: 36

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

After a lot of trial and error, I ended up giving up on GRUB and settled with rEFInd and the EFI Stub Loader: http://www.rodsbooks.com/refind/linux.html#quickstart

This works fine for me. Let me know if you have trouple setting it up and I can tell you what I had to do.

Offline

#9 2013-06-25 17:10:07

dmj
Member
Registered: 2013-06-25
Posts: 8

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

Legogris, Id be curious to know your steps. The steps I have tried to take are depicted here: https://bbs.archlinux.org/viewtopic.php?id=165756
It doesn't use refind, but I'm curious to know your steps.

Offline

#10 2013-06-26 21:31:32

Legogris
Member
Registered: 2012-09-11
Posts: 36

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

dmj wrote:

Legogris, Id be curious to know your steps. The steps I have tried to take are depicted here: https://bbs.archlinux.org/viewtopic.php?id=165756
It doesn't use refind, but I'm curious to know your steps.

Looks like you got it working, but anyway:
My partition table looks like this:
Part. #     Size        Partition Type            Partition Name
----------------------------------------------------------------
            3.0 KiB     free space
   1        200.0 MiB   EFI System                EFI System Partition
   2        93.1 GiB    Apple HFS/HFS+            Customer
   3        619.9 MiB   Apple boot                Recovery HD
   4        279.4 GiB   Apple HFS/HFS+            home
            128.4 MiB   free space
   5        1023.0 MiB  Linux filesystem          boot
   6        91.5 GiB    Linux filesystem          arch
            65.5 KiB    free space

3 and above are all untouched (except 3 is shrunk) from the original setup. My /boot partition is FAT32 (although I guess ext would work just as well with rEFInd).
My boot partition is just containing my kernel, not much more.
rEFInd is installed into the main OS X partition.


Since I was having some trouble back and forth with GRUB, I can't really say the best order to do stuff in, but just follow the guides and all should be well I guess smile

Offline

#11 2013-06-29 15:30:07

archolith
Member
Registered: 2013-06-17
Posts: 8

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

Hi,

I have found a solution to the problem. When you are booting from the cd if you look carefully you will see that the system is missing firmware for module aic94xx and bfa. This error message also pops up when you are creating the initial ram disk environment with:

# mkinitcpio -p linux

To make it work I did as followed:

1. I have rEFInd installed
2. I booted from the disk and mounted /dev/sda1 somewhere and made sure to remove the old ../EFI/arch_grub that was lying there
3. I continued with a normal install making sure NOT to mount /dev/sda1 on /mnt/boot/efi before generating the fstab
4. I chrooted into /mnt and followed the instructions up to setting up the network (in my case # systemctl enable dhcpcd@enp1s0f0.service)
5. Before I created the initial ram disk environment I installed aic94xx and bfa from the AUR as root (maybe not 100% correct)
5.a https://aur.archlinux.org/packages/aic94xx-firmware/
5.b https://aur.archlinux.org/packages/bfa-firmware/
6. I then ran the code # mkinitcpio -p linux, this time without the error messages I had gotten before
7. I set the root password and continued with these instructions:
7.a https://wiki.archlinux.org/index.php/Ma … Bootloader
8. When I installed grub the system said that it could not find a boot manager but I continued with the instructions

When I rebooted the computer everything went fine, I booted into rEFInd followed by grub. Can anyone with the same problem please follow these instructions and report back. It is good to see anyone else succeed before I report this thread as SOLVED. If you have any questions I will try to help.

Offline

#12 2013-09-28 13:38:59

Spider.007
Member
Registered: 2004-06-20
Posts: 1,148
Website

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

archolith wrote:

Hi,

I have found a solution to the problem. When you are booting from the cd if you look carefully you will see that the system is missing firmware for module aic94xx and bfa. This error message also pops up when you are creating the initial ram disk environment with:

# mkinitcpio -p linux

To make it work I did as followed:

[...]

This must be incorrect; there is no way a Macbook contains a Brocade or Adaptec controller. The warning always pops up when using mkinitcpio.

I have never had much trouble installing arch on apple-hardware (both iMac and Macbook Air); and never needed refit or refind. I have described some details here: Wiki: IMac_Aluminium#Install_additional_bootloader

Last edited by Spider.007 (2013-09-28 13:39:52)

Offline

#13 2013-09-29 19:40:43

archolith
Member
Registered: 2013-06-17
Posts: 8

Re: [SOLVED] Unable to load GRUB on MacBook PRO with GPT partition

When I did the install and was trying to enable the dhcpcd daemon

# systemctl enable dhcpcd@enp1s0f0.service

I got the following error

Possibly missing firmware for module: aic94xx
Possibly missing firmware for module: bfa

That's why I installed the firmware and it fixed the problem for me at least, and I have never had a problem since.

Offline

Board footer

Powered by FluxBB