You are not logged in.

#1 2013-08-11 17:43:24

Socks
Member
Registered: 2006-11-19
Posts: 13

Macbook Pro 4,1 (Early 2008) Issues

Good morning,
I'm trying to install Arch Linux on my Macbook Pro 4,1 (Early 2008). I would Arch Linux along side OS X, so a dual-boot.

I've created a big mess with rEFInd, rEFIt and whatever, so I've uninstalled these programs and started again from the base OS X installation.
The guide I've tried to follow is this: https://wiki.archlinux.org/index.php/Ma … stallation

The first thing I did was copy the Arch Linux ISO image in a USB key with those command:

mkdir -p /mnt/{usb,iso}
mount -o loop archlinux-2013.08.01-dual.iso /mnt/iso

mkfs.vfat -F32 /dev/sdb1 -n ARCH_201308

mount /dev/sdb1 /mnt/usb
cp -a /mnt/iso/* /mnt/usb
sync
umount /mnt/{usb,iso}

Then I've powered on my Macbook while pressing Alt (Option) and the machine asked me which disk I wanted to start. Selected EFI Boot.
After this I've seen another prompt in the screen which asked me to select an option between these:

  • Arch Linux archiso x86_64  UEFI USB

  • UEFI Shell x86_64 v1

  • UEFI Shell x86_64 v1

  • EFI Default Loader

  • OS X

Selected the first.

Arch did load and I was prompted the root shell.

The partition table was:

Part. #            SIZE           PARTITION TYPE           PARTITION NAME
                    3.0 KiB          free space                          
1             200.0 MiB          EFI System                        EFI System Partition
2             139.7 GiB          Apple HFS/HFS+             Customer
3             619.9 MiB          Apple boot                         Recovery HD
               128.0 MiB          free space
4              45.7 GiB           Linux filesystem                root

Then I've inserted this commands:

mount /dev/sda4 /mnt
pacstrap /mnt base
genfstab -p /mnt >> /mnt/etc/fstab
arch-chroot /mnt

mount -t vfat /dev/sda1 /boot/efi/
modprobe dm-mod
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug

And grub-install fails saying:

[...]
efibootmgr: Not found.
+ exit 1

I've tried to install efibootmgr with

pacman -S efibootmgr

and relaunch grub-install, this time fails saying:

[...]
+ efibootmgr -q -c -d /dev/sda -p 1 -w -L arch_grb -l '\EFI\arch_grub\grubx64.efi'
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.

Of course

modprobe efivars

did nothing.

### inside arch chroot

$ ls /sys/firmware/efi/efivars
total 0
### outside arch chroot, in usb arch iso

$ ls /sys/firmware/efi/efivars
..bunch of things..

It's almost two days that I'm banging my head with this MBP, I want Arch! big_smile

Someone can help please?
Socks

Last edited by Socks (2013-08-11 18:23:58)

Offline

#2 2013-08-11 18:59:50

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Macbook Pro 4,1 (Early 2008) Issues

Macs are not built in line with UEFI standards.  They do not set their boot order in the same way as with normal UEFI computer.  So the efibootmgr command is not going to work.  Macs use a special Apple only command in OSX called 'bless'.  There is a Linux implementation, but I am not sure how well it works, as I have never needed to try it.  The error you are seeing is related to the inability to create the NVRAM entry that, in a normal UEFI system, would create a firmware entry pointing to the grub efi application.  I don't think that this should have anything to do with whether or not grub actually installs itself to your ESP or not.  Check to see if you actually have something in \EFI\arch_grub or not.

I would personally just skip the whole grub installation if you are going the route of rEFInd anyway.  The Linux kernel contains the CONFIG_EFISTUB option these days which is on by default in the Arch kernel.  This enables the kernel to act as its own bootloader, so really all you need is something to launch it.  This is where rEFInd comes in, as it enables you to be able to launch the kernel directly while passing it a kernel command line (thus enabling you to specify initrd=, root=, etc.).  Having grub is essentially just putting a middle man in the picture where there doens't need to be one.

rEFInd also has the ability to read kernels off of a few filesystems.  So in most cases there will be no need to actually put the kernel on the same partition as rEFInd.  I *think* that as of now, rEFInd has the ability to read ext2 and ext4 (and presumably ext3 since it is basically ext2 with journaling), as well as reiserfs, btrfs, and hfs+.  Look into how to use rEFInd directly and stop messing with grub, as I think this is ultiamtely a waste of time.

Offline

#3 2013-08-11 19:34:21

Socks
Member
Registered: 2006-11-19
Posts: 13

Re: Macbook Pro 4,1 (Early 2008) Issues

Thanks for the reply.

If I try to mount

/dev/sda4

(Arch's partition) to

/mnt/

and

/dev/sda1

(MBP's EFI partition) to

/mnt/boot/efi

I can see that I've something in

/mnt/boot/efi/EFI/arch_grub

.
I've created a big mess even in EFI partition. How can I clean it? Currently I've this:

$ ls -l /mnt/boot/efi
EFI/
grub/
initramfs-linux-fallback.img*
initramfs-linux.img*
loader/
vmlinuz-linux*

$ ls -l /mnt/boot/efi
APPLE/
arch_grub/
BOOT/

So all I need to do is install Arch in sda4, reboot in OS X and install rEFInd with the automatic installer?

Thanks man

Last edited by Socks (2013-08-11 19:34:46)

Offline

Board footer

Powered by FluxBB