You are not logged in.

#1 2014-05-14 23:20:28

bwv549
Member
Registered: 2013-12-13
Posts: 14

rEFInd with MacBook Pro, Retina: invalid loader file!

I'm trying to dual boot Arch and OSX on a MacBook Pro, Retina, 15".  I've been following the Direct EFI booting (rEFInd) guide, but I've also read through a lot of the related docs.  Because many instructions on the web seem outdated based on recent improvements in rEFInd, I will post what I have done so far since this info may be relevant.

1. I resized my harddrive.  I installed arch on an ext4 formatted partition (/dev/sda4 with 128M gap before, ie.., sector "+128M" in cgdisk).

NAME              MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                 8:0    0 233.8G  0 disk 
├─sda1              8:1    0   200M  0 part 
├─sda2              8:2    0   116G  0 part 
├─sda3              8:3    0 619.9M  0 part 
├─sda4              8:4    0    17G  0 part 
└─sda5              8:5    0  99.9G  0 part 

2. Running OSX, I installed refind (refind-bin-0.8.0) using the --nodrivers option. 

sudo ./install.sh --nodrivers

Installation appeared to be successful. 

3. I updated the refind.conf file.  The "scan_all_linux_kernels" is uncommented by default, and I uncommented the also_scan_dirs line so that these two lines appear as shown, with everything else default:

scan_all_linux_kernels
also_scan_dirs boot,ESP2:EFI/linux/kernels

Result: rEFInd loads on boot, but no option for Arch appears (only the Mac option). 

4. I decide to try a manual menuentry, so I set the scanfor line like this:

scanfor internal,external,manual

Then, I write in an entry for Arch Linux (and comment all other menu entries):

menuentry "Arch Linux" {
    icon EFI/refind/icons/os_arch.icns
    volume 0FC63DAF-8483-4772-8E79-3D69D8477DE4
    ostype Linux
    loader /boot/vmlinuz-linux
    initrd /boot/initramfs-linux.img
    options "rw root=/dev/sda4 rootfstype=ext4 libata.force=noncq"
}

I verified that vmlinuz-linux and initramfs-linux.img exist and are in the /boot directory in my main arch partition (/dev/sda4).

Result: I get an Arch menu entry, but when I click on it I get this error message:

Starting vmlinuz-linux
Using load options 'rw root=/dev/sda4 rootfstype=ext4 libata.force=noncq initrd=\boot\initramfs-linux.img'
Invalid loader file!
Error: Not Found while loading vmlinux-linux

I also tried these lines for volume, each in turn:

volume 4:
volume linuxmain

("linuxmain" is the partition label I gave the partition with cgdisk)

For completeness, `diskutil list` on the Mac gives me:

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            124.6 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4: 0FC63DAF-8483-4772-8E79-3D69D8477DE4               18.3 GB    disk0s4
   5: 0FC63DAF-8483-4772-8E79-3D69D8477DE4               107.2 GB   disk0s5

Note that I've tried the above procedure both with the stock refind (refind-bin-0.8.0.zip) and the arch specific refind (refind-bin-gnuefi-0.8.0.zip).  In all cases I made sure all the refind files were removed before re-installing.  I've already spent a lot of time on this, and I'd really like to get Arch booting, so any help is greatly appreciated!

Last edited by bwv549 (2014-05-15 02:26:11)

Offline

#2 2014-05-16 09:08:25

alu1
Member
Registered: 2014-05-16
Posts: 19

Re: rEFInd with MacBook Pro, Retina: invalid loader file!

I had this problem myself which got me going round in circles for ages.  The Arch Official rEFInd package contains v.0.7.9 (and is flagged out of date).  Apparently there is an Arch specific problem with v.0.7.9 and the most recent (until today) v.0.8.0.  The only way I could get it to work was to use the v.0.7.8 gnuefi binary from sourceforge.  I've been in touch with the developer who has released v.0.8.1 today which he thinks fixed the bug, but I've yet to test it....  Let us know how you get on.

When the package gets updated I would hope for it to be built from gnuefi, not the tianocore EDK2010 as it is currently, nor even 2014 which all seems unduly burdonesome....

Offline

#3 2014-05-16 10:02:37

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,245

Re: rEFInd with MacBook Pro, Retina: invalid loader file!

The new version compiled with gnu-efi is available at Rod Smith's page at http://sourceforge.net/projects/refind/ … p/download

It looks like it is important to look at the changelog at http://www.rodsbooks.com/refind/revisions.html as I note that the icon image formats have changed.

Last edited by mcloaked (2014-05-16 10:06:53)


Mike C

Offline

#4 2014-05-17 21:45:40

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: rEFInd with MacBook Pro, Retina: invalid loader file!

I believe that bwv549's problem is with EFI drivers. rEFInd was installed with no drivers (explicitly using --nodrivers, which is the default in any event under OS X); but the Linux kernel is on an ext4fs partition, which renders it inaccessible to EFI unless a suitable driver is loaded. This problem can be overcome by installing the ext4fs driver that comes with rEFInd.

Offline

Board footer

Powered by FluxBB