You are not logged in.

#1 2013-09-04 17:47:40

obatard
Member
Registered: 2013-09-04
Posts: 14

[SOLVED] Problem Booting Archlinux on a MacBook Pro Retina

Hi,

Following https://wiki.archlinux.org/index.php/UEFI_Bootloaders and https://wiki.archlinux.org/index.php/MacBookPro_Retina, I'm trying to setup boot with refind on a macbook pro retina.

To best honest, after some hours reading the docs, I can't understand how to install refind.

Well, I used the pacman -S refind-efi, copy the file like it is said below, but I can't understand how to install efi. Some docs talk about an install.sh script but I can't find it.

So in the doc, it is said that refind will automatically detect kernel but nothing happens.

So which filesystem I must use in the /boot filesystem ?
What can I do after copying the files in /boot ?
How can I configure refind on macbook ?

Thanks by advance.

Olivier.

Last edited by obatard (2013-09-05 17:39:01)

Offline

#2 2013-09-05 03:24:43

SilverOne
Member
From: Portugal
Registered: 2013-08-22
Posts: 69

Re: [SOLVED] Problem Booting Archlinux on a MacBook Pro Retina

Hello,

i'm not familiar with setting up refind on a linux based system. if you still have mac os x installed, all you need to do is to download refind and run the install.sh script in the folder. The refind homepage offers clear instructions on how to set it up!

i recommend moving the ext4_x64.efi file from drivers to /EFI/refind/drivers ,this will allow refind to search the ext4 filesystem for kernels to load.

Last edited by SilverOne (2013-09-05 03:33:51)


Best Regards,
SilverOne

Offline

#3 2013-09-05 03:57:33

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

Re: [SOLVED] Problem Booting Archlinux on a MacBook Pro Retina

With a Mac, you should probably install rEFInd to the OSX partition… if you have OSX still installed.  Macs tend to like it much much better if you have things that you bless on an HFS+ filesystem.  The installation of EFI (not UEFI, as Apple has its own crazy ass implementation) on Apples is a bit different, and wonky IMO.  Normally you would use efibootmgr or bcfg to create a firmware entry.  But Apples don't have these and instead use the "bless" command to tell the system what gets priority.

srs5694 (Rod Smith) has this on his rEFInd page:

Rod Smith (srs5694) wrote:

James Jesudason has a tutorial on installing Ubuntu 13.04 beta on a Macbook Retina Pro on this blog page. I'd recommend using a Linux filesystem driver to read the kernel directly from a Linux filesystem rather than copy the kernel to the OS X partition as in the tutorial, but either method will work.

There is this link in there: http://randomtutor.blogspot.com/2013_02_01_archive.html

I think that you should leave the kernel and initramfs on the Linux filesystem as well.  rEFInd ships with an ext2, ext4, btrfs, and reiser filesystem drivers (meaning ext3 is supported as well).  This means that its autoscan feature, as well as the manual stanza creation, can read the kernels from one of those supported filesystems.  This means that if you use any of these filesystems as the rootfs, you don't have to have a separate /boot.

Offline

#4 2013-09-05 12:49:43

obatard
Member
Registered: 2013-09-04
Posts: 14

Re: [SOLVED] Problem Booting Archlinux on a MacBook Pro Retina

Ok, thanks for the help, it boots fine now. But I have another question, I'm trying to use LVM for the /usr part. Is refind support /usr on lvm (it fail because /sbin/init is a link to /usr/bin).

So is it possible to have /usr on LVM with refind ?


Thanks !

Offline

#5 2013-09-05 16:20:42

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

Re: [SOLVED] Problem Booting Archlinux on a MacBook Pro Retina

I don't think you should have a separate /usr in general, unless you have a damn good reason to do so.  It is just asking for trouble.

But in any case, it is not up to rEFInd what you can and cannot do with the layout of your system.  rEFInd is simply a small menu program that gets launched by the firmware and simply allows for the passing off to another efi program.  In the event that this secondary efi program is the kernel (via efistub), then it also allows for kernel command line arguments to be passed along with it.  Though I guess you could potentially pass arguments to any efi application… whether they have any effect is another story.

So in reality, once the kernel takes control of the machine and also loads the initramfs (the initrd=) then it is the capabilities built into that initramfs that will really determine what can be done.  So for example, at its most basic level, the initramfs is there to provide the necessary module to allow the kernel to recognize the device the root filesystem sits on, as well that the filesystem that it is on.  So once it is able to do that, it mounts it and then does a switch-root to make it the "new" root filesystem.  Since it now has access to the rootfs, it now has access to /usr/lib/modules, and can load the rest of the necessary things to make all the hardware work.

So if you have a separate /usr in general, you would have to have it mounted super early while still in the initramfs.  There is actually functionality for this with mkinitpcio, but it is not generally a recommended setup.  You would also have to ensure that the lvm2 functionality is built into your initramfs since it would need those modules/tools in order to map those logical volumes for mounting. 

If you are initerestd in taking some advice, don't use a separate /usr.  At most, I would say it is sane to have a rootfs, /home, /var, and /boot.  But even then, the separate /boot is only necessary if your bootlaoder does not have the functionality to read the rootfs.  /var is not really something that I think is really necessary either.  If you are running a server, and want to have /var on another disk to ensure runaway logs don't get out of hand, that is another story.  But if you are just a home user on your own machine, stick with as simple a setup you can get away with, as the more complex, the more possibility of failure of some kind.

If you are going to use LVM2 for any poart of your system, you might as well use LVM2 for everything.  In this case, it is recommended to have /boot as a separate, non-LVM2 partition.  Otherwise the only bootlaoder that can recognize it would grub2 (and maybe grub-legacy).

Offline

#6 2013-09-05 17:38:30

obatard
Member
Registered: 2013-09-04
Posts: 14

Re: [SOLVED] Problem Booting Archlinux on a MacBook Pro Retina

I honestly take very seriously your wises advices. Thank you so much. That kind of help makes me believe harder on open source spirit. Congrats and thanks again.

Offline

Board footer

Powered by FluxBB