https://wiki.archlinux.org/api.php?action=feedcontributions&user=Xcabal&feedformat=atomArchWiki - User contributions [en]2024-03-29T01:52:27ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=ZeroTier&diff=505280ZeroTier2017-12-30T21:45:00Z<p>Xcabal: spacing</p>
<hr />
<div><br />
Zerotier is an open source, cross-platform and easy to use virtual LAN / Hamachi alternative, also available on Android, ios, Mac, Windows.<br />
A GUI is only available on Mac and Windows according to the developers. <br />
<br />
== Installing ==<br />
ZeroTier can be [[installed]] with the {{Pkg|zerotier-one}}<br />
<br />
<br />
== Configuration ==<br />
You will need to create an account over at [https://my.zerotier.com/ My Zerotier] and create a network and select your desired options,<br />
It can have either IPv4 or IPv6 or both. Keep note of the network id that you will like to use, you will be needing it later on.<br />
Leave the network page open that you will use since you will need to authorize each computer or device, also verify that it has an ip<br />
<br />
To begin [[start]] {{ic|zerotier-one.service}}, if one would like it to start at boot [[enable]] {{ic|zerotier-one.service}}.<br />
to find out what your computer id,it will be a 10 alphanumeric similar to 89e92ceee5, is run:<br />
<br />
{{hc|$ sudo zerotier-cli info|<nowiki><br />
200 info 89e92ceee5 1.2.4 ONLINE<br />
</nowiki>}}<br />
where 89e92ceee5 is address and 1.2.4 is the version, followed by its status<br />
<br />
Next you will need to run to join a network:<br />
<br />
$ sudo zerotier-cli join ''network_id''<br />
<br />
The network will be 16 alphanumeric similiar to 8056c2e21c000001 which can be found at the top of the network page under settings.<br />
<br />
Back on the network page at my.zerotier, you should see all address that have joined under members. Be sure sure to check the authorize for the desired addresses, and verify that it has IP address.<br />
You may need to run [[dhcpcd]] to acquire the new IP address locally. <br />
<br />
To verify that all devices can see each other you can [[ping]] each address with its associated IP, like so<br />
<br />
{{hc|$ ping 192.168.192.91|<nowiki><br />
PING 192.168.192.91 (192.168.192.91) 56(84) bytes of data.<br />
64 bytes from 192.168.192.91: icmp_req=1 ttl=53 time=52.9 ms<br />
...<br />
</nowiki>}}<br />
<br />
One can also see connected peers by running:<br />
{{hc|$ sudo zerotier-cli listpeers|<nowiki><br />
200 listpeers <ztaddr> <path> <latency> <version> <role><br />
200 listpeers 12ac4a1e71 87.98.218.130/30883;12;12;1.00 589 1.2.5 LEAF<br />
200 listpeers 8841408a2e 159.203.2.154/9993;13262;13220;1.00 127 1.1.5 PLANET<br />
200 listpeers 9d219039f3 159.203.97.171/9993;13241;3218;1.00 63 1.1.5 PLANET<br />
...<br />
</nowiki>}}<br />
<br />
and see a list of networks the computer is connected to by running:<br />
$ sudo zerotier-cli listnetworks</div>Xcabalhttps://wiki.archlinux.org/index.php?title=ZeroTier&diff=505279ZeroTier2017-12-30T21:43:33Z<p>Xcabal: Created and explained how to setup zerotier</p>
<hr />
<div><br />
Zerotier is an open source, cross-platform and easy to use virtual LAN / Hamachi alternative, also available on Android, ios, Mac, Windows.<br />
A GUI is only available on Mac and Windows according to the developers. <br />
<br />
== Installing ==<br />
ZeroTier can be [[installed]] with the {{Pkg|zerotier-one}}<br />
<br />
<br />
<br />
== Configuration ==<br />
You will need to create an account over at [https://my.zerotier.com/ My Zerotier] and create a network and select your desired options,<br />
It can have either IPv4 or IPv6 or both. Keep note of the network id that you will like to use, you will be needing it later on.<br />
Leave the network page open that you will use since you will need to authorize each computer or device, also verify that it has an ip<br />
<br />
To begin [[start]] {{ic|zerotier-one.service}}, if one would like it to start at boot [[enable]] {{ic|zerotier-one.service}}.<br />
to find out what your computer id,it will be a 10 alphanumeric similar to 89e92ceee5, is run:<br />
<br />
{{hc|$ sudo zerotier-cli info|<nowiki><br />
200 info 89e92ceee5 1.2.4 ONLINE<br />
</nowiki>}}<br />
where 89e92ceee5 is address and 1.2.4 is the version, followed by its status<br />
<br />
Next you will need to run to join a network:<br />
<br />
$ sudo zerotier-cli join ''network_id''<br />
<br />
The network will be 16 alphanumeric similiar to 8056c2e21c000001 which can be found at the top of the network page under settings.<br />
<br />
Back on the network page at my.zerotier, you should see all address that have joined under members. Be sure sure to check the authorize for the desired addresses, and verify that it has IP address.<br />
You may need to run [[dhcpcd]] to acquire the new IP address locally. <br />
<br />
To verify that all devices can see each other you can [[ping]] each address with its associated IP, like so<br />
<br />
{{hc|$ ping 192.168.192.91|<nowiki><br />
PING 192.168.192.91 (192.168.192.91) 56(84) bytes of data.<br />
64 bytes from 192.168.192.91: icmp_req=1 ttl=53 time=52.9 ms<br />
...<br />
</nowiki>}}<br />
<br />
One can also see connected peers by running:<br />
{{hc|$ sudo zerotier-cli listpeers|<nowiki><br />
200 listpeers <ztaddr> <path> <latency> <version> <role><br />
200 listpeers 12ac4a1e71 87.98.218.130/30883;12;12;1.00 589 1.2.5 LEAF<br />
200 listpeers 8841408a2e 159.203.2.154/9993;13262;13220;1.00 127 1.1.5 PLANET<br />
200 listpeers 9d219039f3 159.203.97.171/9993;13241;3218;1.00 63 1.1.5 PLANET<br />
...<br />
</nowiki>}}<br />
<br />
and see a list of networks the computer is connected to by running:<br />
$ sudo zerotier-cli listnetworks</div>Xcabalhttps://wiki.archlinux.org/index.php?title=Netctl&diff=247018Netctl2013-02-11T06:16:53Z<p>Xcabal: /* For Users Migrating from netcfg */</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Networking]]<br />
[[es:Netcfg]]<br />
[[fr:Netcfg]]<br />
[[it:Netcfg]]<br />
[[ja:Netcfg]]<br />
[[ro:Netcfg]]<br />
[[ru:Netcfg]]<br />
[[tr:netcfg]]<br />
[[zh-CN:Netcfg]]<br />
{{Article summary start}}<br />
{{Article summary text|A guide to configuring the network using netctl and network profile scripts.}}<br />
{{Article summary end}}<br />
<br />
==Intro==<br />
Netctl is a new Arch project slated to replace [[netcfg]]. Users should regard it as the future of CLI-based network management on Arch Linux.<br />
<br />
==Installation==<br />
Netctl is currently in [testing]. Users are encouraged to download it from their favorite mirror.<br />
<br />
==Recommended Reading==<br />
Considerable effort has gone into the construction of quality man pages. Users are encouraged to read the following man pages prior to using netctl:<br />
*netctl<br />
*netctl.profile<br />
*netctl.special<br />
<br />
==Configuration==<br />
Netctl uses simple text profiles. Example profiles are provided for users to use as a template under {{ic|/etc/netctl/examples}}. Common configurations include:<br />
*ethernet-dhcp<br />
*ethernet-static<br />
*wireless-wpa-static<br />
<br />
To use an example profile, simply copy it to {{/etc/netctl/<profile>}} and edit:<br />
# cp /etc/netctl/examples/ethernet-static /etc/netctl/my-static-network<br />
<br />
===For Users Migrating from netcfg===<br />
Netctl uses {{ic|/etc/netctl}} to store its profiles whereas netcfg used {{ic|/etc/network.d}} for the same purpose.<br />
<br />
In order to migrate from netcfg, at least the following is needed:<br />
*Move network profile files to the new directory.<br />
*Rename variables therein according to netctl.profile(5) (most have only become CamelCase i.e CONNECTION= becomes Connection=).<br />
*Unquote interface variables and other variables that don't strictly need quoting (this is mainly a style thing).<br />
*Run {{ic|netctl enable <profile>}} for every profile in the old NETWORKS array. 'last' doesn't work this way, see netcfg.special(7).<br />
*Use {{ic|netctl list}} / {{ic|netctl start <profile>}} instead of netcfg-menu. wifi-menu remains available.<br />
<br />
==Support==<br />
Official announcement thread: https://bbs.archlinux.org/viewtopic.php?id=157670</div>Xcabalhttps://wiki.archlinux.org/index.php?title=Mac&diff=242288Mac2012-12-30T22:27:22Z<p>Xcabal: /* NVIDIA note */</p>
<hr />
<div>[[Category:Apple]]<br />
[[de:ArchLinux auf einem MacBook]]<br />
[[fr:MacBook]]<br />
[[it:MacBook]]<br />
[[zh-CN:MacBook]]<br />
{{Article summary start}}<br />
{{Article summary text|Details the installation and configuration of Arch Linux on Apple's MacBook and MacBook Pro lines of notebooks.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Official Arch Linux Install Guide}}<br />
{{Article summary wiki|Beginners Guide}}<br />
{{Article summary wiki|General Recommendations}}<br />
{{Article summary wiki|MacBook_Pro_8,1_/_8,2_/_8,3_(2011_Macbook_Pro)}}<br />
{{Article summary end}}<br />
<br />
Installing Arch Linux on a MacBook is quite similar to installing it on any other computer. However, due to the specific hardware configuration on a MacBook, there are a few deviations and special considerations which warrant a separate guide. For more background information, please see the [[Official Arch Linux Install Guide]], [[Beginners Guide]], [[Beginners Guide Appendix]], and [[Post Installation Tips]]. This guide contains installation-instructions that can be used on any Apple computer whose hardware is supported by the Linux kernel. If you have a Macbook5,2 (Polycarbonate, Non-Unibody) and are having additional issues, please see [[Macbook5,2]] for additional help.<br />
<br />
== Overview ==<br />
<br />
Specifically, the procedure for installing Arch Linux on a MacBook is:<br />
<br />
# '''[[#Installation of Mac OS X and Firmware Update | Install Mac OS X]]''': Regardless of the desired end-configuration, it helps to start from a clean install of OS X.<br />
# '''[[#Installation of Mac OS X and Firmware Update | Firmware Update]]''': This should help reduce errors and provide newer features for the hardware.<br />
# '''[[#Partitions | Partition]]''': This step either resizes or deletes the OS X partition and creates partitions for Arch Linux.<br />
# '''[[#Installation | Install Arch Linux]]''': The actual installation procedure.<br />
# '''[[#Post-Install Configuration | Post-Install Configuration]]''': MacBook specific configuration.<br />
<br />
{{ Tip | rEFIt is a popular bootloader for EFI-firmware computers (including Macs). It can be installed at any time during the installation. For instructions, please see [[MacBook#rEFIt|rEFIt]]. }}<br />
<br />
==Installation of Mac OS X and Firmware Update==<br />
<br />
[http://www.apple.com Apple] already has excellent instructions for installing Mac OS X. Follow their instructions. Finally, once OS X is installed, go to:<br />
<br />
Apple Menu --> Software Update<br />
<br />
And update all software. Once this has run, you will need to reboot your computer. Do this, and then run '''Software Update''' again to check to make sure that all updates have been installed.<br />
<br />
{{Note | Sometimes '''Software Update''' may not pick up all the firmware updates available for your computer. However, you can try to search this upgrades directly into the Apple's Support site.}}<br />
<br />
If you are not going to have Mac OS X installed, make backups of these files:<br />
<br />
/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport<br />
<br />
You will need this file later for iSight functionality.<br />
<br />
{{bc|/Library/ColorSync/Profiles/Displays/<FILES HERE>}}<br />
<br />
You will need the file(s) here for adjusting the [[#Color_Profile | color profile]].<br />
<br />
==Partitions==<br />
<br />
The next step in the installation is to re-partition the hard drive. If Mac OS X was installed using the typical procedure, then your drive should have a GPT format and the following partitions:<br />
<br />
* '''EFI''': a 200 MB partition at the beginning of the disk.It is often read as '''msdos''' or '''FAT''' by some partitioning tools and usually labeled ''#1''.<br />
* '''Mac OS X''': the ''(HFS+)'' partition that should take up all of the remaining disk space. Usually labeled ''#2''.<br />
* '''Recovery''': A recovery partition (only for Mac OS X 10.7+).<br />
How to partition depends on how many operating systems you want install. The following options will be explained:<br />
<br />
* [[#Arch Linux Only | Arch Linux Only]] for single boot.<br />
* [[#Mac OS X with Arch Linux | Mac OS X with Arch Linux]] for dual boot.<br />
<br />
If you do not know which option to pick, we recommend the dual boot so you can still return to Mac OS X whenever you want.<br />
<br />
===Arch Linux Only===<br />
<br />
This situation is the easiest to deal with. Mostly, partitioning is the same as any other hardware that Arch Linux can be installed on. The only special consideration is the MacBook firmware boot sound. To ensure that this sound is off: '''mute''' the volume in Mac OS X before continuing further. The MacBook firmware relies on the value in Mac OS X, if available. Note that if you choose to get rid of the OS X partition, there is no easy way to update your machines firmware unless you use an external drive to boot Mac OS X.<br />
You can boot in EFI mode (recommended) or bios-compatibility mode, if in doubt choose EFI.<br />
<br />
====EFI====<br />
*'''This requires GRUB 2 to work'''<br />
* Boot installation medium and switch to a free tty.<br />
* Run '''cgdisk''' (gptfdisk package).<br />
* Create the necessary partitions.<br />
<br />
Simple example (no LVM, crypto):<br />
{{Note | The swap partition is optional, on machines with a RAM of size 4GB or more, good performance can be expected without a swap partition. Also, a '''swap file''' can be created later, see [[Swap#Swap file|Swap file]].}}<br />
{{Note | For more information on partitioning, see [[Beginners'_Guide#Partitioning hard disks: General information|Partitioning hard disks: General information]].}}<br />
partition mountpoint size type label<br />
/dev/sda1 /boot/efi 200MiB vfat EFI<br />
/dev/sda2 /boot 100MiB ext2 boot<br />
/dev/sda3 - adjust swap swap<br />
/dev/sda4 / 10GiB ext4 root<br />
/dev/sda5 /home remain. ext4 home<br />
<br />
* Done, you can continue to [[MacBook#Installation | installation]]<br />
<br />
====BIOS-compatibility====<br />
* Boot installation medium and switch to a free tty.<br />
* Run '''parted'''. The simplest way is to change the partition table to '''msdos''' and then partition as normal. If you decide to use the GPT format, GRUB will not be able to recognize the partitioning scheme. GRUB2 is compatible with GPT.<br />
<br />
* Create the necessary partitions.<br />
<br />
* Done, you can continue to [[MacBook#Installation | installation]]<br />
<br />
===Mac OS X with Arch Linux===<br />
<br />
The easiest way to partition your hard drive, so that Mac OS X and Arch Linux will co-exist, is to use partitioning tools in Mac OS X and then finish with Arch Linux tools.<br />
<br />
{{Warning | It is highly recommended that this only be attempted after a clean install of Mac OS X. Using these methods on a pre-existing system may have undesired results.}}<br />
<br />
{{Note | If you have any problems, try using [http://gparted.sourceforge.net/ gparted] (i.e. ''instead'' of using Disk Utility and/or cgdisk). It is capable of shrinking the OS X partition and creating Linux partitions ready for installation. }}<br />
<br />
'''Procedure''':<br />
* In Mac OS X, run '''Disk Utility.app''' (located in /Applications/Utilities)<br />
<br />
* Select the drive to be partitioned in the left-hand column (not the partitions!). Click on the '''partition''' tab on the right.<br />
<br />
* Select the volume to be resized in the '''Volume scheme'''.<br />
<br />
* Decide how much space you wish to have for your Mac OS X partition, and how much for Arch Linux. Remember that a typical installation of Mac OS X requires around 15-20 GiB, depending on the number of software applications and files.<br />
<br />
* Finally, type the new (smaller) size for the Mac OS X partition in the size box and click '''Apply'''. This will create a new partition out of the empty space. You will delete this partition later.<br />
<br />
{{Note | if you wish to have a shared partition between Mac OS X and Arch Linux, then additional steps will need to happen here. Please see [[#Shared Partition|Shared Partition]].}}<br />
<br />
* If the above completed successfully, then you can continue. If not, then you may need to fix your partitions from within Mac OS X first.<br />
<br />
* Boot the Arch install CD by holding down the alt key during Boot. Follow one of the procedures below according to your choice of boot-method.<br />
====EFI====<br />
* Run '''cgdisk'''<br />
<br />
* Delete the partition you made in Disk Utility.app and create the necessary partitions for Arch Linux. Mac OS X likes to see a 128MiB gap after partitions, so when you create the first partition after the last Mac OS X-partition, type in '''+128M''' when cgdisk asks for the first sector for the partition. A simple example (no LVM, crypto):<br />
{{Note | The swap partition is optional, on machines with a RAM of size 4GB or more, good performance can be expected without a swap partition. Also, a '''swap file''' can be created later, see [[Swap#Swap file|Swap file]].}}<br />
{{Note | If you want to be able to boot GRUB from the Apple boot loader, you can create a small hfs+ partition (for convenience, use mac osx to format it in Disk Utility.app afterwards). Follow the grub efi install procedure, and mount your /boot/efi directory to the hfs+ partition you created. Finally, finish up again in mac osx by blessing the partition. This will set grub as the default boot option (holding alt at startup goes to the mac boot options screen still. See http://mjg59.dreamwidth.org/7468.html)}}<br />
{{Note | For more information on partitioning, see [[Beginners'_Guide#Partitioning hard disks: General information|Partitioning hard disks: General information]].}}<br />
partition mountpoint size type label<br />
/dev/sda1 /boot/efi 200MiB vfat EFI<br />
/dev/sda2 - ? hfs+ Mac OS X<br />
/dev/sda3 - ? hfs+ Recovery<br />
/dev/sda4 - 100MiB hfs+ Boot Arch Linux from the Apple boot loader (optional)<br />
/dev/sda5 /boot 100MiB boot boot<br />
/dev/sda6 - ? swap swap (optional)<br />
/dev/sda7 / 10GiB ext4 root<br />
/dev/sda8 /home remaining ext4 home<br />
<br />
* Done, you can continue to [[MacBook#Installation | installation]]<br />
<br />
====BIOS-compatibility====<br />
* Run '''parted'''<br />
# parted<br />
<br />
* Delete the empty space partition and partition the space as you would for any other installation. Note that MBR is limited to 4 primary partitions (including the efi partition). That leaves 2 primary partitions for arch. One strategy is to have a system and home partition, and use a swap file (I have not tried to use logical partitions). Another is to dedicate one partition to a shared partition (see below).<br />
<br />
* Next, create new filesystems on those partitions which need them, especially the partition which will contain /boot. If you're not sure how to do this using {{ic|mkfs.ext2}} (or whatever), run {{ic|/arch/setup}} and work through until you get to Prepare Hard Drive and use the "Manually configure block devices..." option, then exit the installer. This is necessary so that rEFIt will set the right partition type in the MBR in the next step (without an existing filesystem, it seems to ignore the partition type set by parted), without which grub will refuse to install to the right partition.<br />
<br />
* At this point you should reboot your computer and have rEFIt fix the partition tables on your hard drive. (If you do not do this, you may have to reinstall GRUB later on in order to have your Mac recognize the Linux partition.) When you are into the rEFIt menu, select '''update partition table''', then press Y.<br />
# reboot<br />
<br />
* Done, you can continue to [[MacBook#Installation | installation]]<br />
<br />
===Mac OS X, Windows XP, & Arch Linux Triple boot===<br />
<br />
This may not work for everyone but it has been successfully tested on a Macbook from late 2009.<br />
<br />
The easiest way to partition your hard drive, so that all these operating systems can co-exist, is to use disk utility in Mac OS X, use the formatter on windows XP install CP, and then finish with Arch Linux tools.<br />
<br />
{{Warning | It is highly recommended that this only be attempted after a clean install of Mac OS X. Using these methods on a pre-existing system may have undesired results. At least back your stuff up with timemachine or clonezilla before you begin.}}<br />
<br />
'''Procedure''':<br />
* In Mac OS X, run '''Disk Utility''' (located in /Applications/Utilities)<br />
<br />
* Select the drive to be partitioned in the left-hand column (not the partitions!). Click on the '''partition''' tab on the right.<br />
<br />
* Select the volume to be resized in the '''volume scheme.'''<br />
<br />
* Decide how much space you wish to have for your Mac OS X partition, how much fo XP, and how much for Arch Linux. Remember that a typical installation of Mac OS X requires around 15-20 GiB, and XP about the same, depending on the number of software applications and files. Something like OSX 200Gb, XP 25Gb, Arch 25Gb should be fine.<br />
<br />
* Put your decisions into action by pressing the + button and adding the new partitions, Label them as you like and make sure that your XP partition is the last one on the disk and is formatted for FAT32. It is probably best to have Arch formatted in HFS format as to not confuse you later, it will be reformatted anyway.<br />
<br />
So in linux terms your partitions will be something like:<br />
<br />
:*sda (disk)<br />
:*sda1 (Mac boot partition - you cannot see this one in OSX)<br />
:*sda2 (OSX install in HFS+)<br />
:*sda3 (Arch install temporarly in HFS)<br />
:*sda4 (XP install in FAT32)<br />
<br />
* Finally, click '''apply'''. This will create a new partition out of the empty space.<br />
<br />
{{Note | Using this method you may not be able to have a shared partition between Mac OS X and Arch Linux, this is because the mac will only allow for 4 active partitions. You will however be able to mount a HFS partition in Arch for one workaround. There are other workarounds possible also.}}<br />
<br />
* If the above completed successfully, you can continue. If not, then you may need to fix your partitions from within Mac OS X first.<br />
<br />
* You will not be needing boot camp this way, the program rEFIt is much more flexible (though not as flexible as Grub). Download and install rEFIt [[http://refit.sourceforge.net/]]<br />
<br />
* Go into a terminal in OS X and perform the following, this will enable the rEFIt boot manager. <br />
{{bc|<br />
cd /efi/refit<br />
./enable.sh<br />
}}<br />
<br />
* Reboot to check the rEFIt is working, it should appear on boot. When it comes up go to the rEFIt partition manager and agree to the changes.<br />
<br />
* Put your XP install CD and boot it with rEFIt - You may have to reboot a few times until it is recognized by the boot loader. Install XP and once it is installed use the OSX install CD to get your drivers running nicely in XP.<br />
** Note: when installing XP make sure you select your XP partition and format it again inside the XP installer. If you do not reformat it will not work.<br />
<br />
* Boot the Arch install CD, log in as root and run /arch/setup<br />
<br />
* Follow the install as normal but note that you will have to tell that arch installer to mount sda3 as the root partition and format it as ext3, there will not be a /boot or swap partition so ignore those warnings.<br />
<br />
* At this point, if you are dual booting, you should reboot your computer and have rEFIt fix the partition tables on your hard drive. (If you do not do this, you may have to reinstall GRUB later on in order to have your Mac recognize the Linux partition.) When you are into the rEFIt menu, select '''update partition table''', then press Y.<br />
# reboot<br />
<br />
* Done! Please continue to [[MacBook#Installation | installation]]<br />
<br />
==Booting Directly from GRUB==<br />
It is possible to boot directly from GRUB2 in efi mode without using refit. These instructions are known to work on a Macbook 7,1. It is advisable to host GRUB on either a fat32 or HFS+ partition, but ext2 or ext3 may also work. GRUB's appleloader command does not currently work with the 7,1, but support can be added with the patch available [https://savannah.gnu.org/bugs/index.php?33185 here].<br />
<br />
After the GRUB install is in the desired location, the firmware needs to be instructed to boot from that location. This can be done from either an existing OS X install or an OS X install disk. The following command assumes that the GRUB install is in /efi/grub on an existing OS X partition:<br />
sudo bless --folder /efi/grub --file /efi/grub/grub.efi<br />
===Compilation===<br />
Some models may need EFI_ARCH set to i386.<br />
bzr branch --revision -2 bzr://bzr.savannah.gnu.org/grub/trunk/grub grub<br />
cd grub<br />
./autogen.sh<br />
patch -p1 < appleloader_macbook_7_1.patch<br />
export EFI_ARCH=x86_64<br />
./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix=""<br />
make<br />
cd grub-core<br />
../grub-mkimage -O ${EFI_ARCH}-efi -d . -o grub.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux multiboot<br />
cp grub.efi *.mod *.lst yourinstalllocation<br />
<br />
===Example grub.cfg===<br />
{{out of date|reason=kernel26}}<br />
Note that there may be a better method for loading Windows.<br />
{{bc|1=<br />
set debug=video<br />
insmod efi_gop<br />
<br />
menuentry "Arch Linux EFI" {<br />
set root=(hd0,3)<br />
#search --set -f /boot/vmlinuz26-efi-physical<br />
#loadbios /boot/vbtrace_bios.bin /boot/int10.bin<br />
linux /boot/vmlinuz26-efi-physical root=/dev/sda3 reboot=pci resume=/dev/sda3 resume_offset=151552<br />
initrd /boot/kernel26-efi-physical.img<br />
}<br />
<br />
menuentry "MacOSX" {<br />
set root=(hd0,2)<br />
# Search the root device for Mac OS X's loader.<br />
#search --set -f /usr/standalone/i386/boot.efi<br />
# Load the loader.<br />
chainloader /usr/standalone/i386/boot.efi<br />
}<br />
<br />
menuentry "Windows 7" {<br />
appleloader HD<br />
}<br />
<br />
menuentry "Boot from CD" {<br />
appleloader CD<br />
}<br />
<br />
menuentry "Boot from USB" {<br />
appleloader USB<br />
}<br />
}}<br />
<br />
==Installation==<br />
{{ Note | This section is only required if you want to have Mac OS X installed along with Arch Linux. If not, follow the steps in the official install guide, then skip to [[MacBook#Post-Install Configuration | post install]].}}<br />
<br />
* Boot from the Arch Linux install CD or the latest [[Archboot]] iso (unofficial) depending on your needs.<br />
{{Note | On MacBook Pro 7,1, I had an error booting the installation media Version 2012.12.01: "unable to handle kernel NULL pointer dereference at 0000000000000010" during pacpi_set_dmamode. To fix this problem, boot with the option: acpi&#61;off. After chrooting, add MODULES&#61;"ata_generic" into /etc/mkinitcpio.conf and execute mkinitcpio -p linux, see: [[Installation_Guide#Configure_the_system | Installation Guide, 9 Configure the system]].}}<br />
{{Note | Some MacBook users report strange keyboard output such as long delays and character doubling. To fix this problem, boot with the following options: arch noapic irqpoll acpi&#61;force}}<br />
<br />
* Log in as '''root'''<br />
<br />
{{Note | If you want to do a netinstall rather than installing the possibly outdated packages on the iso and depend on a wireless network that is encrypted, you should change to a free tty and connect manually before proceeding, see [[Beginners_Guide#Setup wireless in the live environment (optional)|Beginners_Guide]]}}<br />
<br />
* Proceed through the installation as described in the [[Official Arch Linux Install Guide]] '''except''' in the following areas:<br />
** In the [[Official Arch Linux Install Guide#Prepare Hard Drive | prepare hard drive]] stage, do only the [[Official Arch Linux Install Guide#Manually configure block devices, filesystems and mountpoints | set filesystem mountpoints]] step, taking care to assign the correct partitions. Partitions have already been created if you followed [[Macbook#Partition]]<br />
** '''(for booting with EFI''') After the [[Official Arch Linux Install Guide#Install Bootloader | install boot loader]] stage, exit the installer and install GRUB2, see [[GRUB2#During Arch Linux installation]].<br />
** '''(for booting with BIOS-compatibility)''' In the [[Official Arch Linux Install Guide#Install Bootloader | install boot loader]] stage, edit the menu.lst file and add '''reboot=pci''' to the end of the '''kernel''' lines, for example: {{bc|1=kernel /vmlinuz26 root=/dev/sda5 ro reboot=pci}} This will allow your MacBook to reboot correctly from Arch.<br />
** '''(for booting with BIOS-compatibility)''' Also in the [[Official Arch Linux Install Guide#Install Bootloader | install boot loader]] stage, install GRUB on whatever partition that {{ic|/boot}} is on. {{Warning | Do not install GRUB onto ''/dev/sda'' !!! Doing so is likely to lead to an unstable post-environment.}}<br />
** In the [[Official Arch Linux Install Guide#Configure System | configure system]] stage, edit /etc/mkinitcpio.conf and add the '''usbinput''' hook to the '''HOOKS''' line somewhere after the '''autodetect''' hook. This will load the drivers for your keyboard in case you need to use it before Arch boots (e.g. entering a [[LUKS]] password or using the troubleshooting shell).<br />
<br />
* When the install process is complete, reboot your computer.<br />
# reboot<br />
<br />
* If using optical media, hold down the eject key as your MacBook starts, this should eject the Arch Linux install disk.<br />
<br />
* If dual-booting Mac OS X and Arch Linux, hold down the alt (option) key while the system boots to use the Mac bootloader to select which OS to boot.<br />
<br />
=== Additional steps for Arch Linux only install===<br />
{{ Note | Do this after you tested that your setup is working. This procedure has been tested on a MacBook 4,1 with an msdos partition table. It may not work on newer versions. Please update if it works for you.}}<br />
* In order for Linux to boot up straight away, you will have to tell the firmware that your /boot partition is bootable, or you will always have to hold down the option (alt) key whenever you want to start up your computer.<br />
* In order to do this you will need the original Mac OS X install disk<br />
* Boot into it (you may need to hold the option (alt) key during boot again to access it)<br />
** Open Terminal.app (found under the Utilities menu in the menu bar), and type:<br />
# diskutil list<br />
** Find the device name of your /boot partition (this is your root (/) partition, if you don't have it separate). The format should be /dev/disk0sX, where X is a number from 1 to infinity<br />
** If using EFI type (replace X with the appropriate number):<br />
# bless --folder=/Volumes/efi --file=/Volumes/efi/efi/arch/grubx64.efi --setBoot<br />
# bless --mount=/Volumes/efi --file=/Volumes/efi/efi/arch/grubx64.efi --setBoot<br />
** If using BIOS-compatibility type (replace X with the appropriate number):<br />
# bless --device /dev/disk0sX --setBoot --legacy --verbose<br />
* Remove the installation disk and restart your computer<br />
* After a few seconds of grey screen, your boot loader screen should appear automatically.<br />
<br />
==Post-Install Configuration==<br />
<br />
=== Xorg ===<br />
<br />
Install and configure Xorg by following the [[Xorg]] article.<br />
<br />
==== Video ====<br />
<br />
Different MacBook models have different graphic cards.<br />
<br />
To see which graphics card you have type:<br />
<br />
$ lspci | grep VGA<br />
<br />
* If it returns a string containing '''intel''' you only need the '''xf86-video-intel''' driver. You can install it by typing<br />
<br />
# pacman -S xf86-video-intel<br />
<br />
* if it returns '''nVidia''', read [[NVIDIA]].<br />
<br />
* otherwise if it returns '''ATI''' or '''AMD''', read [[ATI]].<br />
<br />
===== NVIDIA note =====<br />
<br />
{{ Tip | MBP 6.2 - With the proprietary [[NVIDIA]] drivers, support for [https://wiki.archlinux.org/index.php/NVIDIA#Enabling_Pure_Video_HD_.28VDPAU.2FVAAPI.29 Pure Video HD] is available for hardware video decoding. }}<br />
<br />
For MacBooks with NVIDIA graphics, for the backlight to work properly you may need the [https://aur.archlinux.org/packages.php?ID=25467 nvidia-bl] package found in the [[AUR]].<br />
<br />
{{Tip|If backlight control doesn't work after installing nvidia-bl, you should [[Kernel modules#Blacklisting|blacklist]] apple_bl kernel module.}}<br />
<br />
{{Tip|Alternatively, you can choose to use the [https://aur.archlinux.org/packages/pommed-light/ pommed-light] package found in the [[AUR]]. If you do so, you may wish to change the step settings in /etc/pommed.conf.mactel to something around 5000-10000 depending on how many levels of brightness you desire. The max brightness is around 80000, so take that into account.}}<br />
<br />
===== Macbook 6.2+ - EFI =====<br />
<br />
As of 4/30/2011, the proprietary nvidia driver is not known to work under X with this model in efi mode. The nouveau driver should work out of the box, but dri should be installed from the [https://aur.archlinux.org/packages/mesa-git/PKGBUILD mesa-git] package.<br />
<br />
===== MacbookPro 5.5, NVIDIA and secondary display =====<br />
<br />
As of January 1 2011, the latest NVIDIA drivers (290.10) might not work properly when a secondary display is used (tested with TwinView), NVIDIA's current [http://www.nvnews.net/vbulletin/showthread.php?t=122606 long-live supported] 275xx drivers seem to work fine. Install [https://aur.archlinux.org/packages.php?ID=52283 nvidia-275xx] and [https://aur.archlinux.org/packages.php?ID=52285 nvidia-utils-275xx ] from [[AUR]], and possibly [https://aur.archlinux.org/packages.php?ID=52284 lib32-nvidia-utils-275xx] if you are on x86_64 system and want 32-bits support.<br />
<br />
MacbookPro 5.5 has an NVIDIA 9400m graphics card. This problem might apply to other devices as well.<br />
<br />
==== Touchpad ====<br />
<br />
The touchpad should have basic functionality by default. A true multitouch driver which behaves very similarly to native OSX can be installed from the AUR: [https://aur.archlinux.org/packages.php?ID=46339 xf86-input-multitouch-git]. It supports 1, 2 and 3 finger gestures, including differentiation between horizontal and vertical 3 finger swipe. Additional details are available at [http://bitmath.org/code/multitouch/ the driver's project page].<br />
<br />
xf86-input-multitouch-git does not support any sort of configuration without editing the driver's source. Some users are also experiencing issues with false clicks from palm touches. There is now a much more configurable fork available as [https://aur.archlinux.org/packages.php?ID=48505 xf86-input-mtrack-git]. Configuration options are documented in the [https://github.com/BlueDragonX/xf86-input-mtrack readme].<br />
<br />
The following mtrack options work well on a Macbook 7,1:<br />
<br />
Option "Thumbsize" "50"<br />
Option "ScrollDistance" "100"<br />
<br />
Probably you need also to add:<br />
<br />
MatchDevicePath "/dev/input/event10"<br />
<br />
'''Special Note About Older Macbook Models (confirmed on MacBook 2,1):''' On older Macbook models (pre-multitouch), the touchpad will not function properly until you install the xf86-input-synaptics package. Please see [[Touchpad Synaptics]] for more information on installing and configuring this package.<br />
<br />
'''Note on Macbook Pro(5,5):''' I found it is much simpler to use the xf86-input-synaptics[https://www.archlinux.org/packages/extra/x86_64/xf86-input-synaptics/] in Extra. Although it does not have much function as 3 finger swipe, this driver provides faster response. Gsynaptics[https://www.archlinux.org/packages/community/i686/gsynaptics/] also provides a simple GUI config. Below is a Xorg config file /etc/X11/xorgconfig.d/60-synaptics.conf for reference only.<br />
Section "InputClass"<br />
Identifier "touchpad catchall"<br />
Driver "synaptics"<br />
MatchIsTouchpad "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Option "SHMConfig" "on"<br />
Option "TapButton1" "1"<br />
Option "TapButton2" "3"<br />
Option "TapButton3" "2"<br />
Option "PalmDetect" "on"<br />
Option "VertEdgeScroll" "off"<br />
Option "HorizEdgeScroll" "off"<br />
Option "CornerCoasting" "off"<br />
Option "EdgeMotionUseAlways" "off"<br />
Option "AreaLeftEdge" "10"<br />
Option "AreaRightEdge" "1270"<br />
EndSection<br />
<br />
==== Keyboard ====<br />
<br />
MacBook keyboard works by default. For swaping fn keys with Fx keys see [[Apple Keyboard]].<br />
<br />
To enable it you can map with right application like '''xbindkeys''' or through DE preferences; but another very good way, that we recommend, is to install [https://aur.archlinux.org/packages.php?ID=14833 pommed] from the [[AUR]].<br />
<br />
Edit the '''/etc/pommed.conf''' according to your hardware on MacBook, building<br />
it from '''/etc/pommed.conf.mac''' or '''/etc/pommed.conf.ppc''' example files.<br />
<br />
Note that you can also run it without a configuration file, the defaults may work for you. Then<br />
<br />
Put '''pommed''' at the end in your '''DAEMONS''' array in your '''/etc/rc.conf'''<br />
<br />
finally reboot your pc.<br />
<br />
{{ Tip | if you are using Gnome or KDE you can easily configure ''3rd level functionality'', ''multimedia key'', etc. in Keyboard Preferences.}}<br />
<br />
{{ Note | see the [[Xorg input hotplugging]] page for other configuration information.}}<br />
<br />
===== NVIDIA note =====<br />
<br />
If the brightness does not function correctly through pommed, make sure you have installed the [https://aur.archlinux.org/packages.php?ID=25467 nvidia-bl] package and insert<br />
<br />
find . -name "*" -exec sed -i 's/mbp_backlight/nvidia_backlight/' '{}' \;<br />
<br />
into the second line of the pommed PKGBUILD build() function and remake the package. From [https://bbs.archlinux.org/viewtopic.php?id=105091 this forum post].<br />
<br />
Another possible solution is to modify the pommed PKGBUILD build():<br />
<br />
find . -name "*" -exec sed -i 's/nvidia_backlight/apple_backlight/' '{}' \;<br />
<br />
If the previous does not work try the following,<br />
<br />
run nvidia-settings, edit the file '/etc/X11/xorg.conf' and add this line into the Device section:<br />
<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
save and reboot and check backlight buttons work.<br />
More information available at [https://help.ubuntu.com/community/MacBookPro5-5/Precise#LCD ubuntu macbook pro 5,5]<br />
<br />
=== Wifi ===<br />
{{ Tip | MBP 6.2: since kernel 2.6.32.35-1 this works out of the box }}<br />
<br />
Different MacBook models have different wireless cards.<br />
<br />
You can easily check what card do your MacBook have by:<br />
<br />
# lspci | grep Network<br />
<br />
* if you have an Atheros all should works-out-of-the-box.<br />
<br />
* instead if you have a Broadcom follow the [[Broadcom BCM4312]] page.<br />
<br />
* 5.0 and 6.0 generation MacBooks may have a BCM43xx, follow the instructions for the broadcom-wl driver on the [[Broadcom wireless]] page. The interfaces can swap during reboot so its best to define them in a udev rule (instructions on the [[Broadcom wireless]] page).<br />
<br />
* 8.1 generation MacBooks have BCM4331, for which support is not present in either Linux (3.0 and 3.1) or the proprietary drivers by Broadcom. There is however preliminary support for it in Linux 3.2. To run the drivers on earlier kernels, you will need to use [http://wireless.kernel.org/en/users/Download compat-wireless]<br />
<br />
''Note'': if your connection frequently drops, you may have to turn off wifi power management. If you are running [[pm-utils]], you may override wireless power management by creating an executable file /etc/pm/wireless with the lines {{bc|#!/bin/sh<br />
/sbin/iwconfig wlan0 power off}}<br />
<br />
=== Power management ===<br />
<br />
==== Laptop-mode-tools ====<br />
<br />
Because the MacBook is obviously a laptop, you may wish to control its power management features using something like [[Laptop Mode Tools]].<br />
<br />
However, Laptop Mode Tools is known to disable the keyboard in console mode after being idle for a few seconds (does not happen when using X). If this happens to you set <br />
<br />
CONTROL_USB_AUTOSUSPEND=0<br />
<br />
in {{ic|/etc/laptop-mode/conf.d/usb-autosuspend.conf}}. See this [https://bbs.archlinux.org/viewtopic.php?pid=984831 forum thread] for the original workaround.<br />
<br />
==== Suspend to RAM (kernel suspend) ====<br />
<br />
Suspend (the kernel suspend) should work out of the box (I had a problem in which the machine would "suspend immediately after resume" in certain conditions when suspending by closing the lid. This was solved by de-selecting the option "event_when_closed_battery" in gconf-editor &rarr; gnome-power-manager &rarr; actions).<br />
<br />
For a macbook2,1 (bought in 2007) s2ram works using <br />
s2ram -f -a 3 <br />
To make it work with kde4 you have to create a file named "config" into /etc/pm/config.d containing<br />
SLEEP_MODULE="uswsusp"<br />
S2RAM_OPTS="-f -a 3"<br />
<br />
For a MacBook Pro 3,1 (bought in 2008), the following command should work, both in X and in a console:<br />
s2ram -f -a 1<br />
<br />
Note: If you use pm-utils suspending lead (at least for me) disk freeze. Try changing /etc/pm/config.d/module to<br />
SLEEP_MODULE=tuxonice<br />
<br />
For a macbook5.5, s2ram may work using (be sure to run it in X)<br />
s2ram -f -p -m<br />
<br />
==== Suspend to disk (hibernate) ====<br />
{{Merge|Swap#Swap file|These part is duplication of Swap file section in Swap. Should check and merge it to Swap.}}<br />
Hibernate should work if you have a swap partition. If you opted for a swap file because of the MBR limitation to 4 primary partitions, you can still get hibernate functionality by following these instructions (this is mostly taken from http://ubuntuforums.org/showthread.php?t=1042946):<br />
<br />
* Create a swapfile (here 2G = bs*count):<br />
sudo dd if=/dev/zero of=/swapfile bs=1024 count=2M<br />
It is recommended, but not necessary, to create the swapfile on a newly created partition, so that fragmentation is minimum.<br />
# chmod 600 swapfile <br />
# mkswap swapfile <br />
mkswap: swapfile: warning: don't erase bootbits sectors<br />
on whole disk. Use -f to force.<br />
Setting up swapspace version 1, size = 2097148 KiB<br />
no label, UUID=6bf46166-4f9e-433a-aac1-91cb3f5cf8ba<br />
# <br />
Note that we will not use this UUID later.<br />
* Add the swapfile in fstab:<br />
/swapfile none swap sw 0 0<br />
* Determine the UUID of partition on which the swapfile is (/sbin/blkid is provided by util-linux-ng)<br />
# blkid -g<br />
# blkid<br />
/dev/sda4: UUID="388014d3-1d18-4ca0-980e-ef2f9fdebde4" TYPE="ext3" <br />
388014d3-1d18-4ca0-980e-ef2f9fdebde4 is the number we are looking for.<br />
* Determine the physical offset of the swapfile:<br />
$ sudo filefrag -v /swapfile | head<br />
Filesystem type is: ef53<br />
Filesystem cylinder groups is approximately 132<br />
File size of /swapfile is 2147483648 (524288 blocks, blocksize 4096)<br />
ext logical physical expected length flags<br />
0 0 24576 12 merged<br />
1 12 24589 24587 1024 merged<br />
2 1036 25615 25612 1024 merged<br />
3 2060 26640 26638 1024 merged<br />
4 3084 27665 27663 1024 merged<br />
5 4108 28690 28688 1024 merged<br />
$ <br />
Here, 24576 is the number we want.<br />
* Edit /boot/grub/menu.lst and add:<br />
resume=/dev/disk/by-uuid/388014d3-1d18-4ca0-980e-ef2f9fdebde4 resume_offset=24576<br />
to your kernel stanza options (or use the kopt method as in the post). Note that the "resume=UUID=" actually did not work for me. I had to use the /dev/disk/by-uuid syntax.<br />
<br />
Note: "ro" has to be at the end of the line, like this:<br />
kernel /boot/vmlinuz-linux root=/dev/sda4 '''resume=/dev/sda4 resume_offset=24576''' ro<br />
* Nothing to do with update-grub nor mkinitcpio.<br />
* Reboot once<br />
* Try to hibernate<br />
<br />
=== Light sensor ===<br />
<br />
If you want to use the built in light sensor to automatically adjust screen and keyboard backlight brightness check out<br />
'''Lighter''' [https://github.com/Janhouse/lighter] (simple perl script, easy to fine-tune) and '''Lightum''' [https://github.com/poliva/lightum] (Requires Gnome or KDE but is older and more complete than Lighter).<br />
<br />
=== Sound ===<br />
{{ Tip | MBP 5.5: since kernel 2.6.32 this works out of the box - just unmute the front speakers and store the sound level }}<br />
<br />
First of all follow [[ALSA]] wiki page, then if something does not work correctly, continue reading this part.<br />
<br />
Edit your '''/etc/modprobe.d/50-sound.conf''' or '''/etc/modprobe.d/modprobe.conf''' appending this line:<br />
<br />
options snd_hda_intel model=intel-mac-auto<br />
<br />
This should automatically specify the codec in your MacBook. Alternatively, for MacBookPro5,X, you can use:<br />
<br />
options snd_hda_intel model=mb5<br />
<br />
(note that the jack output is controlled with "HP").<br />
<br />
If you have an iMac8,1, you should instead use<br />
<br />
options snd-hda-intel model=mbp3 position_fix=2<br />
<br />
{{ Note | you can try to specify other options, agree with in your hardware. All other possible settings are listed in Kernel Documentation, avaible online:<br />
<br />
* [http://www.kernel.org/doc/Documentation/sound/alsa/ALSA-Configuration.txt ALSA-Configuration.txt]<br />
* [http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio.txt HD-Audio.txt]<br />
* [http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt HD-Audio-Models.txt].}}<br />
<br />
Then, reboot.<br />
<br />
=== Bluetooth ===<br />
<br />
{{Note|Bluetooth should work out-of-the box. The hid2hci utility is used by default since bluez 4.91}}<br />
<br />
See the article on [[Bluetooth]] to install and configure all software needed.<br />
<br />
=== iSight ===<br />
<br />
{{Note|Linux kernel from 2.6.26 includes the '''Linux UVC driver''' natively. MBP 6.2+ (Kernel ~2.6.37+) iSight works out of the box without the need to use firmware from OS X. }}<br />
<br />
You can use many applications to test the camera:<br />
<br />
* MPlayer<br />
<br />
# mplayer tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0 -fps 30<br />
<br />
* Cheese<br />
* Skype<br />
* Ekiga<br />
<br />
A simple solution to take snapshots is:<br />
<br />
# mplayer tv:// -vf screenshot<br />
<br />
and the pressing the s key to take a snapshot. Files are of the format shot\d\d\d\d.png and are reported in the standard output.<br />
<br />
=== Temperature Sensors ===<br />
<br />
For reading temperature just install and configure '''lm_sensors'''.<br />
See [[Lm sensors]] page.<br />
<br />
=== Color Profile ===<br />
<br />
We can use color profiles from Mac OS.<br />
<br />
First, install [https://aur.archlinux.org/packages.php?ID=10969 xcalib] from the [[AUR]].<br />
<br />
Second copy pre-saved color profiles placed in '''/Library/ColorSync/Profiles/Displays/''' on Mac OS partition to '''~/colorprofiles/''' for example.<br />
<br />
There are color profile files agree with in MacBook models; select the right one:<br />
<br />
* '''Color LCD-4271800.icc''' for MacBook Pro with CoreDuo CPU<br />
* '''Color LCD-4271880.icc''' for MacBook with Core2Duo<br />
* '''Color LCD-4271780.icc''' for MacBook (not Pro) based on CoreDuo or Core2Duo.<br />
<br />
{{ Tip | also Mac OS allows to save current color profile from '''Displays -> Color''' section of the '''Mac OS System Preferences''', in this case file is saved to '''/Users/<username>/Library/ColorSync/Profiles'''.}}<br />
<br />
Finally you can activate it by running<br />
<br />
# xcalib ~/colorprofile.icc<br />
<br />
{{ Warning | previous command set the color profile only for the current session; this mean that you must run it every time you login in your system. For automating it you can execute the command by '''Autostart Application''', concording with your DE (or add the command to your login manager's initialization script, e.g. /etc/gdm/Init/Default).}}<br />
<br />
{{ Note | see '''xcalib''' man pages for further information.}}<br />
<br />
=== Apple Remote ===<br />
<br />
First, to correctly install and configure the '''lirc''' software that control IR see [[Lirc]] wiki.<br />
<br />
Then make LIRC use '''/dev/usb/hiddev0''' (or '''/dev/hiddev0''') by editing '''/etc/conf.d/lircd'''. Here is how mine look:<br />
<br />
#<br />
# Parameters for lirc daemon<br />
#<br />
LIRC_DEVICE="/dev/usb/hiddev0"<br />
LIRC_DRIVER="macmini"<br />
LIRC_EXTRAOPTS=""<br />
LIRC_CONFIGFILE="/etc/lirc/lircd.conf"<br />
<br />
Use '''irrecord''' (available when installing lirc) to create a configuration file matching your remote control signals (alternatively, you can try to use the lircd.conf below):<br />
<br />
sudo irrecord -d /dev/usb/hiddev0 -H macmini output_conf_file<br />
<br />
Start '''lircd''' and use '''irw''' to check if it works.<br />
<br />
Example of an '''/etc/lirc/lircd.conf''':<br />
<br />
begin remote<br />
<br />
name lircd.conf.macbook<br />
bits 8<br />
eps 30<br />
aeps 100<br />
<br />
one 0 0<br />
zero 0 0<br />
pre_data_bits 24<br />
pre_data 0x87EEFD<br />
gap 211994<br />
toggle_bit_mask 0x87EEFD01<br />
<br />
begin codes<br />
Repeat 0x01<br />
Menu 0x03<br />
Play 0x05<br />
Prev 0x09<br />
Next 0x06<br />
Up 0x0A<br />
Down 0x0C<br />
end codes<br />
<br />
end remote<br />
<br />
===HFS Partition Sharing===<br />
<br />
First, we need [https://aur.archlinux.org/packages.php?ID=6709 hfsprogs] package from AUR. <br />
<br />
we have to list our partitions. Use<br />
<br />
fdisk -l /dev/sda<br />
<br />
example output:<br />
<br />
# fdisk -l /dev/sda<br />
Device Boot Start End Blocks Id Type<br />
/dev/sda1 1 26 204819 ee GPT<br />
/dev/sda2 26 13602 109051903+ af Unknown<br />
/dev/sda3 * 13602 14478 7031250 83 Linux<br />
/dev/sda4 14478 14594 932832+ 82 Linux swap / Solaris<br />
<br />
As we see, the "Unknown" partition is our OS X partition, which is located in {{ic|/dev/sda2}}.<br />
<br />
Create a "mac" folder in /media:<br />
<br />
sudo mkdir /media/mac<br />
<br />
Add at the end of ''/etc/fstab'' this line:<br />
<br />
/dev/sda2 /media/mac hfsplus auto,user,rw,exec 0 0<br />
<br />
Mount it :<br />
<br />
mount /media/mac<br />
<br />
and check it:<br />
<br />
ls /media/mac<br />
<br />
===HFS+ Partitions===<br />
<br />
HFS+ partitions, now the default in Mac OS X, are not fully supported by Linux and are mounted as read-only by default. In order to write to an HFS+ partition, it is necessary to disable journaling. This can be accomplished using Mac OS X Disk Utility. Refer to this [http://support.apple.com/kb/ht2355 Apple support page] for more information.<br />
<br />
===Home Sharing===<br />
<br />
'''''UID Synchronization'''''<br />
<br />
====In OS X====<br />
<br />
{{Note | it is strongly recommended that UID/GID manipulation be done immediately after a new user account is created, in OS X as well as in Arch Linux. If you installed OS X from scratch, then this operation is guaranteed to work after logging into your account for the first time.}}<br />
<br />
=====Step 1: Change UID and GID(s)=====<br />
<br />
'''''Pre-Leopard'''''<br />
<br />
# Open '''NetInfo Manager''' located in the ''/Applications/Utilities'' folder.<br />
<br />
# If not done for you already, enable access to user account transactions by clicking on the closed lock at the bottom of the window, and entering your account password, or root password if you have created a root account.<br />
<br />
# Navigate to ''/users/<new user name>'' where <new user name> is the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch.<br />
<br />
# Change the '''UID''' value to 1000 (the value used by default for first user created in Arch).<br />
<br />
# Also change the '''GID''' value to 1000 (the value used by default for user account creation in Arch).<br />
<br />
# Navigate to ''/groups/<new user name>'', automatically saving the changes you have made so far.<br />
<br />
{{Note | if you get an error message that the transaction is not allowed, log out and log back in.}}<br />
<br />
'''''Leopard'''''<br />
<br />
In Leopard, the '''NetInfo Manager''' application is not present. A different set of steps is required for UID synchronization:<br />
<br />
# Open '''System Preferences'''.<br />
<br />
# Click on '''Accounts'''.<br />
<br />
# Unlock the pane if not already done so.<br />
<br />
# Right-click on the desired user and select '''Advanced Options'''.<br />
<br />
# Write down the value of the '''User ID''' field, you will need it later on. Change both the UID and GID to match the UID and GID of the account wished to be shared with in Arch (1000 by default for the first user created in Arch).<br />
<br />
=====Step 2: Change "Home" Permissions=====<br />
<br />
# Open up '''Terminal''' in the ''/Applications/Utilities'' folder.<br />
<br />
# Enter the following command to reclaim the permission settings of your home folder, replacing <your user name>, <your user group> and <your old UID> with the user name whose UID and GID values you just changed, the group name whose GID value you just changed and the old UID number, respectively.<br />
<br />
sudo find /User/<your user name> -user <your old UID> -exec chown <your user name>:<your user group> {} \;<br />
<br />
====In Arch====<br />
<br />
To synchronize your UID in Arch Linux, you are advised to perform this operation ''while creating a new user account''.<br />
It is therefore recommended that you do this as soon as you install Arch Linux.<br />
<br />
Now you must substitute Arch's home with Mac OS's home, by modify entries of the famous ''/etc/fstab'' file.<br />
<br />
=== Avoid long EFI wait before GRUB ===<br />
If your Macbook spends 30 seconds with "white screen" before GRUB shows, try booting from your Mac OS X install DVD, select language, then click Utilities->Terminal, and enter<br />
<br />
# bless --device /dev/disk0s1 --setBoot --legacy<br />
<br />
(given that if your GRUB is on sda1, /dev/disk0s2 if it is on sda2, etc). Via https://bbs.archlinux.org/viewtopic.php?pid=833215 <br />
<br />
=== Mute startup chime ===<br />
If you forgot to mute before installing, you can still mute again if you have a Mac OS X Install disk. Boot from it, select language, then click Utilities->Terminal, and enter<br />
<br />
# /usr/sbin/nvram SystemAudioVolume=%01<br />
<br />
(or whatever volume you want).<br />
<br />
==rEFIt==<br />
<br />
{{Note | You probably want to have a look at [http://www.rodsbooks.com/refind/ refind], which is some type of successor of rEFIt.}}<br />
{{Note | this is not a requirement. It only gives you a menu to choose between OS X and Arch Linux upon every boot.}}<br />
<br />
For more see, [http://refit.sourceforge.net/myths/ refit myths].<br />
<br />
In OS X, download the ".dmg" from -> [http://refit.sourceforge.net/ Refit Homepage] and install it.<br />
<br />
{{Note | if you have already partitioned your hard disk in preparation for the Arch installation, rEFIt may not be enabled by default. You will have to run the "enable.sh" script installed in /efi/refit/.}}<br />
<br />
Open up '''Terminal''' and enter:<br />
<br />
cd /efi/refit; ./enable.sh<br />
<br />
===Problems with rEFIt===<br />
<br />
If you experience problems after the install of Arch or rEFIt, especially is the right OS is not showing up to boot to or if it dumps you at a GRUB prompt stuck like the following:<br />
{{bc|<br />
GRUB>_<br />
}}<br />
<br />
Then have a look at this link:<br />
<br />
http://mac.linux.be/content/problems-refit-and-grub-after-installation<br />
<br />
It can give you a basic idea on how to boot off the Arch live cd, mount the problem Arch install, chroot, use gptsync, and reinstall GRUB. This is probably for more advanced users who can translate the commands from a debian system to an Arch system and also apply it to the partitions on their machine. Be careful not to install GRUB in the wrong spot.<br />
<br />
If you need a copy of gptsync you can wget it from here:<br />
http://packages.debian.org/sid/gptsync<br />
or try these, for 64 bit:<br />
{{bc|<br />
wget http://ftp.us.debian.org/debian/pool/main/r/refit/gptsync_0.14-2_amd64.deb<br />
}}<br />
<br />
and for i386:<br />
{{bc|<br />
wget http://ftp.us.debian.org/debian/pool/main/r/refit/gptsync_0.14-2_i386.deb<br />
}}<br />
<br />
since they are .deb packages you will need the program deb2targz<br />
<br />
pacman -S deb2targz<br />
<br />
== Model-specific information ==<br />
<br />
=== MacBook Pro ===<br />
<br />
==== 10,1 ====<br />
<br />
* [[MacBookPro Retina]].<br />
<br />
=== MacBook Air===<br />
==== Mid 2012 13" - Version 5,2 ====<br />
Kernel panics using default boot media under arch kernel 3.5. Adding 'intremap=off' fixes this. Additionally, there are problems loading the 'applesmc' module (meaning the temperature sensors, fan, and keyboard backlight do not work). These problems are fixed in the linux 3.6-rc4 mainline kernel (I have tested).<br />
<br />
==== Mid 2012 11.5" - Version 5,1 ====<br />
If you have issues with waking from sleep while in X11 such as a black screen or showing the console with a frozen mouse cursor then remove xf86-input-synaptics and install mtrack-git from aur. This fixed errors such as <br />
(EE) [dix] bcm5974: unable to find touch point 0<br />
and backtraces that causes X11 to crash. This might apply to Version 5,2 assuming they use the same trackpad.<br />
<br />
===== Installing using the Archboot 2012.06 image =====<br />
Several people have reported problems installing Arch Linux on the MBA version 5,2 (See [https://bbs.archlinux.org/viewtopic.php?id=144089 problems booting archlinux on a MacBook Air Mid 2012]). A common problem is that the screen is not detected and therefore goes black when the installer boots. To fix this problem one has to select the normal install (Not the LTS) during boot and press tab to edit the boot flags. Then add noapic flag to the boot line. This should fix the screen going black. Install the system as you normally would. It may help later in the configuration process if the support packages are installed already at this stage.<br />
<br />
When the install has finished again add the noapic flag to the grub2 boot line (if you use grub2) and also add i915.diescreaming=1 (or perhaps i915.die). This should keep the screen from going black when booting the new system. After you enter the system the wireless driver should be loaded. If you installed the support packages during installation you should have the wifi-menu command. Run it and select the network you want to use. One could also use wpa_supplicant but wifi-menu is quite fast to use at this stage. Now you are ready to upgrade the system. As of writing there have been a lot of changes to Archlinux since the 2012.06 image of Archboot was released ([https://www.archlinux.org/news/filesystem-upgrade-manual-intervention-required-1/ filesystem] and [https://www.archlinux.org/news/the-lib-directory-becomes-a-symlink/ glibc]). Therefore the upgrade process can be a bit difficult. The current solution has sucessfully upgraded a standart archboot version to a up-to-date version as of October 2012 and this step should be obsolete in future releases of archboot.<br />
<br />
First ignore the new "big" changes to Arch Linux,<br />
<br />
pacman -Suy --ignore glibc,libarchive,curl,filesystem <br />
<br />
If this only upgrades pacman then run the command again. Remember to make sure that pacman is ignoring the packages you don't want upgraded now. Otherwise you may break the system and have to reinstall! Now upgrade to the new filesystem,<br />
<br />
pacman -S filesystem --force<br />
<br />
As described here ([https://wiki.archlinux.org/index.php/DeveloperWiki:usrlib Glibc upgrade guide]) there may be conflicts with installed packages that require the /lib directory. Follow the guide and remove any packages that use /lib. The stock 3.4.2 kernel from Archboot should be on this list so first upgrade this,<br />
<br />
pacman -S linux<br />
<br />
This may give some errors saying that the system may not boot because of missing modules. Ignore this warning for now. The stock install may also contain gcc in the /lib directory so also remove this if needed and any other packages that have conflicts. Now Glibc should be the only package in /lib so run the system upgrade and accept all changes, <br />
<br />
pacman -Su<br />
<br />
Finally reinstall the kernel so that it can find the correct modules,<br />
<br />
pacman -S linux<br />
<br />
Now this command shouldn't give any errors like last time. You can also reinstall gcc at this point. After a rebooted the system should startup and the new kernel should have fixed the problem with the screen going black. If want to boot Xorg then you may need to remove the i915.diescreaming=1 line from GRUB2. If not then attach a external screen and try to fix the problem that way. Some people have reported commands that may help on the [https://bbs.archlinux.org/viewtopic.php?id=144089 forum].<br />
<br />
==== Mid 2011 - Version 4,x ====<br />
Works out-of-the-box since kernel 3.2. It is recommended to use [[Archboot]], install [[GRUB2]] and use EFI.<br />
<br />
== See also ==<br />
<br />
* http://www.netsoc.tcd.ie/~theorie/interblag/2010/01/30/installing-arch-linux-on-a-mac-pro/<br />
* http://allanmcrae.com/2010/04/installing-arch-on-a-macbook-pro-5-5/<br />
* http://allanmcrae.com/2012/04/installing-arch-on-a-macbook-pro-8-1/<br />
* http://linux-junky.blogspot.com/2011/08/triple-boot-archlinux-windows-7-and-mac.html</div>Xcabalhttps://wiki.archlinux.org/index.php?title=Mac&diff=215500Mac2012-07-30T00:03:32Z<p>Xcabal: i have added information regarding the backlight control that ended up working for me</p>
<hr />
<div>[[Category:Apple]]<br />
[[fr:MacBook]]<br />
[[it:MacBook]]<br />
[[zh-CN:MacBook]]<br />
{{Article summary start}}<br />
{{Article summary text|Details the installation and configuration of Arch Linux on Apple's MacBook and MacBook Pro lines of notebooks.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Official Arch Linux Install Guide}}<br />
{{Article summary wiki|Beginners Guide}}<br />
{{Article summary wiki|General Recommendations}}<br />
{{Article summary end}}<br />
<br />
Installing Arch Linux on a MacBook is quite similar to installing it on any other computer. However, due to the specific hardware configuration on a MacBook, there are a few deviations and special considerations which warrant a separate guide. For more background information, please see the [[Official Arch Linux Install Guide]], [[Beginners Guide]], [[Beginners Guide Appendix]], and [[Post Installation Tips]]. This guide contains installation-instructions that can be used on any Apple computer whose hardware is supported by the Linux kernel. If you have a Macbook5,2 (Polycarbonate, Non-Unibody) and are having additional issues, please see [[Macbook5,2]] for additional help.<br />
<br />
== Overview ==<br />
<br />
Specifically, the procedure for installing Arch Linux on a MacBook is:<br />
<br />
# '''[[#Installation of Mac OS X and Firmware Update | Install Mac OS X]]''': Regardless of the desired end-configuration, it helps to start from a clean install of OS X.<br />
# '''[[#Installation of Mac OS X and Firmware Update | Firmware Update]]''': This should help reduce errors and provide newer features for the hardware.<br />
# '''[[#Partitions | Partition]]''': This step either resizes or deletes the OS X partition and creates partitions for Arch Linux.<br />
# '''[[#Installation | Install Arch Linux]]''': The actual installation procedure.<br />
# '''[[#Post-Install Configuration | Post-Install Configuration]]''': MacBook specific configuration.<br />
<br />
{{ Tip | rEFIt is a popular bootloader for EFI-firmware computers (including Macs). It can be installed at any time during the installation. For instructions, please see [[MacBook#rEFIt|rEFIt]]. }}<br />
<br />
==Installation of Mac OS X and Firmware Update==<br />
<br />
[http://www.apple.com Apple] already has excellent instructions for installing Mac OS X. Follow their instructions. Finally, once OS X is installed, go to:<br />
<br />
Apple Menu --> Software Update<br />
<br />
And update all software. Once this has run, you will need to reboot your computer. Do this, and then run '''Software Update''' again to check to make sure that all updates have been installed.<br />
<br />
{{Note | Sometimes '''Software Update''' may not pick up all the firmware updates available for your computer. However, you can try to search this upgrades directly into the Apple's Support site.}}<br />
<br />
If you are not going to have Mac OS X installed, make backups of these files:<br />
<br />
/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport<br />
<br />
You will need this file later for iSight functionality.<br />
<br />
{{bc|/Library/ColorSync/Profiles/Displays/<FILES HERE>}}<br />
<br />
You will need the file(s) here for adjusting the [[#Color_Profile | color profile]].<br />
<br />
==Partitions==<br />
<br />
The next step in the installation is to re-partition the hard drive. If Mac OS X was installed using the typical procedure, then your drive should have a GPT format and the following partitions:<br />
<br />
* '''EFI''': a 200 MB partition at the beginning of the disk.It is often read as '''msdos''' or '''FAT''' by some partitioning tools and usually labeled ''#1''.<br />
* '''Mac OS X''': the ''(HFS+)'' partition that should take up all of the remaining disk space. Usually labeled ''#2''.<br />
* '''Recovery''': A recovery partition (only for Mac OS X 10.7+).<br />
How to partition depends on how many operating systems you want install. The following options will be explained:<br />
<br />
* [[#Arch Linux Only | Arch Linux Only]] for single boot.<br />
* [[#Mac OS X with Arch Linux | Mac OS X with Arch Linux]] for dual boot.<br />
<br />
If you do not know which option to pick, we recommend the dual boot so you can still return to Mac OS X whenever you want.<br />
<br />
===Arch Linux Only===<br />
<br />
This situation is the easiest to deal with. Mostly, partitioning is the same as any other hardware that Arch Linux can be installed on. The only special consideration is the MacBook firmware boot sound. To ensure that this sound is off: '''mute''' the volume in Mac OS X before continuing further. The MacBook firmware relies on the value in Mac OS X, if available. Note that if you choose to get rid of the OS X partition, there is no easy way to update your machines firmware unless you use an external drive to boot Mac OS X.<br />
You can boot in EFI mode (recommended) or bios-compatibility mode, if in doubt choose EFI.<br />
<br />
====EFI====<br />
*'''This requires GRUB 2 to work'''<br />
* Boot installation medium and switch to a free tty.<br />
* Run '''cgdisk''' (gptfdisk package).<br />
* Create the necessary partitions.<br />
<br />
Simple example (no LVM, crypto):<br />
{{Note | The swap partition is optional, on machines with a RAM of size 4GB or more, good performance can be expected without a swap partition. Also, a '''swap file''' can be created later, see [[Swap#Swap file|Swap file]].}}<br />
{{Note | For more information on partitioning, see [[Beginners'_Guide#Partitioning hard disks: General information|Partitioning hard disks: General information]].}}<br />
partition mountpoint size type label<br />
/dev/sda1 /boot/efi 200MiB vfat EFI<br />
/dev/sda2 /boot 100MiB ext2 boot<br />
/dev/sda3 - adjust swap swap<br />
/dev/sda4 /root 10GiB ext4 root<br />
/dev/sda5 /home remain. ext4 home<br />
<br />
* Done, you can continue to [[MacBook#Installation | installation]]<br />
<br />
====BIOS-compatibility====<br />
* Boot installation medium and switch to a free tty.<br />
* Run '''parted'''. The simplest way is to change the partition table to '''msdos''' and then partition as normal. If you decide to use the GPT format, GRUB will not be able to recognize the partitioning scheme. GRUB2 is compatible with GPT.<br />
<br />
* Create the necessary partitions.<br />
<br />
* Done, you can continue to [[MacBook#Installation | installation]]<br />
<br />
===Mac OS X with Arch Linux===<br />
<br />
The easiest way to partition your hard drive, so that Mac OS X and Arch Linux will co-exist, is to use partitioning tools in Mac OS X and then finish with Arch Linux tools.<br />
<br />
{{Warning | It is highly recommended that this only be attempted after a clean install of Mac OS X. Using these methods on a pre-existing system may have undesired results.}}<br />
<br />
{{Note | If you have any problems, try using [http://gparted.sourceforge.net/ gparted] (i.e. ''instead'' of using Disk Utility and/or cgdisk). It is capable of shrinking the OS X partition and creating Linux partitions ready for installation. }}<br />
<br />
'''Procedure''':<br />
* In Mac OS X, run '''Disk Utility.app''' (located in /Applications/Utilities)<br />
<br />
* Select the drive to be partitioned in the left-hand column (not the partitions!). Click on the '''partition''' tab on the right.<br />
<br />
* Select the volume to be resized in the '''Volume scheme'''.<br />
<br />
* Decide how much space you wish to have for your Mac OS X partition, and how much for Arch Linux. Remember that a typical installation of Mac OS X requires around 15-20 GiB, depending on the number of software applications and files.<br />
<br />
* Finally, type the new (smaller) size for the Mac OS X partition in the size box and click '''Apply'''. This will create a new partition out of the empty space. You will delete this partition later.<br />
<br />
{{Note | if you wish to have a shared partition between Mac OS X and Arch Linux, then additional steps will need to happen here. Please see [[#Shared Partition|Shared Partition]].}}<br />
<br />
* If the above completed successfully, then you can continue. If not, then you may need to fix your partitions from within Mac OS X first.<br />
<br />
* Boot the Arch install CD by holding down the alt key during Boot. Follow one of the procedures below according to your choice of boot-method.<br />
====EFI====<br />
* Run '''cgdisk'''<br />
<br />
* Delete the partition you made in Disk Utility.app and create the necessary partitions for Arch Linux. Mac OS X likes to see a 128MiB gap after partitions, so when you create the first partition after the last Mac OS X-partition, type in '''+128M''' when cgdisk asks for the first sector for the partition. A simple example (no LVM, crypto):<br />
{{Note | The swap partition is optional, on machines with a RAM of size 4GB or more, good performance can be expected without a swap partition. Also, a '''swap file''' can be created later, see [[Swap#Swap file|Swap file]].}}<br />
{{Note | If you want to be able to boot GRUB from the Apple boot loader, you can create a small hfs+ partition (you probably need to format it in Disk Utility.app afterwards). For it to boot GRUB you need to add several files to the partition, see http://mjg59.dreamwidth.org/7468.html.}}<br />
{{Note | For more information on partitioning, see [[Beginners'_Guide#Partitioning hard disks: General information|Partitioning hard disks: General information]].}}<br />
partition mountpoint size type label<br />
/dev/sda1 /boot/efi 200MiB vfat EFI<br />
/dev/sda2 - ? hfs+ Mac OS X<br />
/dev/sda3 - ? hfs+ Recovery<br />
/dev/sda4 - 100MiB hfs+ Boot Arch Linux from the Apple boot loader (optional)<br />
/dev/sda5 /boot 100MiB boot boot<br />
/dev/sda6 - ? swap swap (optional)<br />
/dev/sda7 / 10GiB ext4 root<br />
/dev/sda8 /home remaining ext4 home<br />
<br />
* Done, you can continue to [[MacBook#Installation | installation]]<br />
<br />
====BIOS-compatibility====<br />
* Run '''parted'''<br />
# parted<br />
<br />
* Delete the empty space partition and partition the space as you would for any other installation. Note that MBR is limited to 4 primary partitions (including the efi partition). That leaves 2 primary partitions for arch. One strategy is to have a system and home partition, and use a swap file (I have not tried to use logical partitions). Another is to dedicate one partition to a shared partition (see below).<br />
<br />
* Next, create new filesystems on those partitions which need them, especially the partition which will contain /boot. If you're not sure how to do this using {{ic|mkfs.ext2}} (or whatever), run {{ic|/arch/setup}} and work through until you get to Prepare Hard Drive and use the "Manually configure block devices..." option, then exit the installer. This is necessary so that rEFIt will set the right partition type in the MBR in the next step (without an existing filesystem, it seems to ignore the partition type set by parted), without which grub will refuse to install to the right partition.<br />
<br />
* At this point you should reboot your computer and have rEFIt fix the partition tables on your hard drive. (If you do not do this, you may have to reinstall GRUB later on in order to have your Mac recognize the Linux partition.) When you are into the rEFIt menu, select '''update partition table''', then press Y.<br />
# reboot<br />
<br />
* Done, you can continue to [[MacBook#Installation | installation]]<br />
<br />
===Mac OS X, Windows XP, & Arch Linux Triple boot===<br />
<br />
This may not work for everyone but it has been successfully tested on a Macbook from late 2009.<br />
<br />
The easiest way to partition your hard drive, so that all these operating systems can co-exist, is to use disk utility in Mac OS X, use the formatter on windows XP install CP, and then finish with Arch Linux tools.<br />
<br />
{{Warning | It is highly recommended that this only be attempted after a clean install of Mac OS X. Using these methods on a pre-existing system may have undesired results. At least back your stuff up with timemachine or clonezilla before you begin.}}<br />
<br />
'''Procedure''':<br />
* In Mac OS X, run '''Disk Utility''' (located in /Applications/Utilities)<br />
<br />
* Select the drive to be partitioned in the left-hand column (not the partitions!). Click on the '''partition''' tab on the right.<br />
<br />
* Select the volume to be resized in the '''volume scheme.'''<br />
<br />
* Decide how much space you wish to have for your Mac OS X partition, how much fo XP, and how much for Arch Linux. Remember that a typical installation of Mac OS X requires around 15-20 GiB, and XP about the same, depending on the number of software applications and files. Something like OSX 200Gb, XP 25Gb, Arch 25Gb should be fine.<br />
<br />
* Put your decisions into action by pressing the + button and adding the new partitions, Label them as you like and make sure that your XP partition is the last one on the disk and is formatted for FAT32. It is probably best to have Arch formatted in HFS format as to not confuse you later, it will be reformatted anyway.<br />
<br />
So in linux terms your partitions will be something like:<br />
<br />
:*sda (disk)<br />
:*sda1 (Mac boot partition - you cannot see this one in OSX)<br />
:*sda2 (OSX install in HFS+)<br />
:*sda3 (Arch install temporarly in HFS)<br />
:*sda4 (XP install in FAT32)<br />
<br />
* Finally, click '''apply'''. This will create a new partition out of the empty space.<br />
<br />
{{Note | Using this method you may not be able to have a shared partition between Mac OS X and Arch Linux, this is because the mac will only allow for 4 active partitions. You will however be able to mount a HFS partition in Arch for one workaround. There are other workarounds possible also.}}<br />
<br />
* If the above completed successfully, you can continue. If not, then you may need to fix your partitions from within Mac OS X first.<br />
<br />
* You will not be needing boot camp this way, the program rEFIt is much more flexible (though not as flexible as Grub). Download and install rEFIt [[http://refit.sourceforge.net/]]<br />
<br />
* Go into a terminal in OS X and perform the following, this will enable the rEFIt boot manager. <br />
{{bc|<br />
cd /efi/refit<br />
./enable.sh<br />
}}<br />
<br />
* Reboot to check the rEFIt is working, it should appear on boot. When it comes up go to the rEFIt partition manager and agree to the changes.<br />
<br />
* Put your XP install CD and boot it with rEFIt - You may have to reboot a few times until it is recognized by the boot loader. Install XP and once it is installed use the OSX install CD to get your drivers running nicely in XP.<br />
** Note: when installing XP make sure you select your XP partition and format it again inside the XP installer. If you do not reformat it will not work.<br />
<br />
* Boot the Arch install CD, log in as root and run /arch/setup<br />
<br />
* Follow the install as normal but note that you will have to tell that arch installer to mount sda3 as the root partition and format it as ext3, there will not be a /boot or swap partition so ignore those warnings.<br />
<br />
* At this point, if you are dual booting, you should reboot your computer and have rEFIt fix the partition tables on your hard drive. (If you do not do this, you may have to reinstall GRUB later on in order to have your Mac recognize the Linux partition.) When you are into the rEFIt menu, select '''update partition table''', then press Y.<br />
# reboot<br />
<br />
* Done! Please continue to [[MacBook#Installation | installation]]<br />
<br />
==Booting Directly from GRUB==<br />
It is possible to boot directly from GRUB2 in efi mode without using refit. These instructions are known to work on a Macbook 7,1. It is advisable to host GRUB on either a fat32 or HFS+ partition, but ext2 or ext3 may also work. GRUB's appleloader command does not currently work with the 7,1, but support can be added with the patch available [https://savannah.gnu.org/bugs/index.php?33185 here].<br />
<br />
After the GRUB install is in the desired location, the firmware needs to be instructed to boot from that location. This can be done from either an existing OS X install or an OS X install disk. The following command assumes that the GRUB install is in /efi/grub on an existing OS X partition:<br />
sudo bless --folder /efi/grub --file /efi/grub/grub.efi<br />
===Compilation===<br />
Some models may need EFI_ARCH set to i386.<br />
bzr branch --revision -2 bzr://bzr.savannah.gnu.org/grub/trunk/grub grub<br />
cd grub<br />
./autogen.sh<br />
patch -p1 < appleloader_macbook_7_1.patch<br />
export EFI_ARCH=x86_64<br />
./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix=""<br />
make<br />
cd grub-core<br />
../grub-mkimage -O ${EFI_ARCH}-efi -d . -o grub.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux multiboot<br />
cp grub.efi *.mod *.lst yourinstalllocation<br />
<br />
===Example grub.cfg===<br />
{{out of date|reason=kernel26}}<br />
Note that there may be a better method for loading Windows.<br />
{{bc|1=<br />
set debug=video<br />
insmod efi_gop<br />
<br />
menuentry "Arch Linux EFI" {<br />
set root=(hd0,3)<br />
#search --set -f /boot/vmlinuz26-efi-physical<br />
#loadbios /boot/vbtrace_bios.bin /boot/int10.bin<br />
linux /boot/vmlinuz26-efi-physical root=/dev/sda3 reboot=pci resume=/dev/sda3 resume_offset=151552<br />
initrd /boot/kernel26-efi-physical.img<br />
}<br />
<br />
menuentry "MacOSX" {<br />
set root=(hd0,2)<br />
# Search the root device for Mac OS X's loader.<br />
#search --set -f /usr/standalone/i386/boot.efi<br />
# Load the loader.<br />
chainloader /usr/standalone/i386/boot.efi<br />
}<br />
<br />
menuentry "Windows 7" {<br />
appleloader HD<br />
}<br />
<br />
menuentry "Boot from CD" {<br />
appleloader CD<br />
}<br />
<br />
menuentry "Boot from USB" {<br />
appleloader USB<br />
}<br />
}}<br />
<br />
==Installation==<br />
{{ Note | This section is only required if you want to have Mac OS X installed along with Arch Linux. If not, follow the steps in the official install guide, then skip to [[MacBook#Post-Install Configuration | post install]].}}<br />
<br />
* Boot from the Arch Linux install CD or the latest [[Archboot]] iso (unofficial) depending on your needs.<br />
{{Note | Some MacBook users report strange keyboard output such as long delays and character doubling. To fix this problem, boot with the following options: arch noapic irqpoll acpi&#61;force}}<br />
<br />
* Log in as '''root'''<br />
<br />
{{Note | If you want to do a netinstall rather than installing the possibly outdated packages on the iso and depend on a wireless network that is encrypted, you should change to a free tty and connect manually before proceeding, see [[Beginners_Guide#Setup wireless in the live environment (optional)|Beginners_Guide]]}}<br />
<br />
* Run the Arch installer:<br />
<br />
/arch/setup<br />
<br />
* Proceed through the installation as described in the [[Official Arch Linux Install Guide]] '''except''' in the following areas:<br />
** In the [[Official Arch Linux Install Guide#Prepare Hard Drive | prepare hard drive]] stage, do only the [[Official Arch Linux Install Guide#Manually configure block devices, filesystems and mountpoints | set filesystem mountpoints]] step, taking care to assign the correct partitions. Partitions have already been created if you followed [[Macbook#Partition]]<br />
** '''(for booting with EFI''') After the [[Official Arch Linux Install Guide#Install Bootloader | install boot loader]] stage, exit the installer and install GRUB2, see [[GRUB2#During Arch Linux installation]].<br />
** '''(for booting with BIOS-compatibility)''' In the [[Official Arch Linux Install Guide#Install Bootloader | install boot loader]] stage, edit the menu.lst file and add '''reboot=pci''' to the end of the '''kernel''' lines, for example: {{bc|1=kernel /vmlinuz26 root=/dev/sda5 ro reboot=pci}} This will allow your MacBook to reboot correctly from Arch.<br />
** '''(for booting with BIOS-compatibility)''' Also in the [[Official Arch Linux Install Guide#Install Bootloader | install boot loader]] stage, install GRUB on whatever partition that {{ic|/boot}} is on. {{Warning | Do not install GRUB onto ''/dev/sda'' !!! Doing so is likely to lead to an unstable post-environment.}}<br />
** In the [[Official Arch Linux Install Guide#Configure System | configure system]] stage, edit /etc/mkinitcpio.conf and add the '''usbinput''' hook to the '''HOOKS''' line somewhere after the '''autodetect''' hook. This will load the drivers for your keyboard in case you need to use it before Arch boots (e.g. entering a [[LUKS]] password or using the troubleshooting shell).<br />
<br />
* When the install process is complete, reboot your computer.<br />
# reboot<br />
<br />
* If using optical media, hold down the eject key as your MacBook starts, this should eject the Arch Linux install disk.<br />
<br />
* If dual-booting Mac OS X and Arch Linux, hold down the alt (option) key while the system boots to use the Mac bootloader to select which OS to boot.<br />
<br />
=== Additional steps for Arch Linux only install===<br />
{{ Note | Do this after you tested that your setup is working. This procedure has been tested on a MacBook 4,1 with an msdos partition table. It may not work on newer versions. Please update if it works for you.}}<br />
* In order for Linux to boot up straight away, you will have to tell the firmware that your /boot partition is bootable, or you will always have to hold down the option (alt) key whenever you want to start up your computer.<br />
* In order to do this you will need the original Mac OS X install disk<br />
* Boot into it (you may need to hold the option (alt) key during boot again to access it)<br />
** Open Terminal.app (found under the Utilities menu in the menu bar), and type:<br />
# diskutil list<br />
** Find the device name of your /boot partition (this is your root (/) partition, if you don't have it separate). The format should be /dev/disk0sX, where X is a number from 1 to infinity<br />
** If using EFI type (replace X with the appropriate number):<br />
#bless --folder=/Volumes/efi --file=/Volumes/efi/efi/arch/grubx64.efi --setBoot<br />
# bless --mount=/Volumes/efi --file=/Volumes/efi/efi/arch/grubx64.efi --setBoot<br />
** If using BIOS-compatibility type (replace X with the appropriate number):<br />
# bless --device /dev/disk0sX --setBoot --legacy --verbose<br />
* Remove the installation disk and restart your computer<br />
* After a few seconds of grey screen, your boot loader screen should appear automatically.<br />
<br />
==Post-Install Configuration==<br />
<br />
=== Xorg ===<br />
<br />
Install and configure Xorg by following the [[Xorg]] article.<br />
<br />
==== Video ====<br />
<br />
Different MacBook models have different graphic cards.<br />
<br />
To see which graphics card you have type:<br />
<br />
$ lspci | grep VGA<br />
<br />
* If it returns a string containing '''intel''' you only need the '''xf86-video-intel''' driver. You can install it by typing<br />
<br />
# pacman -S xf86-video-intel<br />
<br />
* if it returns '''nVidia''', read [[NVIDIA]].<br />
<br />
* otherwise if it returns '''ATI''' or '''AMD''', read [[ATI]].<br />
<br />
===== NVIDIA note =====<br />
<br />
{{ Tip | MBP 6.2 - With the proprietary [[NVIDIA]] drivers, support for [https://wiki.archlinux.org/index.php/NVIDIA#Enabling_Pure_Video_HD_.28VDPAU.2FVAAPI.29 Pure Video HD] is available for hardware video decoding. }}<br />
<br />
For MacBooks with NVIDIA graphics, for the backlight to work properly you may need the [https://aur.archlinux.org/packages.php?ID=25467 nvidia-bl] package found in the [[AUR]].<br />
<br />
{{Tip|If backlight control doesn't work after installing nvidia-bl, you should [[Kernel modules#Blacklisting|blacklist]] apple_bl kernel module.}}<br />
<br />
===== Macbook 6.2+ - EFI =====<br />
<br />
As of 4/30/2011, the proprietary nvidia driver is not known to work under X with this model in efi mode. The nouveau driver should work out of the box, but dri should be installed from the [https://aur.archlinux.org/packages/mesa-git/PKGBUILD mesa-git] package.<br />
<br />
===== MacbookPro 5.5, NVIDIA and secondary display =====<br />
<br />
As of January 1 2011, the latest NVIDIA drivers (290.10) might not work properly when a secondary display is used (tested with TwinView), NVIDIA's current [http://www.nvnews.net/vbulletin/showthread.php?t=122606 long-live supported] 275xx drivers seem to work fine. Install [https://aur.archlinux.org/packages.php?ID=52283 nvidia-275xx] and [https://aur.archlinux.org/packages.php?ID=52285 nvidia-utils-275xx ] from [[AUR]], and possibly [https://aur.archlinux.org/packages.php?ID=52284 lib32-nvidia-utils-275xx] if you are on x86_64 system and want 32-bits support.<br />
<br />
MacbookPro 5.5 has an NVIDIA 9400m graphics card. This problem might apply to other devices as well.<br />
<br />
==== Touchpad ====<br />
<br />
The touchpad should have basic functionality by default. A true multitouch driver which behaves very similarly to native OSX can be installed from the AUR: [https://aur.archlinux.org/packages.php?ID=46339 xf86-input-multitouch-git]. It supports 1, 2 and 3 finger gestures, including differentiation between horizontal and vertical 3 finger swipe. Additional details are available at [http://bitmath.org/code/multitouch/ the driver's project page].<br />
<br />
xf86-input-multitouch-git does not support any sort of configuration without editing the driver's source. Some users are also experiencing issues with false clicks from palm touches. There is now a much more configurable fork available as [https://aur.archlinux.org/packages.php?ID=48505 xf86-input-mtrack-git]. Configuration options are documented in the [https://github.com/BlueDragonX/xf86-input-mtrack readme].<br />
<br />
The following mtrack options work well on a Macbook 7,1:<br />
<br />
Option "Thumbsize" "50"<br />
Option "ScrollDistance" "100"<br />
<br />
Probably you need also to add:<br />
<br />
MatchDevicePath "/dev/input/event10"<br />
<br />
'''Special Note About Older Macbook Models (confirmed on MacBook 2,1):''' On older Macbook models (pre-multitouch), the touchpad will not function properly until you install the xf86-input-synaptics package. Please see [[Touchpad Synaptics]] for more information on installing and configuring this package.<br />
<br />
'''Note on Macbook Pro(5,5):''' I found it is much simpler to use the xf86-input-synaptics[http://www.archlinux.org/packages/extra/x86_64/xf86-input-synaptics/] in Extra. Although it does not have much function as 3 finger swipe, this driver provides faster response. Gsynaptics[http://www.archlinux.org/packages/community/i686/gsynaptics/] also provides a simple GUI config. Below is a Xorg config file /etc/X11/xorgconfig.d/60-synaptics.conf for reference only.<br />
Section "InputClass"<br />
Identifier "touchpad catchall"<br />
Driver "synaptics"<br />
MatchIsTouchpad "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Option "SHMConfig" "on"<br />
Option "TapButton1" "1"<br />
Option "TapButton2" "3"<br />
Option "TapButton3" "2"<br />
Option "PalmDetect" "on"<br />
Option "VertEdgeScroll" "off"<br />
Option "HorizEdgeScroll" "off"<br />
Option "CornerCoasting" "off"<br />
Option "EdgeMotionUseAlways" "off"<br />
Option "AreaLeftEdge" "10"<br />
Option "AreaRightEdge" "1270"<br />
EndSection<br />
<br />
==== Keyboard ====<br />
<br />
MacBook keyboard works by default. For swaping fn keys with Fx keys see [[Apple Keyboard]].<br />
<br />
To enable it you can map with right application like '''xbindkeys''' or through DE preferences; but another very good way, that we recommend, is to install [https://aur.archlinux.org/packages.php?ID=14833 pommed] from the [[AUR]].<br />
<br />
Edit the '''/etc/pommed.conf''' according to your hardware on MacBook, building<br />
it from '''/etc/pommed.conf.mac''' or '''/etc/pommed.conf.ppc''' example files.<br />
<br />
Note that you can also run it without a configuration file, the defaults may work for you. Then<br />
<br />
Put '''pommed''' at the end in your '''DAEMONS''' array in your '''/etc/rc.conf'''<br />
<br />
finally reboot your pc.<br />
<br />
{{ Tip | if you are using Gnome or KDE you can easily configure ''3rd level functionality'', ''multimedia key'', etc. in Keyboard Preferences.}}<br />
<br />
{{ Note | see the [[Xorg input hotplugging]] page for other configuration information.}}<br />
<br />
===== NVIDIA note =====<br />
<br />
If the brightness does not function correctly through pommed, make sure you have installed the [https://aur.archlinux.org/packages.php?ID=25467 nvidia-bl] package and insert<br />
<br />
find . -name "*" -exec sed -i 's/mbp_backlight/nvidia_backlight/' '{}' \;<br />
<br />
into the second line of the pommed PKGBUILD build() function and remake the package. From [https://bbs.archlinux.org/viewtopic.php?id=105091 this forum post].<br />
<br />
Another possible solution is to modify the pommed PKGBUILD build():<br />
<br />
find . -name "*" -exec sed -i 's/nvidia_backlight/apple_backlight/' '{}' \;<br />
<br />
If the previous does not work try the following,<br />
<br />
run nvidia-utilities, edit the file '/etc/X11/xorg.conf' and add this line into the Device section:<br />
<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
save and reboot and check backlight buttons work.<br />
More information available at [https://help.ubuntu.com/community/MacBookPro5-5/Precise#LCD ubuntu macbook pro 5,5] <br />
<br />
=== Wifi ===<br />
{{ Tip | MBP 6.2: since kernel 2.6.32.35-1 this works out of the box }}<br />
<br />
Different MacBook models have different wireless cards.<br />
<br />
You can easily check what card do your MacBook have by:<br />
<br />
# lspci | grep Network<br />
<br />
* if you have an Atheros all should works-out-of-the-box.<br />
<br />
* instead if you have a Broadcom follow the [[Broadcom BCM4312]] page.<br />
<br />
* 5.0 and 6.0 generation MacBooks may have a BCM43xx, follow the instructions for the broadcom-wl driver on the [[Broadcom wireless]] page. The interfaces can swap during reboot so its best to define them in a udev rule (instructions on the [[Broadcom wireless]] page).<br />
<br />
* 8.1 generation MacBooks have BCM4331, for which support is not present in either Linux (3.0 and 3.1) or the proprietary drivers by Broadcom. There is however preliminary support for it in Linux 3.2. To run the drivers on earlier kernels, you will need to use [http://wireless.kernel.org/en/users/Download compat-wireless]<br />
<br />
''Note'': if your connection frequently drops, you may have to turn off wifi power management. If you are running [[pm-utils]], you may override wireless power management by creating an executable file /etc/pm/wireless with the lines {{bc|#!/bin/sh<br />
/sbin/iwconfig wlan0 power off}}<br />
<br />
=== Power management ===<br />
<br />
==== Laptop-mode-tools ====<br />
<br />
Because the MacBook is obviously a laptop, you may wish to control its power management features using something like [[Laptop Mode Tools]].<br />
<br />
However, Laptop Mode Tools is known to disable the keyboard in console mode after being idle for a few seconds (does not happen when using X). If this happens to you set <br />
<br />
CONTROL_USB_AUTOSUSPEND=0<br />
<br />
in {{ic|/etc/laptop-mode/conf.d/usb-autosuspend.conf}}. See this [https://bbs.archlinux.org/viewtopic.php?pid=984831 forum thread] for the original workaround.<br />
<br />
==== Suspend to RAM (kernel suspend) ====<br />
<br />
Suspend (the kernel suspend) should work out of the box (I had a problem in which the machine would "suspend immediately after resume" in certain conditions when suspending by closing the lid. This was solved by de-selecting the option "event_when_closed_battery" in gconf-editor &rarr; gnome-power-manager &rarr; actions).<br />
<br />
For a macbook2,1 (bought in 2007) s2ram works using <br />
s2ram -f -a 3 <br />
To make it work with kde4 you have to create a file named "config" into /etc/pm/config.d containing<br />
SLEEP_MODULE="uswsusp"<br />
S2RAM_OPTS="-f -a 3"<br />
<br />
For a MacBook Pro 3,1 (bought in 2008), the following command should work, both in X and in a console:<br />
s2ram -f -a 1<br />
<br />
Note: If you use pm-utils suspending lead (at least for me) disk freeze. Try changing /etc/pm/config.d/module to<br />
SLEEP_MODULE=tuxonice<br />
<br />
For a macbook5.5, s2ram may work using (be sure to run it in X)<br />
s2ram -f -p -m<br />
<br />
==== Suspend to disk (hibernate) ====<br />
<br />
Hibernate should work if you have a swap partition. If you opted for a swap file because of the MBR limitation to 4 primary partitions, you can still get hibernate functionality by following these instructions (this is mostly taken from http://ubuntuforums.org/showthread.php?t=1042946):<br />
<br />
* Create a swapfile (here 2G = bs*count):<br />
sudo dd if=/dev/zero of=/swapfile bs=1024 count=2M<br />
It is recommended, but not necessary, to create the swapfile on a newly created partition, so that fragmentation is minimum.<br />
# chmod 600 swapfile <br />
# mkswap swapfile <br />
mkswap: swapfile: warning: don't erase bootbits sectors<br />
on whole disk. Use -f to force.<br />
Setting up swapspace version 1, size = 2097148 KiB<br />
no label, UUID=6bf46166-4f9e-433a-aac1-91cb3f5cf8ba<br />
# <br />
Note that we will not use this UUID later.<br />
* Add the swapfile in fstab:<br />
/swapfile none swap sw 0 0<br />
* Determine the UUID of partition on which the swapfile is (/sbin/blkid is provided by util-linux-ng)<br />
# blkid -g<br />
# blkid<br />
/dev/sda4: UUID="388014d3-1d18-4ca0-980e-ef2f9fdebde4" TYPE="ext3" <br />
388014d3-1d18-4ca0-980e-ef2f9fdebde4 is the number we are looking for.<br />
* Determine the physical offset of the swapfile:<br />
$ sudo filefrag -v /swapfile | head<br />
Filesystem type is: ef53<br />
Filesystem cylinder groups is approximately 132<br />
File size of /swapfile is 2147483648 (524288 blocks, blocksize 4096)<br />
ext logical physical expected length flags<br />
0 0 24576 12 merged<br />
1 12 24589 24587 1024 merged<br />
2 1036 25615 25612 1024 merged<br />
3 2060 26640 26638 1024 merged<br />
4 3084 27665 27663 1024 merged<br />
5 4108 28690 28688 1024 merged<br />
$ <br />
Here, 24576 is the number we want.<br />
* Edit /boot/grub/menu.lst and add:<br />
resume=/dev/disk/by-uuid/388014d3-1d18-4ca0-980e-ef2f9fdebde4 resume_offset=24576<br />
to your kernel stanza options (or use the kopt method as in the post). Note that the "resume=UUID=" actually did not work for me. I had to use the /dev/disk/by-uuid syntax.<br />
<br />
Note: "ro" has to be at the end of the line, like this:<br />
kernel /boot/vmlinuz-linux root=/dev/sda4 '''resume=/dev/sda4 resume_offset=24576''' ro<br />
* Nothing to do with update-grub nor mkinitcpio.<br />
* Reboot once<br />
* Try to hibernate<br />
<br />
=== Sound ===<br />
{{ Tip | MBP 5.5: since kernel 2.6.32 this works out of the box - just unmute the front speakers and store the sound level }}<br />
<br />
First of all follow [[ALSA]] wiki page, then if something does not work correctly, continue reading this part.<br />
<br />
Edit your '''/etc/modprobe.d/50-sound.conf''' or '''/etc/modprobe.d/modprobe.conf''' appending this line:<br />
<br />
options snd_hda_intel model=intel-mac-auto<br />
<br />
This should automatically specify the codec in your MacBook. Alternatively, for MacBookPro5,X, you can use:<br />
<br />
options snd_hda_intel model=mb5<br />
<br />
(note that the jack output is controlled with "HP").<br />
<br />
If you have an iMac8,1, you should instead use<br />
<br />
options snd-hda-intel model=mbp3 position_fix=2<br />
<br />
{{ Note | you can try to specify other options, agree with in your hardware. All other possible settings are listed in Kernel Documentation, avaible online:<br />
<br />
* [http://www.kernel.org/doc/Documentation/sound/alsa/ALSA-Configuration.txt ALSA-Configuration.txt]<br />
* [http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio.txt HD-Audio.txt]<br />
* [http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt HD-Audio-Models.txt].}}<br />
<br />
Then, reboot.<br />
<br />
=== Bluetooth ===<br />
<br />
{{Note|Bluetooth should work out-of-the box. The hid2hci utility is used by default since bluez 4.91}}<br />
<br />
See the article on [[Bluetooth]] to install and configure all software needed.<br />
<br />
Then if Bluetooth does not work out-of-the-box, you should edit your '''/etc/conf.d/bluetooth''' to enable '''hid2hci''' by uncommenting related line as follows:<br />
<br />
HID2HCI_ENABLE="true"<br />
<br />
Then restart your bluetooth daemon or simply reboot your pc.<br />
<br />
{{ Tip | for advanced bluetooth information see [[Bluetooth]] page.}}<br />
<br />
=== iSight ===<br />
<br />
{{ Tip | MBP 6.2+ (Kernel ~2.6.37+) iSight works out of the box without the need to use firmware from OS X. }}<br />
<br />
{{ Note | linux kernel from 2.6.26 includes the '''Linux UVC driver''' natively. You will not need to download the driver sources manually unless you want to test a newer version or help with development. iSight should work using the instructions below for these kernel versions and up.}}<br />
<br />
iSight webcams require the Apple's proprietary firmware that cannot be redistributed because proprietary. Then we must extract it from MacOS and load it Arch.<br />
<br />
You will need to install [https://aur.archlinux.org/packages.php?ID=23525 isight-firmware-tools] from the [[AUR]] to extract the firmware. The AUR package also includes a udev rule and ELF binary that are necessary, even once you have extracted the firmware file into /lib/firmware/isight.fw, for the file to be loaded every time you boot your computer (namely /etc/udev/rules.d/isight.rules which uses /usr/lib/udev/ift-load).<br />
<br />
Instructions:<br />
<br />
First you need to get the firmware out of a particular file located on your OS X install. It is located in '''/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport'''.<br />
<br />
{{ Tip | The AppleUSBVideoSupport file from a Mac OSX 10.6 (Snow Leopard) installation may not work properly. If possible, use the file from OSX 10.5 or before. }}<br />
<br />
To mount the MacOSX drive if multi-booting:<br />
<br />
# sudo mkdir /media/MacOSX<br />
# sudo mount -t hfsplus /dev/sda2 /media/MacOSX<br />
<br />
Then, install [https://aur.archlinux.org/packages.php?ID=23525 isight-firmware-tools] from the [[AUR]].<br />
<br />
Locate the AppleUSBVideoSupport file in the OSX directory listed above, either copy it over to your arch system (I was able to get this file from an iMac so any OSX installation will do, not one specific to your system) or if multi-booting mount the OSX drive and navigate to the directory. Now in that directory you can go ahead and extract the driver<br />
<br />
# ift-extract --apple-driver AppleUSBVideoSupport<br />
<br />
When it is done, check that the firmware has been found:<br />
<br />
# ls /lib/firmware/isight.fw<br />
<br />
Once that is done, you need to completely SHUTDOWN your Mac and start it back up again (because this clears the hardware state of the camera).<br />
<br />
{{ Tip | to save very much time in the future, you just need to place the '''isight.fw''' file you saved in '''/lib/firmware/''' and then shutdown and reboot as instructed above.}}<br />
<br />
Finally you can load the '''uvcvideo''' module or add it at the end of MODULES() array into your '''/etc/rc.conf''' if you want it to load at boot.<br />
<br />
# modprobe uvcvideo<br />
<br />
Everything should now work. You can use many applications to test the camera:<br />
<br />
* MPlayer<br />
<br />
# mplayer tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0 -fps 30<br />
<br />
* Cheese<br />
* Skype<br />
* Ekiga<br />
<br />
A simple solution to take snapshots is:<br />
<br />
# mplayer tv:// -vf screenshot<br />
<br />
and the pressing the s key to take a snapshot. Files are of the format shot\d\d\d\d.png and are reported in the standard output.<br />
<br />
=== Temperature Sensors ===<br />
<br />
For reading temperature just install and configure '''lm_sensors'''.<br />
See [[Lm sensors]] page.<br />
<br />
=== Color Profile ===<br />
<br />
We can use color profiles from Mac OS.<br />
<br />
First, install [https://aur.archlinux.org/packages.php?ID=10969 xcalib] from the [[AUR]].<br />
<br />
Second copy pre-saved color profiles placed in '''/Library/ColorSync/Profiles/Displays/''' on Mac OS partition to '''~/colorprofiles/''' for example.<br />
<br />
There are color profile files agree with in MacBook models; select the right one:<br />
<br />
* '''Color LCD-4271800.icc''' for MacBook Pro with CoreDuo CPU<br />
* '''Color LCD-4271880.icc''' for MacBook with Core2Duo<br />
* '''Color LCD-4271780.icc''' for MacBook (not Pro) based on CoreDuo or Core2Duo.<br />
<br />
{{ Tip | also Mac OS allows to save current color profile from '''Displays -> Color''' section of the '''Mac OS System Preferences''', in this case file is saved to '''/Users/<username>/Library/ColorSync/Profiles'''.}}<br />
<br />
Finally you can activate it by running<br />
<br />
# xcalib ~/colorprofile.icc<br />
<br />
{{ Warning | previous command set the color profile only for the current session; this mean that you must run it every time you login in your system. For automating it you can execute the command by '''Autostart Application''', concording with your DE (or add the command to your login manager's initialization script, e.g. /etc/gdm/Init/Default).}}<br />
<br />
{{ Note | see '''xcalib''' man pages for further information.}}<br />
<br />
=== Apple Remote ===<br />
<br />
First, to correctly install and configure the '''lirc''' software that control IR see [[Lirc]] wiki.<br />
<br />
Then make LIRC use '''/dev/usb/hiddev0''' (or '''/dev/hiddev0''') by editing '''/etc/conf.d/lircd'''. Here is how mine look:<br />
<br />
#<br />
# Parameters for lirc daemon<br />
#<br />
LIRC_DEVICE="/dev/usb/hiddev0"<br />
LIRC_DRIVER="macmini"<br />
LIRC_EXTRAOPTS=""<br />
LIRC_CONFIGFILE="/etc/lirc/lircd.conf"<br />
<br />
Use '''irrecord''' (available when installing lirc) to create a configuration file matching your remote control signals (alternatively, you can try to use the lircd.conf below):<br />
<br />
sudo irrecord -d /dev/usb/hiddev0 -H macmini output_conf_file<br />
<br />
Start '''lircd''' and use '''irw''' to check if it works.<br />
<br />
Example of an '''/etc/lirc/lircd.conf''':<br />
<br />
begin remote<br />
<br />
name lircd.conf.macbook<br />
bits 8<br />
eps 30<br />
aeps 100<br />
<br />
one 0 0<br />
zero 0 0<br />
pre_data_bits 24<br />
pre_data 0x87EEFD<br />
gap 211994<br />
toggle_bit_mask 0x87EEFD01<br />
<br />
begin codes<br />
Repeat 0x01<br />
Menu 0x03<br />
Play 0x05<br />
Prev 0x09<br />
Next 0x06<br />
Up 0x0A<br />
Down 0x0C<br />
end codes<br />
<br />
end remote<br />
<br />
===HFS Partition Sharing===<br />
<br />
First, we need [https://aur.archlinux.org/packages.php?ID=6709 hfsprogs] package from AUR. <br />
<br />
we have to list our partitions. Use<br />
<br />
fdisk -l /dev/sda<br />
<br />
example output:<br />
<br />
# fdisk -l /dev/sda<br />
Device Boot Start End Blocks Id Type<br />
/dev/sda1 1 26 204819 ee GPT<br />
/dev/sda2 26 13602 109051903+ af Unknown<br />
/dev/sda3 * 13602 14478 7031250 83 Linux<br />
/dev/sda4 14478 14594 932832+ 82 Linux swap / Solaris<br />
<br />
As we see, the "Unknown" partition is our OS X partition, which is located in {{ic|/dev/sda2}}.<br />
<br />
Create a "mac" folder in /media:<br />
<br />
sudo mkdir /media/mac<br />
<br />
Add at the end of ''/etc/fstab'' this line:<br />
<br />
/dev/sda2 /media/mac hfsplus auto,user,rw,exec 0 0<br />
<br />
Mount it :<br />
<br />
mount /media/mac<br />
<br />
and check it:<br />
<br />
ls /media/mac<br />
<br />
===HFS+ Partitions===<br />
<br />
HFS+ partitions, now the default in Mac OS X, are not fully supported by Linux and are mounted as read-only by default. In order to write to an HFS+ partition, it is necessary to disable journaling. This can be accomplished using Mac OS X Disk Utility. Refer to this [http://support.apple.com/kb/ht2355 Apple support page] for more information.<br />
<br />
===Home Sharing===<br />
<br />
'''''UID Synchronization'''''<br />
<br />
====In OS X====<br />
<br />
{{Note | it is strongly recommended that UID/GID manipulation be done immediately after a new user account is created, in OS X as well as in Arch Linux. If you installed OS X from scratch, then this operation is guaranteed to work after logging into your account for the first time.}}<br />
<br />
=====Step 1: Change UID and GID(s)=====<br />
<br />
'''''Pre-Leopard'''''<br />
<br />
# Open '''NetInfo Manager''' located in the ''/Applications/Utilities'' folder.<br />
<br />
# If not done for you already, enable access to user account transactions by clicking on the closed lock at the bottom of the window, and entering your account password, or root password if you have created a root account.<br />
<br />
# Navigate to ''/users/<new user name>'' where <new user name> is the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch.<br />
<br />
# Change the '''UID''' value to 1000 (the value used by default for first user created in Arch).<br />
<br />
# Also change the '''GID''' value to 1000 (the value used by default for user account creation in Arch).<br />
<br />
# Navigate to ''/groups/<new user name>'', automatically saving the changes you have made so far.<br />
<br />
{{Note | if you get an error message that the transaction is not allowed, log out and log back in.}}<br />
<br />
'''''Leopard'''''<br />
<br />
In Leopard, the '''NetInfo Manager''' application is not present. A different set of steps is required for UID synchronization:<br />
<br />
# Open '''System Preferences'''.<br />
<br />
# Click on '''Accounts'''.<br />
<br />
# Unlock the pane if not already done so.<br />
<br />
# Right-click on the desired user and select '''Advanced Options'''.<br />
<br />
# Write down the value of the '''User ID''' field, you will need it later on. Change both the UID and GID to match the UID and GID of the account wished to be shared with in Arch (1000 by default for the first user created in Arch).<br />
<br />
=====Step 2: Change "Home" Permissions=====<br />
<br />
# Open up '''Terminal''' in the ''/Applications/Utilities'' folder.<br />
<br />
# Enter the following command to reclaim the permission settings of your home folder, replacing <your user name>, <your user group> and <your old UID> with the user name whose UID and GID values you just changed, the group name whose GID value you just changed and the old UID number, respectively.<br />
<br />
sudo find /User/<your user name> -user <your old UID> -exec chown <your user name>:<your user group> {} \;<br />
<br />
====In Arch====<br />
<br />
To synchronize your UID in Arch Linux, you are advised to perform this operation ''while creating a new user account''.<br />
It is therefore recommended that you do this as soon as you install Arch Linux.<br />
<br />
Now you must substitute Arch's home with Mac OS's home, by modify entries of the famous ''/etc/fstab'' file.<br />
<br />
=== Avoid long EFI wait before GRUB ===<br />
If your Macbook spends 30 seconds with "white screen" before GRUB shows, try booting from your Mac OS X install DVD, select language, then click Utilities->Terminal, and enter<br />
<br />
# bless --device /dev/disk0s1 --setBoot --legacy<br />
<br />
(given that if your GRUB is on sda1, /dev/disk0s2 if it is on sda2, etc). Via https://bbs.archlinux.org/viewtopic.php?pid=833215 <br />
<br />
=== Mute startup chime ===<br />
If you forgot to mute before installing, you can still mute again if you have a Mac OS X Install disk. Boot from it, select language, then click Utilities->Terminal, and enter<br />
<br />
# /usr/sbin/nvram SystemAudioVolume=%01<br />
<br />
(or whatever volume you want).<br />
<br />
==rEFIt==<br />
<br />
{{Note | this is not a requirement. It only gives you a menu to choose between OS X and Arch Linux upon every boot.}}<br />
<br />
For more see, [http://refit.sourceforge.net/myths/ refit myths].<br />
<br />
In OS X, download the ".dmg" from -> [http://refit.sourceforge.net/ Refit Homepage] and install it.<br />
<br />
{{Note | if you have already partitioned your hard disk in preparation for the Arch installation, rEFIt may not be enabled by default. You will have to run the "enable.sh" script installed in /efi/refit/.}}<br />
<br />
Open up '''Terminal''' and enter:<br />
<br />
cd /efi/refit; ./enable.sh<br />
<br />
===Problems with rEFIt===<br />
<br />
If you experience problems after the install of Arch or rEFIt, especially is the right OS is not showing up to boot to or if it dumps you at a GRUB prompt stuck like the following:<br />
{{bc|<br />
GRUB>_<br />
}}<br />
<br />
Then have a look at this link:<br />
<br />
http://mac.linux.be/content/problems-refit-and-grub-after-installation<br />
<br />
It can give you a basic idea on how to boot off the Arch live cd, mount the problem Arch install, chroot, use gptsync, and reinstall GRUB. This is probably for more advanced users who can translate the commands from a debian system to an Arch system and also apply it to the partitions on their machine. Be careful not to install GRUB in the wrong spot.<br />
<br />
If you need a copy of gptsync you can wget it from here:<br />
http://packages.debian.org/sid/gptsync<br />
or try these, for 64 bit:<br />
{{bc|<br />
wget http://ftp.us.debian.org/debian/pool/main/r/refit/gptsync_0.14-2_amd64.deb<br />
}}<br />
<br />
and for i386:<br />
{{bc|<br />
wget http://ftp.us.debian.org/debian/pool/main/r/refit/gptsync_0.14-2_i386.deb<br />
}}<br />
<br />
since they are .deb packages you will need the program deb2targz<br />
<br />
pacman -S deb2targz<br />
<br />
== Model-specific information ==<br />
=== MacBook Air===<br />
==== 4,x ====<br />
Works out-of-the-box since kernel 3.2. It is recommended to use [[Archboot]], install [[GRUB2]] and use EFI.<br />
<br />
== See also ==<br />
<br />
* http://www.netsoc.tcd.ie/~theorie/interblag/2010/01/30/installing-arch-linux-on-a-mac-pro/<br />
* http://allanmcrae.com/2010/04/installing-arch-on-a-macbook-pro-5-5/<br />
* http://allanmcrae.com/2012/04/installing-arch-on-a-macbook-pro-8-1/<br />
* http://linux-junky.blogspot.com/2011/08/triple-boot-archlinux-windows-7-and-mac.html</div>Xcabal