Difference between revisions of "MacBookPro9,2 (Mid-2012)"

From ArchWiki
Jump to: navigation, search
(Initial edit - to be completed.)
 
Line 14: Line 14:
 
For now I assume a dual-booted install alongside OSX. Please feel free to contribute information regarding other setups.
 
For now I assume a dual-booted install alongside OSX. Please feel free to contribute information regarding other setups.
  
=Preparation=
+
==Preparation==
  
 
{{Warning | Remember to back up your data using a utility such as Time Machine before beginning!}}
 
{{Warning | Remember to back up your data using a utility such as Time Machine before beginning!}}
  
==Preparing a Dual-boot with Mac OSX==
 
 
The following steps only apply if you wish to keep your OSX system.
 
The following steps only apply if you wish to keep your OSX system.
  
 
===Recording UIDs===
 
===Recording UIDs===
If you want to access your OSX user directories, write the UID and GID for the users in question.
+
If you want to access your OSX user directories, write down the UID and GID for the users in question.
  
 
{{Warning | Never, ''ever'' change any file permissions in your OSX partition from Linux. Doing so can and will lead to serious repercussions.}}
 
{{Warning | Never, ''ever'' change any file permissions in your OSX partition from Linux. Doing so can and will lead to serious repercussions.}}
Line 31: Line 30:
 
===Shrinking Macintosh HD===
 
===Shrinking Macintosh HD===
 
Boot Camp now requires a Windows installation disc before altering partitions, but it is possible to do this using Mac OSX's disk utility.  Simply create a new partition, calculate the amount of free space required for all new partitions and shrink Macintosh HD to match this amount.  Since we're going to be using this for linux partitions, it's a good idea to just tell OSX to leave the new partition as free space.
 
Boot Camp now requires a Windows installation disc before altering partitions, but it is possible to do this using Mac OSX's disk utility.  Simply create a new partition, calculate the amount of free space required for all new partitions and shrink Macintosh HD to match this amount.  Since we're going to be using this for linux partitions, it's a good idea to just tell OSX to leave the new partition as free space.
 +
 +
==Installation==
  
 
===Preparing Installation Media===
 
===Preparing Installation Media===
 
