- Linux в одном файле для Macbook
- Основные преимущества
- Зачем это нужно?
- Инструкция по установке на Mac
- Инструкция для PC
- Инструкция по сборке из исходников
- Подготовка initramfs
- Сборка
- Помогите!!111
- How to Mount EXT4 Linux File Systems on a Mac with OS X Fuse
- Enabling EXT Write Support
- Uninstalling OSXFuse
- Read linux on mac
- Contents
- Overview
- Firmware updates
- Partitions
- Arch Linux only
- Arch Linux with OS X or other operating systems
- Option 1: EFI
- Option 2: BIOS-compatibility
- OS X, Windows XP, and Arch Linux triple boot
- Setup bootloader
- Using the native Apple bootloader with systemd-boot (Recommended)
- Using the native Apple bootloader with GRUB
- Other methods
- Installing GRUB to EFI partition directly
- Using blessing
- Compilation
- Installation
- Post-installation
- Video
- NVIDIA note
- iMac 2020 (with AMDGPU and 5k retina resolution)
- Touchpad
- Keyboard
- Keyboard Backlight
- Power management
- Disabling Thunderbolt
- Suspend and Hibernate
- Wake Up After Suspend
- Light sensor
- Sound
- USB audio interface
- Bluetooth
- Magic Mouse
- Webcam
- iSight
- FaceTime HD Camera
- Temperature Sensors
- Color Profile
- Apple Remote
- HFS partition sharing
- HFS+ Partitions
- Journaling
- Yosemite and later
- Home Sharing
- In OS X
- In Arch
- Avoid long EFI wait before booting
- Mute startup chime
- kworker using high CPU
- rEFIt
- Problems with rEFIt
- Mavericks upgrade breaks Arch boot option
- Model-specific information
- MacBook
- April 2016 12″ — Version 9,1
- Mid 2007 13″ — Version 2,1
- MacBook Pro
- Early 2015 13″/15″ — Version 12,x/11,4+
- 2012 — 2014 models
- MacBook Air
- Early 2014 11″ — Version 6,1
- Mid 2013 13″ — Version 6,2
- Mid 2012 13″ — version 5,2
- Mid 2012 11.5″ — Version 5,1
- Mid 2011 — version 4,x
- Mid 2009 — version 2,1
- Early 2008 — version 1,1
- Mac Mini
Linux в одном файле для Macbook
TL;DR Можно уместить полноценный Linux Live дистрибутив в один файл, если вкомпилировать в ядро initramfs с корневой файловой системой. Компьютеры с UEFI умеют загружать такой файл напрямую, без помощи загрузчика типа GRUB. У меня получилось уместить дистрибутив с программами aircrack-ng, reaver и драйверами для карт Wi-Fi в файл размером 12 мегабайт (наверняка можно еще меньше).
Основные преимущества
Зачем это нужно?
Для всех случаев, когда нужен нативный Linux без виртуальной машины.
Чтобы использовать PCIe-устройства в Linux, когда их нельзя прокинуть в виртуальную машину. Например, встроенную Wi-Fi-карту для инъекции пакетов. Когда лень устанавливать виртуальную машину и качать большой ISO файл с дистрибутивом. Когда не хочется возиться с USB флешками.
Единожды скопированный файл позволит всегда иметь под рукой дистрибутив Linux, который переживет даже переустановку системы.
Инструкция по установке на Mac
Все команды нужно выполнять из macOS.
Конфигурация загрузки не имеет значения, способ не нарушает работу BootCamp, rEFInd и любых других нестандартных конфигураций. Поддерживаются компьютеры Mac не старше 2009 года (работоспособность на более старых не проверялась, но может и заработать).
- Скачать файл OneFileLinux.efi (20 мегабайт)
- Смонтировать EFI-раздел в систему.
Узнать номер раздела EFI можно командой diskutil list.
В моем случае команда будет выглядеть так:
Скопировать OneFileLinux.efi в раздел EFI
Добавить вариант загрузки в NVRAM
Опция nextonly означает, что данный вариант загрузки будет выполнен один раз. Следующая перезагрузка восстановит прежние настройки. Поэтому, чтобы вернуться из Linux в macOS, достаточно перезагрузиться еще раз.
В последних версиях macOS, начиная с El Capitan, используется технология System Integrity Protection (SIP), так называемый «без root-вый режим». Эта технология запрещает модификацию системных файлов и переменных даже суперпользователю. SIP включен по умолчанию, поэтому последняя команда bless вернет ошибку. Ее можно выполнить из Recovery Mode. Для это нужно зажать cmd+R при включении компьютера и открыть консоль
Utilities —> Terminal. В консоли выполнить шаги 2 и 4. Команды в Recover консоле нужно вводить без sudo.
Теперь каждый раз, когда вам потребуется загрузить OneFileLinux.efi, достаточно выполнить шаги 2 и 4 в консоли Recovery, или из основной системы, если SIP выключен.
Наверное, можно выполнить bless без монтирования раздела, но я не нашел, как это сделать. Тогда было бы достаточно одной команды.
Инструкция для PC
Вариантов загрузки на PC множество. Если ваша материнская плата имеет встроенный UEFI Shell, достаточно в нем указать путь к файлу OneFileLinux.efi, чтобы единожды загрузиться в Linux. Я опишу процесс настройки на моем Thinkpad X220.
- Скачать OneFileLinux.efi и положить его на EFI-раздел
- Добавить опцию загрузки в NVRAM
Во время загрузки нажать F12 и выбрать нужный вариант
Инструкция по сборке из исходников
Исходники проекта github.com/zhovner/OneFileLinux
Дистрибутив собран на чистом ядре 4.16-rc1 с kernel.org и Alpine Linux Mini Root filesystem.
Его можно легко собрать самостоятельно.
Подготовка initramfs
Initramfs — это образ диска, который монтируется в памяти при загрузке ядра. В обычных дистрибутивах в него помещаются драйвера, требующиеся на раннем этапе загрузки. В него можно поместить полноценную корневую файловую систему.
Я использовал корневую файловую систему от Alpine Linux. Это минималистичный дистрибутив для встраиваемых систем и контейнеров. У него существует вариант поставки без ядра и предустановленных программ, только корневая файловая система на базе busybox и пакетный менеджер apk.
chroot-имся в alpine linux:
Находясь внутри окружения, можно внести нужные изменения. Добавить пакеты через «apk add», модифицировать сервисы используя openrc.
Вся необходимая информацию есть в wiki.
Сборка
Запустить скрипт сборки. Он соберет модули ядра, поместит их в initramfs, и соберет ядро.
Помогите!!111
На данный момент дистрибутив достаточно кривой. Если вы умеете линуксы, я буду очень признателен за любую помощь. Будет круто, если получится допилить этот проект до приемлемого уровня.
Источник
How to Mount EXT4 Linux File Systems on a Mac with OS X Fuse
The EXT file system (short for Extended File System) and it’s family members of EXT2, EXT3, and EXT4, are the file systems used by Linux and Raspberry Pi. Mac users who work with multiple platforms may notice that OS X is unable to mount EXT partitions on its own, and thus anyone wishing to mount and read EXT drives and other file systems will need to rely on a third party utility.
OSXFuse is one such tool, a free open source offering that allows OS X to read EXT volumes, and if you’re comfortable with some uncertainty and risk to the Linux partition, you can even enable an experimental EXT write function too.
- Get OSXFuse from the developer (free) and run the package installer
- Choose to install the “MacFUSE Compatibility Layer”, this is optional but necessary for FUSE-EXT2
At this point you can connect EXT file system drives and/or partitions from the Linux world to the Mac and be able to read data from them as expected. That means you can access files and copy files from the EXT volume over to the Mac, but not vice versa (more on using EXT write support in a moment).
When EXT drives are mounted with FUSE, the volumes are interpreted as network drives or servers, so if you are hiding desktop icons or connected servers from Finder preferences you won’t see it except in a Finder window sidebar.
Longtime OS X users may recognize OSXFuse as the successor to the now defunct MacFUSE, which, once upon a time, was necessary to gain Windows NTFS support on the Mac as well. Of course, now you can just enable NTFS write support on Macs directly without the need for any third party tools, but not too long ago that wasn’t the case.
Enabling EXT Write Support
While OSXFuse adds EXT read support, write support to EXT is disabled by default and probably not recommended to use at all, it’s considered experimental and unsupported by FUSE for a reason.
Nonetheless, if you absolutely have to write to a Linux partition from OS X and you have a backup of the data and/or drive in question, and you don’t mind potentially toasting the data on the drive, you can enable writing to EXT with the following steps:
- Get FUSE-EXT2 and install it onto of MacFUSE
Reboot the Mac, then use following command string to enable write support:
sudo sed -e ‘s/OPTIONS=»auto_xattr,defer_permissions»/OPTIONS=»auto_xattr,defer_permissions,rw+»/’ -i .orig /System/Library/Filesystems/fuse-ext2.fs/fuse-ext2.util
Again, enabling EXT write support is not recommended. This can’t be overstated enough. Be sure to understand there are considerable risks to the drive and it’s quite possible to damage the Linux partition or drives file system by doing so. Do not do this without a backup.
By the way, an alternative for those who wish to safely read and write files between OS X and Linux (and Windows for that matter) by using an external drive are probably better off formatting a drive for maximum compatibility with the MS-DOS file system, which can be accessed by just about every operating system out there. This is particularly helpful for USB thumb drives and external disks that you want to use for quick file storage and sharing outside of a network. Otherwise, networked computers can just use the SMB protocol and share files between Mac OS X, Linux, and Windows over a local network connection. No, it’s not the same as mounting an existing EXT file system, but it works if the only intention is to be able to read and write data between different OS’s.
Uninstalling OSXFuse
The easiest way to uninstall OSXFuse is by using the packages control panel:
- Head to System Preferences by way of Apple menu and choose “Fuse for OS X”
- Click the “Remove OSXFuse” button and enter the admin password to uninstall FUSE from the Mac
Removing OSXFuse obviously removes the ability to mount all EXT linux file systems from the Mac. You will want to uninstall the FUSE packages from OS X if you intend on using one of the other third party EXT mounting solutions out there, whether from Paragon or elsewhere.
Источник
Read linux on mac
Installing Arch Linux on a MacBook (12″/Air/Pro) or an iMac is quite similar to installing it on any other computer. However, due to the specific hardware configuration of a Mac, there are a few deviations and special considerations which warrant a separate guide. For more background information, please see the Installation guide and UEFI. This guide contains installation-instructions that can be used on any Apple computer whose hardware is supported by the Linux kernel. Please see ‘related’ pages (on the top right of this page) for model-specific tips and troubleshooting.
Contents
Overview
Specifically, the procedure for installing Arch Linux on a MacBook is:
- Firmware updates: It always helps to start from a clean, backed up, and up-to-date install of OS X.
- Partition: Resizing or deleting the OS X partition to create partitions for Arch Linux.
- Setup bootloader: Making sure that the new partition is bootable.
- Install Arch Linux: Actually installing Arch Linux.
- Post-installation: MacBook-specific configuration.
Firmware updates
Before proceeding with the installation of Arch Linux, it is important to ensure that the latest firmware updates for your MacBook are installed. This procedure requires OS X. In OS X, open the App Store and check for updates. If your mac finds and installs any updates, make sure to reboot your computer, and then check again for updates to make sure that you installed everything.
It is advisable to keep OS X installed, because MacBook firmware updates can only be installed using OS X. However, if you plan to remove OS X completely, make backups of these files, which you will need in Linux for adjusting the color profile:
Partitions
Partitioning of the storage drive is no different from any other PC or laptop. However, if you plan on keeping OS X for dual booting, you should consider that, by default, a MacBook’s drive is formatted using GPT and contains at least 3 partitions:
200 MB EFI system partition.
How to partition depends on how many operating systems you want install. The following options will be explained:
Arch Linux only
This situation is the easiest to deal with. Partitioning is the same as any other hardware that Arch Linux can be installed on. Please refer to the standard Installation guide for details.
If you want to configure your system in order to have full-disk encryption, please look at the Dm-crypt/Encrypting an entire system page for details.
An example for a very basic partitioning, that does not consider a separate /home partition nor encryption or LVM, is the following:
Arch Linux with OS X or other operating systems
You need to partition your hard drive while keeping the partitions used for OS X/Windows. If you wish to keep OS X, the easiest way is to use partitioning tools in OS X and then finish with Arch Linux tools.
- In OS X, run Disk Utility.app (located in /Applications/Utilities )
- Select the drive to be partitioned in the left-hand column (not the partitions!). Click on the Partition button.
- Add a new partition by pressing the + button and choose how much space you want to leave for OS X, and how much for the new partition. Keep in mind the new partition will be formatted in Arch Linux, so you can choose any partition type you want.
- If the above completed successfully, then you can continue. If not, then you may need to fix your partitions from within OS X first.
- Boot the Arch installation media or LiveUSB by holding down the Alt during boot. Proceed with #Installation.
It is possible to resize the newly created partition from within the Arch installation media, or delete it in order to proceed with the creation of other partitions (eg. swap).
Option 1: EFI
- Run cgdisk
- Delete the partition you made in Disk Utility.app and create the necessary partitions for Arch Linux. OS X likes to see a 128 MiB gap after partitions, so when you create the first partition after the last OS X-partition, type in +128M when cgdisk asks for the first sector for the partition. More information about Apple’s partitioning policy can be read here. A simple example (no LVM, crypto):
Option 2: BIOS-compatibility
- Run parted as root.
- 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).
- Next, create new filesystems on those partitions which need them, especially the partition which will contain /boot . If you are not sure how to do this using mkfs.ext2 (or whatever), run /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.
- 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 . Reboot.
- Done, you can continue with #Installation.
OS X, Windows XP, and Arch Linux triple boot
This may not work for everyone but it has been successfully tested on a MacBook from late 2009.
The easiest way to partition your hard drive, so that all these operating systems can co-exist, is to use disk utility in OS X, use the formatter on windows XP, install XP and then finish with Arch Linux tools.
- In OS X, run Disk Utility (located in /Applications/Utilities ).
- Select the drive to be partitioned in the left-hand column (not the partitions!). Click on the partition tab on the right.
- Select the volume to be resized in the volume scheme.
- Decide how much space you wish to have for your OS X partition, how much for XP, and how much for Arch Linux. Remember that a typical installation of OS X requires around 15-20 GiB, and XP about the same, depending on the number of software applications and files. Something like OS X 200Gb, XP 25Gb, Arch 25Gb should be fine.
- 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.
So in linux terms your partitions will be something like:
- sda (disk)
- sda1 (Mac boot partition — you cannot see this one in OS X)
- sda2 (OS X install in HFS+)
- sda3 (Arch install temporarly in HFS)
- sda4 (XP install in FAT32)
- Finally, click apply. This will create a new partition out of the empty space.
- If the above completed successfully, you can continue. If not, then you may need to fix your partitions from within OS X first.
- 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 [1]
- Go into a terminal in OS X and perform the following, this will enable the rEFIt boot manager.
- 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.
- 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 OS X installation CD to get your drivers running nicely in XP.
- 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.
- Boot the Arch install CD, log in as root and run # /arch/setup .
- 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.
- 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.
- Done! You can continue to #Installation.
Setup bootloader
Using the native Apple bootloader with systemd-boot (Recommended)
Apple’s native EFI bootloader reads .efi files located inside the EFI system partition at /EFI/BOOT/BOOTX64.EFI . Luckily, this is also the default install location for the systemd-boot binary. This means that booting linux using systemd-boot is very simple.
- First, make sure you mounted the EFI System Partition at /boot
- Proceed with #Installation normally
- Once inside the chrooted enviroment, type the following command to install systemd-boot:
The above command will copy the systemd-boot binary to /boot/EFI/BOOT/BOOTX64.EFI and add systemd-boot itself as the default EFI application (default boot entry) loaded by the EFI Boot Manager.
- Proceed to systemd-boot#Configuration in order to correctly set up the bootloader
At the next reboot, the Apple Boot Manager, shown when holding down the option key when booting the MacBook, should display Arch Linux (it will be displayed as EFI Boot as a possible boot option.
Using the native Apple bootloader with GRUB
This article or section needs language, wiki syntax or style improvements. See Help:Style for reference.
Despite using UEFI, the MacBook’s native EFI bootloader does not use the EFI partition for booting. Instead, it looks for .efi files inside all the partitions in internal and external drives and shows them as possible boot options if certain conditions are satisfied. For example, MacBooks can detect an existing OSX installation after checking that:
- there is a partition formatted as HFS+
- the partition contains the partition id af00
- in the root of that partition, there is a file called mach_kernel
- inside that partition, there a boot.efi file inside /System/Library/CoreServices
This means that configuring an Arch installation to be automatically recognized by the MacBook bootloader is possible. Moreover, it simply requires a properly-formatted HFS+ /boot partition and does not require meddling with the EFI system partition. The advantage of this method is that it can coexist with OS X nicely and allows to avoid other bootloaders such as rEFInd. However, this requires manual configuration. The following steps will illustrate how to perform this configuration using GRUB.
- First, while configuring a new Arch installation, create a separate /boot partition. Many tools are available in the Arch ISO, for example cgdisk.
- Make sure the partition is at least
250 MB in size, since it will be used to store the kernel as well as any custom kernel you will install in the future. Moreover, make sure the partition type is set as Apple HFS/HFS+ (it will appear as Apple HFS/HFS+ in fdisk/cgdisk or af00 in gdisk)
Note: replace /dev/sdX with the correct device as appropriate
Once inside the chrooted enviroment, don’t forget to install the hfsprogs AUR package on the newly installed system as well. After the installation of the package, regenerate the initramfs while chrooted
- Once inside the chrooted enviroment, install the grub and efibootmgr packages.
- Also, create a dummy mach_kernel file
- The following steps install the GRUB UEFI application to /boot/EFI/arch/System/Library/CoreServices/boot.efi and install its modules to /boot/grub/x86_64-efi .
After that, remember to create a standard configuration file:
As you can see, the directory structure of the boot.efi is not correct, as the /System/Library/CoreServices directory is not supposed to be a subdirectory of the /boot/EFI/ folder. For this reason, we need to relocate the boot.efi stub in a location the MacBook bootloader is able to recognize:
After that, you need to create the following file
At the next reboot, the Apple Boot Manager, shown when holding down the option key when booting the MacBook, should display Arch Linux as a possible boot option. Selecting that option will boot GRUB.
Done! GRUB can now be selected on the standard MacBook bootloader and you can boot into your newly installed Arch Linux.
Obviously, you can replace the Arch logo with any other icon you like.
Other methods
This article or section is out of date.
If you are going for an Arch Linux-only setup, installing the bootloader is no different than on any other machine: Install systemd-boot, rEFInd or other bootloader of your choice.
If, on the other hand, you are dual/triple booting, then read on.
Installing GRUB to EFI partition directly
- If you would like to use GRUB as your main bootloader and use the «boot while holding the Alt/Option key» method to go back to OS X rather than using alternatives such as rEFIt (http://refit.sourceforge.net/, mentioned previously in #Option 2: BIOS-compatibility and #OS X, Windows XP, and Arch Linux triple boot) then you must install grub to your Mac’s already-existing EFI partition (see below).
- Install grub
- Make a directory named efi in /boot
- Mount the already-existing EFI partition on your Mac to this /boot/efi directory
- Install GRUB to this directory
- Make a directory named locale in /boot/grub
- Copy grub.mo from /usr/share/locale/en\@quot/LC_MESSAGES/ to /boot/grub/locale
- Generate a configuration for GRUB
- Done! GRUB will now start on reboot and you can boot into your newly installed Arch Linux.
- Remember to hold ALT/Option key while starting your computer if you want to boot back into OS X.
Finish the standard Arch install procedures, making sure that you install grub and partition your boot hard disk as GPT.
The UEFI system partition will need to be mounted at /boot/efi/ for the GRUB install script to detect it:
Where X is your boot hard disk and Y is the efi partition you created earlier.
Install GRUB UEFI application to and its modules to /boot/grub/x86_64-efi using:
Generate a configuration for GRUB
Using blessing
It is possible to boot directly from GRUB in EFI mode without using rEFIt through what is known as «blessing» after placing GRUB on a separate partition. These instructions are known to work on a MacBook7,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 here.
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:
Compilation
Some models may need EFI_ARCH set to i386.
Installation
- Boot from the Arch Linux install CD, or from a manually created bootable USB drive.
- Proceed through the installation as described in the Installation guideexcept in the following areas:
- Skip the partition the disks stage, do only the partition formatting and mounting steps, taking care to assign the correct partitions. Partitions have already been created if you followed #Partitions
- When at the install bootloader stage, follow #Setup bootloader
- (for booting with BIOS-compatibility) Edit the menu.lst file of Grub and add reboot=pci to the end of the kernel lines, for example: This will allow your MacBook to reboot correctly from Arch.
- In the configure system stage, edit /etc/mkinitcpio.conf and ensure the keyboard hook is in 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).
- When the install process is complete, reboot your computer.
- If using optical media, hold down the eject key as your MacBook starts, this should eject the Arch Linux install disk.
- If dual-booting 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.
Post-installation
This article or section needs language, wiki syntax or style improvements. See Help:Style for reference.
See General recommendations for system management directions and post-installation tutorials like setting up a graphical user interface, sound or a touchpad.
Video
Different MacBook models have different graphic cards. To see which graphics card you have type:
- If it returns a string containing Intel , read Intel graphics.
- If it returns NVIDIA , read NVIDIA.
- If it returns two lines, with both NVIDIA and Intel , your mac has dual graphics. See MacBookPro10,x#Graphics for an example of one such setup that might apply in other cases.
- Otherwise if it returns ATI or AMD , read ATI.
NVIDIA note
For MacBooks with NVIDIA graphics, for the backlight to work properly you may need the nvidia-bl-dkms AUR package.
iMac 2020 (with AMDGPU and 5k retina resolution)
It seems amdgpu driver has problems to set the native 5k resolution. If the display gets corrupted during boot when amdgpu driver module is loaded, try forcing a lower resolution. Add e.g. «video=2560×1440@60» to your bootloader’s Kernel parameters.
Touchpad
The touchpad should have basic functionality by default. A true multitouch driver which behaves very similarly to native OS X is included in the xf86-input-mtrack-git AUR package. Configuration options are documented in the readme.
The following mtrack options work well on a MacBook7,1:
Probably, you also need to add:
To disable tap-to-click (that is, to press down to click) by default, add the following to your mtrack configuration section
Natural scrolling: To configure natural two finger scrolling similar to OS X, refer to Touchpad Synaptics#Natural scrolling.
If you are using xf86-input-mtrack-git AUR , you can simply swap the scroll up and scroll down buttons (along with the scroll left and scroll right):
Special Note About Older Macbook Models (confirmed on MacBook2,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.
Note on MacBookPro5,5: I found it is much simpler to use the xf86-input-synaptics in Extra. Although it does not have much function as 3 finger swipe, this driver provides faster response. gpointing-device-settings AUR also provides a simple GUI config. Below is a Xorg config file /etc/X11/xorg.conf.d/60-synaptics.conf for reference only.
For some users, the two-finger right-click may not work correctly and trackpad may also become less responsive after these settings. For me, removing the ‘AreaLeftEdge’ and ‘AreaRightEdge’, solved that problem. OS X like MultiTouch Gestures currently broken due to newer synaptic drivers! For users looking to add more of OS X’s multitouch gestures to Arch, xSwipe is a highly customisable, light weight perl script, which does just that. Once installed and configured (see xSwipe wiki on Github) I would recommend adding xSwipe as a start up item.
Keyboard
MacBook keyboards work by default. For swaping fn keys with Fx keys see Apple Keyboard.
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 the pommed-light AUR package.
Edit the /etc/pommed.conf according to your hardware on MacBook, building it from /etc/pommed.conf.mac or /etc/pommed.conf.ppc example files.
Note that you can also run it without a configuration file, the defaults may work for you. Then enable and start pommed.service .
Keyboard Backlight
The keyboard backlight is controlled by /sys/class/leds/smc::kbd_backlight . Write the desired value to brightness in that directory.
Both acpilight or kbdlight AUR (stalled since 2015) allow to control keyboard backlight though scripts. With the appropriate udev rules or sxhkd they allow light-level changes without being root.
As of 2017-11-12, acpilight provides a «just-works» solution tested on a MacbookPro 8,1.
Alternatively you might want to check out the Keyboard backlight wiki page.
Ensuring the keyboard backlight is on when entering the LUKS decryption password
This can be done via initcpio hooks. First, create an executable install script in /etc/initcpio/install/mac_kb_backlight with the follwing:
Next, create an executable hook in /etc/initcpio/hooks/mac_kb_backlight with:
Finally, add this custom hook to the HOOKS array in /etc/mkinitcpio.conf , and ensure it’s placed before the encrypt hook:
Remember to regenerate the initramfs images after these steps to include the custom script.
NVIDIA note
If the brightness does not function correctly through pommed, make sure you have installed the nvidia-bl-dkms AUR package and insert
into the second line of the pommed PKGBUILD build() function and remake the package. From this forum post.
Another possible solution is to modify the pommed PKGBUILD build():
If the previous does not work try the following,
run nvidia-settings, edit the file ‘/etc/X11/xorg.conf’ and add this line into the Device section:
Save and reboot and check backlight buttons work. More information available at Ubuntu MacBookPro5,5
Different MacBook models have different wireless cards.
You can easily check what card do your MacBook have by:
- If you have an Atheros card, all should work out-of-the-box.
- If you have a Broadcom card, follow the Broadcom wireless page.
- 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).
- If you have the correct broadcom DKMS driver (i.e. broadcom-wl-dkms) installed and your wifi card is still not being recognised, try rebuilding the driver (See Dynamic Kernel Module Support).
Power management
Powerdown is a very simple to set up set of scripts what will maximize your battery duration. A MacBook Air 2013 with powerdown provides about 11 hours of light usage with just powerdown installed. All the usual power management recomendations apply as well.
Disabling Thunderbolt
Linux still has poor power management for Thunderbolt adapters on Macs. This can cause the TB adapter(s) to be always-on and prevent the CPU from going into the deepest power-saving states [2], drawing ca. 2W additional power even when not in use [3]. An easy way to see the CPU states is using powertop. The problem arises when the CPU does not go below C3 as a package (Pkg%pc3).
One workaround is to add
to the kernel parameters in your bootloader, thereby telling the firmware that the system is not compatible with macOS [4]. This should disable the TB adapter (at least on older Macs), and thus reduce power consumption greatly, but will probably come with side-effects (e.g. no Thunderbolt, maybe others?).
It is also possible to blacklist the thunderbolt module and then putting the controllers to sleep with
Check the correct device number with lspci. This can also be automated. This method reduces power consumption slightly, but still consumes 0.9 W more than the previous method on a Macbook Air 2013.
Suspend and Hibernate
Suspending (suspend to ram) and hibernating (suspend to disk) work fine out of the box:
Issues were reported where the machine would «suspend immediately after resume» in certain conditions when suspending by closing the lid. This was solved by setting the option «sleep-inactive-ac-type» to «nothing» using dconf-editor, option path: org → gnome → settings-daemon → plugins → power).
See Suspend and hibernate for details on how to configure hibernation. Noticably, you will need a swap partition or file (see the mentioned article for further instructions).
If after suspend laptop is woken up after few seconds, may help to disable all stuff in /proc/acpi/wakeup, exclude LID0:
And for permanent disabling:
If this does not work, check that ARPT is disabled, and add a corresponding rule to udev, like this:
If this still does not work, try disabling LID0. This way suspending via lid-closing should be made impossible, so you might want to follow the instructions in this forum post to make suspending via both lid-closing and systemd possible, by using systemd services.
Wake Up After Suspend
Occasionally the Macboook Air may wake up immediately after suspend.
In /proc/acpi/wakeup check to see that XHC1 and LID0 are enabled. If they are, disabling them will fix the problem. After disabling them, the only way to wake up your computer from suspend is by using the power button.
To do this type to following command, edit /etc/systemd/system/suspend-fix.service .
Then add the following text and save:
And then run the following:
Disabling only XHC1 is not recommended if you have this bug, since it may result in glitchy behavior.
Light sensor
The values can be read from:
A «cat» on this path returns two-tuples like (4,0). The below referenced lighter script ignores the second value — which always seems to be 0 — and uses the first number as measured environment lighting brightness value.
If you want to use the built in light sensor to automatically adjust screen and keyboard backlight brightness check out Lighter [5] (simple perl script, easy to fine-tune) and Lightum [6] (Requires Gnome or KDE but is older and more complete than Lighter).
Sound
First of all follow ALSA wiki page, then if something does not work correctly, continue reading this part.
Edit your /etc/modprobe.d/50-sound.conf or /etc/modprobe.d/modprobe.conf appending this line:
This should automatically specify the codec in your MacBook. If you have a MacBookPro12,1, you might need
instead. Alternatively, for MacBookPro5,X, you can use:
(note that the jack output is controlled with «HP»).
If you have an iMac8,1, you should instead use
For 2009 Macs, see below for getting the microphone to work.
You can try to specify other options, that depend on your hardware. All other possible settings are listed in Kernel Documentation, avaible online:
USB audio interface
In some cases, it can actually be easier to set up sound using a USB audio interface rather than the jack directly.
For example, after plugging in a Focusrite Scarlett Solo, open pavucontrol , go to Configuration , choose Off for all devices and choose Analog Stereo Duplex for Scarlett Solo USB . You can then use the headphone jack on the Focusrite device for speakers or headphones. This should work immediately and on startup. This does not require any Focusrite software to be installed.
Bluetooth
Bluetooth should work out-of-the box. See the article on Bluetooth to install and configure all software needed.
Magic Mouse
If you use a magic mouse you will find it works nicely out of the box. You might want to tweak some settings such as scroll-speed or acceleration. There is no GUI for this at this time. The only way to set these settings is to instruct the kernel driver ( hid_magicmouse ) with parameters. Create a modprobe config file for your mouse.
This will instruct the driver to have a fast scroll-speed, do exponential acceleration and do not emulate a 3 button mouse. You can find an overview of all parameters and their current settings in /sys/module/hid_magicmouse/parameters .
To play with the settings without rebooting you can also set them through the command line, like so:
Webcam
iSight
2.6.37+) iSight works out of the box without the need to use firmware from OS X. Only use isight-firmware-tools if it does not work normally.
iSight webcams on MacBooks or pre 6,2 MacBook Pros (6,2 came out around 2010) require the Apple’s proprietary firmware that cannot be redistributed. It must be extracted from OS X and loaded onto Arch.
If you want to do it yourself you will need to install isight-firmware-tools AUR to extract the firmware. This 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 ).
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 .
To mount the OS X drive if multi-booting:
Locate the AppleUSBVideoSupport file in the OS X directory listed above. Either copy it over to your Arch system (Any OS X installation should do, such as an iMac, not just one specific to your system) or, if multi-booting, mount the OS X drive and navigate to the directory. (On 10.6 (Snow Leopard) and 10.7 (Lion) the directory is /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS .) In that directory you can go ahead and extract the driver:
When it’s done, check that the firmware has been found:
Once successful, completely SHUTDOWN your Mac and start it back up again (to clear the hardware state of the webcam). Do not reboot.
It should be automatically loaded at boot; if it is not you can load the uvcvideo module manually or load it at boot.
FaceTime HD Camera
Recent Macbooks include the FaceTime HD Camera, which may be connected by PCIe. You can confirm this by looking for «FaceTime HD Camera» in the output of lspci . The bcwc-pcie-git AUR package installs a facetimehd module (and firmware) to support these devices. The module should be loaded automatically after installation.
If the webcam shows incorrect colors, this may be due to missing sensor calibration files. Instructions for extracting the calibration files from Apple BootCamp drivers are given in this page: https://github.com/patjak/bcwc_pcie/wiki/Extracting-the-sensor-calibration-files
You can use many applications to test the webcam:
A simple solution to take snapshots is:
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.
Temperature Sensors
For reading temperature just install lm_sensors . See the lm_sensors page for more information.
Color Profile
We can use color profiles from OS X.
First, install the xcalib package.
Second copy pre-saved color profiles placed in /Library/ColorSync/Profiles/Displays/ on OS X partition to
/colorprofiles/ for example.
There are color profile files agree with in MacBook models; select the right one:
- Color LCD-4271800.icc for MacBook Pro with CoreDuo CPU
- Color LCD-4271880.icc for MacBook with Core2Duo
- Color LCD-4271780.icc for MacBook (non-Pro) based on CoreDuo or Core2Duo.
Finally you can activate it by running
Apple Remote
First, to correctly install and configure the lirc software that control IR see LIRC wiki.
Then make LIRC use /dev/usb/hiddev0 (or /dev/hiddev0 ) by editing /etc/conf.d/lircd . Here is how mine look:
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):
Start lircd and use irw to check if it works.
Example of an /etc/lirc/lircd.conf :
HFS partition sharing
First, install the hfsprogs AUR package.
we have to list our partitions. Use
As we see, the «Unknown» partition is our OS X partition, which is located in /dev/sda2 .
Create a «mac» folder in /media:
Add at the end of /etc/fstab this line:
HFS+ Partitions
Journaling
HFS+ partitions, now the default in OS X, are not fully supported by Linux and are mounted as read-only by default. In order to write to an HFS+ partition, the safe way is to disable journaling. This can be accomplished using the OS X Disk Utility. Refer to this Apple support page for more information or try to do it from the command line:
Find your partition:
In this example we will use disk0s3 partition named as Macintosh HD. To know if journaling is activate or not you could execute:
As you can read the journaling is active. To turn off the journaling you could execute:
To verify it is done execute the info command again.
If you get noting as output, then journaling is disabled.
However, if you fail to disable journaling. You can change «auto,user,rw,exec» in /etc/fstab to «auto,user,force,rw,exec» and mount it.
Yosemite and later
This section addresses error message when mounting hfsplus partition:
Since Yosemite, HFS+ partitions are now wrapped a CoreStorage volume. Verify that you have an CoreStorage volume.
HFS+ uses two volume headers, one 1024 bytes into the device and one 1024 from the end of the device. With the HFS+ partition wrapped in the CoreStorage volume the end of the partition is not actually 1024 bytes from the end of the /dev/sdX2 partition. To fix this you need to specify sizelimit=X when mounting.
To determine sizelimit do the following:
- Run testdisk /dev/sdX and select your drive
- Select EFI GPT
- Select Analyse and then Quick Search
What you see now is the output of the HFS partition itself without the CoreStorage volume. Take the size in sectors (622738176 in this example) and multiply by the number of bytes in your logical sector size (512 in this example).
622738176 * 512 = 318841946112
Finally, mount your disk with the sizelimit=X option.
Home Sharing
In OS X
Step 1: change UID and GID(s)
- Open NetInfo Manager located in the /Applications/Utilities folder.
- 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.
- Navigate to /users/ where 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.
- Change the UID value to 1000 (the value used by default for first user created in Arch).
- Also change the GID value to 1000 (the value used by default for user account creation in Arch).
- Navigate to /groups/ , automatically saving the changes you have made so far.
In Leopard, the NetInfo Manager application is not present. A different set of steps is required for UID synchronization:
- Open System Preferences.
- Click on Users & Groups.
- Unlock the pane if not already done so.
- Right-click on the desired user and select Advanced Options.
- 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).
Step 2: change «Home» permissions
- Open up Terminal in the /Applications/Utilities folder.
- Enter the following command to reclaim the permission settings of your home folder, replacing , and 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.
In Arch
To synchronize your UID in Arch Linux, you are advised to perform this operation while creating a new user account. It is therefore recommended that you do this as soon as you install Arch Linux.
Now you must substitute Arch’s home with OS X’s home, by modify entries of /etc/fstab .
Avoid long EFI wait before booting
If your MacBook spends 30 seconds with «white screen» before booting you need to tell the firmware where the booting partition is.
Boot OS X, if you do not have it installed, you can use the install DVD (select language, then click Utilities->Terminal) or another MacBook with OS X (connect the two computers via firewire or thunderbolt, start the other MacBook while holding the T button, boot your MacBook while holding the Options button (alt)).
Either way, once you have got a OS X terminal running on your MacBook you need to execute a different command (as root) depending on if you use EFI or not:
(given that if your GRUB or EFI is on sda1, /dev/disk1s2 if it is on sdb2, etc). See also https://bbs.archlinux.org/viewtopic.php?pid=833215.
Mute startup chime
The startup chime volume is controlled by the EFI variable SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82. So it can be muted with
Bear in mind that the file may have the immutable bit set by default, which will prevent even root from overwriting the file. See File permissions and attributes#chattr and lsattr. To remove it, issue the following:
After that, run the printf command and it should overwrite the file properly. Verify the file’s contents and then set the immutable bit again with chattr +i once satisfied.
Alternatively, you can use a OS X install disk to mute the chime. Boot from it, select language, then click Utilities > Terminal, and enter
(or whatever volume you want).
kworker using high CPU
Sometime with the addition of Yosemite, some users found that kworker CPU usage will spike, as disccused here. This is sometimes the result of runaway ACPI interrupts.
To check and see, you can count the number of recent ACPI interrupts and see if any of them are out of control.
If you see that one particular interrupt is out of control (possibly GPE66), i.e., registering hundreds of thousands of lines, you can try disabling it (replace XX with the runaway interrupt):
Disabling random ACPI interrupts could cause all kinds of problems, so do this at your own risk. If this fixes the problem, there is discussion about how to make a systemd service that automatically disables an interrupt at every boot here.
rEFIt
In OS X, download the «.dmg» from rEFIt Homepage and install it.
Open up Terminal and enter:
Problems with rEFIt
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:
Then have a look at this link:
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.
If you need gptsync, install gptsync AUR .
Mavericks upgrade breaks Arch boot option
For some multi-boot users who utilize a separate Linux boot partition, the OS X Mavericks upgrade may overwrite the boot partition with Apple’s own recovery boot filesystem. This breaks the Arch Linux boot option in rEFIt/rEFInd. The best way to proceed in this situation is to abandon a separate boot partition and use the EFI system partition (ESP) to install the bootloader of your choice. It is also recommended that you use rEFInd instead of rEFIt as development on the latter has halted.
Assuming grub2 as the bootloader:
Use the Arch LiveCD to boot to a shell and chroot to your broken Arch Linux environment.
Mount the ESP on /boot.
Edit the fstab and remove the old boot partition and make ESP the new boot partition. Now mount the ESP as the new /boot parition.
Create a new initramfs and vmlinuz in /boot.
Create a new grub.cfg file.
Make sure that grub.cfg is in the same directory as grubx64.efi.
Generate a new refind_linux.conf file in /boot simply by running mkrlconf.sh which comes with rEFInd.
Exit the chroot environment.
Reboot. You should see a new entry for Arch Linux in rEFInd and it should boot to your Arch Linux installation.
Model-specific information
MacBook
April 2016 12″ — Version 9,1
- Booting from USB via EFI works fine, when giving the intremap=nosid kernel option. Remember to hold the Alt key on booting to enter the boot menu. In order to allow Linux boot directly from your system disk, you will first need to install https://www.rodsbooks.com/refind/ from within OSX recovery mode (hold cmd+r during boot, then open terminal, then run refind-install script).
- The wireless card works out of the box with brcmfmac .
- Suspend / hibernate does not work. The problem seems to be the NVMe that does not wake up. When booting from an external drive, suspend / hibernate works out of the box.
- Audio recording works out of the box. Audio playback works out of the box for headphones, not for built-in speakers. Cirrus driver patch needed for making the speakers work: https://github.com/leifliddy/macbook12-audio-driver
- The keyboard and the touchpad do not work out of the box. There is a work-in-progress driver available that works well: macbook12-spi-driver-dkmsAUR . Sometimes the touchpad does not work after booting but this can be fixed by reloading the driver with rmmod applespi && modprobe applespi .
- The keyboard backlight does not work (no solution yet).
- For Bluetooth driver, see macbook12-bluetooth-driverAUR
Mid 2007 13″ — Version 2,1
Since older Macbooks have a 32bit EFI running, the usual installation image is not recognized. You need to either remove the UEFI support from the disc (Unified Extensible Firmware Interface#Remove UEFI boot support from optical media) or build a 32bit EFI version of the disc. The paragraphs below will take the first path to success, booting into BIOS mode and its pitfalls. For a try the other way round, read Unified Extensible Firmware Interface#Create UEFI bootable USB from ISO first.
First prepare your harddisc according to your wishes. In this scenario it was a «Linux only» approach with
The hfsprogs AUR package contains the tools to handle HFS/HFS+ filesystems. The rEFInd bootloader recognizes it on its own. Usually the partition for the EFI bootloader is a FAT32 (vfat) partition. In this case I tried rEFIt first, which apparently needs the HFS+ filesystem to work, and kept it at that.
The mount points are:
The bootloader in use was rEFInd instead of rEFIt. To install it, the rEFInd homepage provides a good guide. Usually it is simply done by copying rEFInd:
The pitfall here is, that the system bootet in BIOS compatibility mode and not in EFI mode. You cannot therefore use efibootmgr , because the EFI variables (even with ‘modprobe efivars’) are not available. While installing the system get mactel-boot AUR . The hfs-bless utility comes in handy, when blessing the EFI bootloader. This is done by calling:
Since the Linux kernel does come with EFI stub enabled, it seems a good idea to run it through a bootloader first. Especially if it runs not out of the box. But using rEFInd makes GRUB (or any other bootloader) obsolete, because of that.
Not running out of the box is unfortunately the initial stage for the kernel. Since we installed it in BIOS mode, two modules are missing to grant access to the root partition while booting. Hence the ‘initfsram-linux.img’ can not be found/loaded. Adding the following modules to your ‘MODULES’ line in /etc/mkinitcpio.conf solved this (original post).
Rebuild your kernel image:
The bootloader rEFInd can scan kernels even out of the ‘/boot/. ‘ directory and assumes an efi kernel even without the extension ‘.efi’. If you do not want to try out special kernels, this should work without the hassle to copy each kernel after building to some spot special.
If you happen to get multiple entries for one boot image, it often results of a previous installation of a bootloader within the MBR. To remove that, try the following — taken from the original post. This is valid for GPT partitioned discs, so please check your environment and save your MBR first.
MacBook Pro
Early 2015 13″/15″ — Version 12,x/11,4+
Wireless
The brcmfmac driver is working as of 2015-11-20, with newer firmware necessary for working 5GHz support (see here.)
then check whether PCI runtime power management is enabled on the device, and disable it if so.
Bluetooth
Bluetooth is fully supported starting from kernel-4.4.0.
Suspend & Power Off (11,4+)
The 11,4 and 11,5 MacBook Pros do not shutdown or suspend correctly with the default kernel. This issue is being addressed in Bug 103211 and a temporary patch is currently available in linux-macbook AUR . Note that Linux 4.13.0 has this patch included, and will be released shortly.
Keyboard & Trackpad
Haptic feedback works out of the box due to the trackpad’s built-in firmware.
There are several drivers available that provide multitouch support. The following have been confirmed working with the MacBookPro12,1.
For xf86-input-libinput the following configuration emulates some features from the OS X functionality. For more options see libinput(4) .
For xf86-input-synaptics the following configuration is necessary to make the touchpad work fully.
Further, some US/ANSI keyboards suffer from an issue where the tilde key (
, the key vertically between Esc and Tab) registers as . The following config file fixes this issue.
See this kernel bugzilla for more details and the relevant patches for earlier kernels.
Graphics
For Intel-only graphics, install the xf86-video-intel package. For more information or OpenGL/3D support, follow instructions at Intel graphics.
As of linux kernel 4.16.6 dual graphics switching does work on the 11,5 (2015) with Intel modesetting and the AMD GPU utilizing the radeon driver (amdgpu is untested). See MacBookPro11,x#Graphics to enable the integrated graphics. Once the laptop boots with integrated graphics enabled you can use VGA Switcheroo controls to power down the discrete GPU. However, if you keep it powered on you will be able to utilize HDMI connections and using switcheroo-control AUR you can run applications on the AMD GPU.
2012 — 2014 models
- MacBookPro11,x (Late 2013—Mid 2014)
- MacBookPro10,x (Mid 2012—Early 2013)
MacBook Air
Early 2014 11″ — Version 6,1
This is almost the same as the 2013 version, where the only known difference is a slightly faster processor. The version numbers have not been changed since the 2013 version.
It works excellently after following the instructions for the MBA 2013 13″ here and in the forum thread. Bluetooth, which has been reported not working for some people with the 2013 version, works without trouble for the 2014 version, although it should be exactly the same.
- There is no driver for the webcam yet.
- rEFInd uses 30 seconds to start booting. Using the bless trick stops rEFInd from loading, and it has to be re-installed.
Mid 2013 13″ — Version 6,2
Installing and booting
Booting from a normal 2013.6 USB key works fine, but I could not seem to get either GRUB or Syslinux working.
I was able to boot by first installing Arch Linux following the MacBook guide at the wiki (having a separate FAT32 /boot partition). Skip the bootloader installation.
Installing rEFInd from OS X (important!) and installing the EFI stub loader made me able to boot fine.
Arch Only Installation
This method works without rEFInd and uses grub to boot EFI. Partition as follows:
sda1 can also be a HFS+ partition for EFI. This example chooses to use FAT32 (vfat). Although swap is optional, it is required for hibernation. Instead of sda4 for root and home, an alternative partition scheme would be to make sda4 as root and sda5 as home.
Format and mount:
Finish the installation according to the Installation guide and skip anything after the bootloader. After you have generated your initramfs and set root passwd follow below to setup grub. First, install grub efibootmgr , then:
Now you can exit/unmount/reboot:
Stability problems
This article or section needs language, wiki syntax or style improvements. See Help:Style for reference.
This is the big worry for me. Every now and then my system hangs for a brief moment and everything involving net or disk access just hangs there for a while and then it seems to work. So far it only seems to happen when I run something disk or CPU-intensive. Also had an occasion when I could not start X and just got this repeating all over my screen:
On the next attempt it worked fine. I did SMART short and long tests on my disk and they returned fine: smartctl -a
There are some messages in my boot that indicate this could be disk and/or ACPI related.
These are with 2013-06 ISO, 3.9.7-1 2013 x86_64 kernel.
journalctl -b Seems to only work with the headphone jack, not with the speakers.
Marvell ATA suspend bugs
If you have 2013 MacBook Air with a Marvell 128 or 256 GB drive, you might get the following ata errors instead after pm-suspend/resumes:
Try what Patrick and Tejun figured out on the linux bug. I followed what Patrick describes with sata_alpm, and I have not seen the issue since.
There are more steps on how to resolve this issue in this thread on the Arch forum
Suspend/Resume
Brightness is either 0% or 100% after resuming from suspend. Adding the kernel parameter «acpi_osi=!Darwin» to your bootloader fixes the problem, though may have other side effects including disabling the thunderbolt port.
WiFi does not work out of the box. Install broadcom-wl-dkms to connect to a network. If booting from the official Arch Linux ISO, one needs to unload a few standard modules in order to use the included wl module. Do so as follows:
Now simply load the wl module:
This should automatically load the onboard wifi which can be seen by issuing: ip a . From here follow the wpa_supplicant#Connecting with wpa_cli article to bring up the wireless network.
Touchpad
Since 3.10.3 kernel touchpad works perfectly with xf86-input-synaptics .
Audio
ALSA may recognise the HDMI audio out as card 0 which will be the default card. Confirm this by checking the output of
If that is the case, you may need to create a /etc/asound.conf with below entries:
to use the HDA Intel card, ie. the built-in speakers / headphones.
Mid 2012 13″ — version 5,2
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).
Mid 2012 11.5″ — Version 5,1
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 xf86-input-mtrack-git AUR . This fixed errors such as
and backtraces that causes X11 to crash. This might apply to Version 5,2 assuming they use the same trackpad.
Mid 2011 — version 4,x
Works out-of-the-box since kernel 3.2.
Mid 2009 — version 2,1
Everything works, except the WIFI. You need to install the b43-fwcutter and b43-firmware AUR packages.
Append options b43 pio=1 qos=0 to /etc/modprobe.d/b43.conf .
Microphone 2,1
If your microphone is not working, you have probably run into a driver bug which makes the macbook think the digital microphone is always plugged in, disabling the normal microphone.
To work around it, disable the pulseaudio plug detector with this patch:
Early 2008 — version 1,1
Everything works out of the box though you will need the b43-fwcutter package (or simply b43-firmware AUR ) for the wireless adapter to work.
Since this model has only one USB port, you may find it easiest to install Arch with a powered USB hub. Plug a USB network adapter (wireless or ethernet adapter to plug into a USB port) and your Arch installation media into the USB hub.
If you cannot get any result by scanning wireless network after boot, unload modules b43 and ssb and load them again:
There is a good chance you will find what’s wrong with DMA from the dmesg log.
Even if you can scan wireless networks after reloading the modules, it’s still possible that you will only be able to connect to some networks, but not all of them. According to a more detailed discussion here: https://crunchbang.org/forums/viewtopic.php?id=17368, adding pio=1,qos=0 options to the b43 module can solve this problem.
I tested this for a 13′ MacBookAir1,1 with a BCM4321 chipset, and it works.
Mac Mini
Attempting to modify UEFI boot parameters with efibootmgr is likely to crash in the kernel. Including GRUB install phase
Luckily firmware on this model can function without it, using following adaptation of the #Using the native Apple bootloader with GRUB
- Instead of creating HFS+ partition create a fat32 partition for the bootloader
- Instead of using grub-install create grub image and installation manually OR boot with efi=noruntime parameter
- Manual installation:
- Touching /boot/mach_kernel is not necessary anymore
Источник