You are not logged in.

#1 2012-12-31 01:09:48

josemota
Member
From: Portugal
Registered: 2010-10-24
Posts: 37
Website

[SOLVED] MacbookPro 8,1 13" - Dual boot with Mac OS X #rEFIt

Hi everyone, I want to share my experience and request for help regarding my attempt to install Arch on my MBP 8,1. I can't count the times I've tried to install it this week.

What have I done?

So I followed the Beginner's Guide to aid me in the installation, with some exceptions:

* I used Linux Mint 14 to use GParted. The reason I used it is because rEFIt won't sync the GPT and MBR tables properly when I try and use `mkfs.ext4 /dev/sdaX` inside the Archiso. With Archiso, the filesystem types are considered to be "Unknown" (#wtf no. 1), whereas with Mint that doesn't happen.

* In fstab I had something like:

# /dev/sda4
UUID=c35d9121-a3f1-4cd6-ab53-61fe0f474eee	/         	ext4      	rw,noatime			0 1

# /dev/sda5
UUID=390185f6-6d55-430c-a9ba-d3d0b4c7798b	/home     	ext4      	rw,relatime,codepage=437	0 2

The wiki mentioned the noatime and codepage flags for the respective partitions and so I complied.
One thing to notice is I have no /boot mount because syslinux apparently doesn't like that.

* Installing syslinux (along with gptfdisk), I issued:

syslinux-install_update -iam

, and reviewed /boot/syslinux/syslinux.cfg like this:

LABEL arch
	MENU LABEL Arch Linux
	LINUX ../vmlinuz-linux
	----APPEND root=/dev/disk/by-uuid/c35d9121-a3f1-4cd6-ab53-61fe0f474eee ro----
        APPEND root=/dev/disk/by-partuuid/c35d9121-a3f1-4cd6-ab53-61fe0f474eee ro **still doesn't work, it's not found**
	INITRD ../initramfs-linux.img

LABEL archfallback
	MENU LABEL Arch Linux Fallback
	LINUX ../vmlinuz-linux
	----APPEND root=/dev/disk/by-uuid/c35bod9121-a3f1-4cd6-ab53-61fe0f474eee ro----
        APPEND root=/dev/disk/by-partuuid/c35d9121-a3f1-4cd6-ab53-61fe0f474eee ro **still doesn't work, it's not found**
	INITRD ../initramfs-linux-fallback.img

I used UUID's to avoid the mess on sdaX discrepancies.

Results

* rEFIt correctly shows Arch as a boot option. It boots correctly to Syslinux.
* The kernel load fails due to something like:

Unknown filesystem 'vfat'

... and/or ...

Waiting 10 seconds for /dev/sdaX ...

This stroke me as #wtf no.2. VFAT?? Has anyone experienced this before?

For now this is all I have. I was hoping the community could give me helpful pointers on solving this as I intend to contribute with documentation on this setup in the wiki.

I'll be updating this post with newer information. Thanks for helping!

Last edited by josemota (2012-12-31 18:05:09)


José Mota | Website / Blog

Offline

#2 2012-12-31 01:38:27

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

Re: [SOLVED] MacbookPro 8,1 13" - Dual boot with Mac OS X #rEFIt

I don't have much experience with SYSLINUX or booting a Mac in BIOS mode, but I can help answer a couple of your questions and offer some alternative approaches....

josemota wrote:

Hi everyone, I want to share my experience and request for help regarding my attempt to install Arch on my MBP 8,1. I can't count the times I've tried to install it this week.

What have I done?

So I followed the Beginner's Guide to aid me in the installation, with some exceptions:

* I used Linux Mint 14 to use GParted. The reason I used it is because rEFIt won't sync the GPT and MBR tables properly when I try and use `mkfs.ext4 /dev/sdaX` inside the Archiso. With Archiso, the filesystem types are considered to be "Unknown" (#wtf no. 1), whereas with Mint that doesn't happen.

This issue is a limitation of the "gptsync" program that's included with rEFIt, not with rEFIt itself. It's also not caused by mkfs; gptsync doesn't even look inside the partitions, AFAIK. Instead, it looks at partition type codes. It understands just a few of them, including the one that all but the very latest versions of libparted use on Linux filesystem partitions. The trouble is that the libparted developers long ago "borrowed" that code from Windows, but they shouldn't have done so. That's being corrected, and gdisk can use the correct code for Linux ("8300" in gdisk). In the future, libparted will use this code, too; the support is already present but isn't yet widely distributed. You could have set the type code to "0700" in gdisk from Arch and gptsync would have worked.