[https://archlinux.org/download/ Download Arch] and burn it to a USB, CD or DVD, and boot into the Arch install.
 
[https://archlinux.org/download/ Download Arch] and burn it to a USB, CD or DVD, and boot into the Arch install.
  
=Installation=
+
===Running the Arch Installation===
 
+
==Running the Arch Installation==
+
 
Proceed from the Installation section in either [[Beginners' Guide/Installation]] or [[Installation Guide#Installation]]. Note that you'll need a wired connection to continue for now.
 
Proceed from the Installation section in either [[Beginners' Guide/Installation]] or [[Installation Guide#Installation]]. Note that you'll need a wired connection to continue for now.
  
===Sample partition layout===
+
The following differences will apply to MacBooks:
 +
 
 +
====Sample partition layout====
 
  partition  mountpoint  size      type  label
 
  partition  mountpoint  size      type  label
 
  /dev/sda1  /boot/efi  200MiB    vfat  EFI
 
  /dev/sda1  /boot/efi  200MiB    vfat  EFI
Line 53: Line 54:
 
Single-boot setups can simply omit the OSX and Recovery partitions.
 
Single-boot setups can simply omit the OSX and Recovery partitions.
  
===Install Bootloader===
+
====Install Bootloader====
 
Use [[GRUB2#UEFI_systems_2]] for more information.
 
Use [[GRUB2#UEFI_systems_2]] for more information.
  
Line 68: Line 69:
  
  
=Post Installation=
+
==Post Installation==
 
Continue with [[Beginners' Guide/Post-installation]] or [[Installation Guide#Post-installation]].
 
Continue with [[Beginners' Guide/Post-installation]] or [[Installation Guide#Post-installation]].
  
==Users==
+
===Users===
 
If you wrote down your OSX uid's and gid's eariler, you can do the following:
 
If you wrote down your OSX uid's and gid's eariler, you can do the following:
  
 
  # useradd -m -u [uid] -g [gid] -G [additional_groups] -s [login_shell] [username]
 
  # useradd -m -u [uid] -g [gid] -G [additional_groups] -s [login_shell] [username]
  
In order to be able to access your user directory in OSX, we only need the uid to match.  Username can be whatever you like.
+
In order to be able to access your user directory in OSX, we only need the id's to match.
 +
 
 +
===Wireless===
 +
Macbooks 8,1 to 9,2 (and possibly newer) use BCM4331 for WifiLinux Kernel 3.3 has led to a loss of most of the functionality - however, as of March 2013 bleeding-edge patches are available that improve the situation significantly. You'll need to install base-devel if you don't already have it.
 +
 
 +
$ curl -O https://www.kernel.org/pub/linux/kernel/projects/backports/2013/03/28/compat-drivers-2013-03-28-5.tar.bz2
 +
$ tar xjf compat-drivers-2013-03-28-5.tar.bz2
 +
$ cd compat-drivers-2013-03-28-5
 +
 +
$ scripts/driver-select b43
 +
$ make
 +
$ sudo make install
 +
 
 +
Create {{ic|/etc/modules-load.d/b43.conf}} and simply write {{ic|b43}} to load wireless at startup.
 +
 
 +
Then, install {{AUR|b43-firmware}} from AUR. From there on in, wifi configuration should proceed normally - once you've got it working you can disconnect your wired connection.
 +
 
 +
{{note|You may want to have a wired connection handy in case wifi fails, since this is an unsupported bleeding-edge solution}}
  
==Wireless==
+
==Bells & Whistles==
TODO
+
<TODO>

Revision as of 16:58, 10 April 2013

Summary help replacing me
Running Arch on Mid-2012 hardware
Related
MacBook
MacBookPro
MacBook_Pro_7,1
MacBook_Pro_8,1_/_8,2_/_8,3_(2011_Macbook_Pro)
MacBook_Pro_9,2_(Mid-2012)

This guide outlines a more recent situation of running Arch on Macbook 9,x (Mid-2012) hardware. The original information written here dates from April 2013, installing kernel 3.8. You'll need a wired connection to complete the initial steps of this installation. This article is written in an attempt to cover the Macbook-specific information for both novices and veterans alike. For general help on the install preocedure see the Beginners' Guide

For now I assume a dual-booted install alongside OSX. Please feel free to contribute information regarding other setups.

Preparation

Warning: Remember to back up your data using a utility such as Time Machine before beginning!

The following steps only apply if you wish to keep your OSX system.

Recording UIDs

If you want to access your OSX user directories, write down the UID and GID for the users in question.

Warning: Never, ever change any file permissions in your OSX partition from Linux. Doing so can and will lead to serious repercussions.

Install Boot Manager

Optional. The easiest way to begin is by installing rEFInd on Mac OSX before moving on to Arch. This will place a boot menu on startup. The config will be in your OSX partition - if this is not what you want simply install it later in Arch. For more information consult UEFI

Shrinking Macintosh HD

Boot Camp now requires a Windows installation disc before altering partitions, but it is possible to do this using Mac OSX's disk utility. Simply create a new partition, calculate the amount of free space required for all new partitions and shrink Macintosh HD to match this amount. Since we're going to be using this for linux partitions, it's a good idea to just tell OSX to leave the new partition as free space.

Installation

Preparing Installation Media

Download Arch and burn it to a USB, CD or DVD, and boot into the Arch install.

Running the Arch Installation

Proceed from the Installation section in either Beginners' Guide/Installation or Installation Guide#Installation. Note that you'll need a wired connection to continue for now.

The following differences will apply to MacBooks:

Sample partition layout

partition  mountpoint  size       type  label
/dev/sda1  /boot/efi   200MiB     vfat  EFI
/dev/sda2  -           ?          hfs+  Mac OS X
/dev/sda3  -           ?          hfs+  Recovery
/dev/sda4  -           100MiB     hfs+  Boot Arch Linux from the Apple boot loader (optional)
/dev/sda5  /boot       100MiB     boot  boot
/dev/sda6  -           ?          swap  swap (optional)
/dev/sda7  /           10GiB      ext4  root
/dev/sda8  /home       remaining  ext4  home

Single-boot setups can simply omit the OSX and Recovery partitions.

Install Bootloader

Use GRUB2#UEFI_systems_2 for more information.

After setting up the base system, do the following in your chrooted environment:

# pacman -S grub-efi-x86_64

# mkdir -p /boot/efi
# 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
# mkdir -p /boot/grub/locale
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo


Post Installation

Continue with Beginners' Guide/Post-installation or Installation Guide#Post-installation.

Users

If you wrote down your OSX uid's and gid's eariler, you can do the following:

# useradd -m -u [uid] -g [gid] -G [additional_groups] -s [login_shell] [username]

In order to be able to access your user directory in OSX, we only need the id's to match.

Wireless

Macbooks 8,1 to 9,2 (and possibly newer) use BCM4331 for Wifi. Linux Kernel 3.3 has led to a loss of most of the functionality - however, as of March 2013 bleeding-edge patches are available that improve the situation significantly. You'll need to install base-devel if you don't already have it.

$ curl -O https://www.kernel.org/pub/linux/kernel/projects/backports/2013/03/28/compat-drivers-2013-03-28-5.tar.bz2
$ tar xjf compat-drivers-2013-03-28-5.tar.bz2
$ cd compat-drivers-2013-03-28-5

$ scripts/driver-select b43
$ make
$ sudo make install

Create /etc/modules-load.d/b43.conf and simply write b43 to load wireless at startup.

Then, install b43-firmwareAUR from AUR. From there on in, wifi configuration should proceed normally - once you've got it working you can disconnect your wired connection.

Note: You may want to have a wired connection handy in case wifi fails, since this is an unsupported bleeding-edge solution

Bells & Whistles

<TODO>