You may be interested to know that gdisk can do the same job that gptsync does, and gdisk can do so much more flexibly. You can read more in the gdisk hybrid MBR documentation. Be aware that hybrid MBRs (which is what gptsync creates) are ugly and dangerous hacks. Sadly, they're necessary to dual-boot Windows and OS X on Macs, but you may be able to dual-boot OS X and Linux without a hybrid MBR. The trick here is to install an EFI boot loader for Linux rather than a BIOS boot loader for Linux. Macs use EFI natively, so this is the superior way to get started, at least theoretically.

The Arch wiki has a number of pages on EFI issues, such as:

https://wiki.archlinux.org/index.php/Un … _Interface
https://wiki.archlinux.org/index.php/UEFI_Bootloaders
https://wiki.archlinux.org/index.php/GRUB_EFI_Examples

The main problem with booting a Mac in EFI mode is that some systems won't activate all their hardware in this way, so with some models you can end up with a network adapter or video display or sound that doesn't work. Other models are fine, though; you'll just have to give it a try and see if it works.

Personally, I think the best way to do it is to use the kernel's EFI stub loader in conjunction with an EFI boot manager like rEFInd or gummiboot. Both are available as Arch packages, but it's better to install from OS X, and that process is much better documented for rEFInd than for gummiboot (although you could adapt the rEFInd documentation for gummiboot, if you liked). rEFIt can work, too, but only if the kernel includes built-in command-line options and is renamed with a ".efi" extension. These are awkward requirements, and since rEFInd is a continuation of rEFIt development, there's not much point in trying to get rEFIt to do the job.

Offline

#3 2012-12-31 01:48:22

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: [SOLVED] MacbookPro 8,1 13" - Dual boot with Mac OS X #rEFIt

Note that if genfstab is adding codepage=437, it apparently thinks sda5 is vfat. At least, I looked this up in the docs for mount and the option only seems to apply to fat16/fat32 filesystems.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#4 2012-12-31 01:50:41

josemota
Member
From: Portugal
Registered: 2010-10-24
Posts: 37
Website

Re: [SOLVED] MacbookPro 8,1 13" - Dual boot with Mac OS X #rEFIt

Thanks for the awesome explanation, srs5694. I'll see if the attempt I'm making works or not. If it doesn't, I'll look into it.


José Mota | Website / Blog

Offline

#5 2012-12-31 10:45:21

josemota
Member
From: Portugal
Registered: 2010-10-24
Posts: 37
Website

Re: [SOLVED] MacbookPro 8,1 13" - Dual boot with Mac OS X #rEFIt

cfr wrote:

Note that if genfstab is adding codepage=437, it apparently thinks sda5 is vfat. At least, I looked this up in the docs for mount and the option only seems to apply to fat16/fat32 filesystems.

I added that manually. I'll strip it away then as I didn't realize that was specifically for vfat partitions. Thanks for the warning!

EDIT 1

I removed the codepage instruction and rebooted. Here's the output from loading the kernel:

sdhci-pci 0000:02:00.1: invalid iomem size. You may experience problems.
No caching mode page present.
Assuming drive cache: write through
...
Error: device /dev/disk/by-partuuid/e816059e-... Not found, skipping fsck.
Unable to find said device...

I'm assuming rEFIt isn't going to do the job as my partitions are not being made available correctly.

Last edited by josemota (2012-12-31 11:09:24)


José Mota | Website / Blog

Offline

#6 2012-12-31 17:24:41

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: [SOLVED] MacbookPro 8,1 13" - Dual boot with Mac OS X #rEFIt

Where does the e816059e... come from? That doesn't seem to be in either syslinux's cfg file or fstab as you posted them...


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#7 2012-12-31 18:04:47

josemota
Member
From: Portugal
Registered: 2010-10-24
Posts: 37
Website

Re: [SOLVED] MacbookPro 8,1 13" - Dual boot with Mac OS X #rEFIt

I'm going to mark this solved as I've followed srs5694's suggestion of using EFISTUB with a rEFInd installation from Mac OS X. From what I've been reading and chatting about over on IRC, rEFIt is a poor choice for a boot loader. rEFInd was just better.

My conclusions

* Using Ubuntu or Mint liveUSB/CD to partition the drive is unnecessary. cgdisk /dev/sda did the job just fine.
* Installing rEFInd Mac OS X looked safe to me. Just run install.sh and it's done. Then just copy the kernel and initramfs files to /boot/efi/EFI/arch, as well as configuring refind_linux.conf.

Thanks everyone for all the help. It's been a hell of a week with all the more than a dozen attempts to install Arch. Now I'll need to install the BCM4331 drivers from source, afaik.

PS: @cfr, regarding that phony uuid, I don't even know where that came from, to be honest.


José Mota | Website / Blog

Offline

Board footer

Powered by FluxBB