Running Arch Linux on iMac late 2013 (27 inch)
Thursday, Jul 14, 2016
What did I do with my iMac
Finally, I got bored with macOS.
I bought my first Mac computer in March 2014, which is an iMac 27 inch. I liked it, so I bought another Macbook Pro, and I’ve been using macOS since, until about a week ago.
I installed Arch Linux on my iMac, and here are some highlights:
- It is EFI boot, using GPT partition on one 1T HDD.
- It is running ZFS on root partition.
- It is using dm-crypt for a full disk encryption.
- It is using Nvidia 775M, driving 2 external 1440p monitors, so 3 x 1440p monitors in total.
The installation process
It was challenging and fun
I am not going to list a step-by-step guide, as the way I did it may not be the way you want your system to be, and I believe as an Arch Linux user you are not expecting a step-by-step guide, are you?
To be able to install them properly, I would suggest you read carefully on the Arch Linux wiki pages about these few things:
- ZFS (https://wiki.archlinux.org/index.php/ZFS), especially root on ZFS section.
- dm-crypt (https://wiki.archlinux.org/index.php/Dm-crypt), this is used to encrypt your disk.
- rEFInd (https://wiki.archlinux.org/index.php/REFInd), to help you understand how EFI booting works.
Also you may want to learn a little bit more about ZFS before you start,
- The Z File System by Allan Jude (http://www.allanjude.com/bsd/zfs.html)
- ZFS Primer by FreeNAS team (https://doc.freenas.org/9.3/zfsprimer.html)
The idea is like this
- You want to use rEFInd to boot to a FAT32 partition, looking for a config file
- The config file will tell dm-crypt that this is an encrypted drive, so the kernel will load dm-crypt and you will be asked to enter your password.
- Then after dm-crypt maps the drive to a virtual device like
/dev/mapper/something, ZFS will start to import the pool, and mount different partitions accordingly based on
- After the ZFS mounts your root, your system will then boot successfully.
In general it’s pretty good.
- I am running Gnome, I was going to try KDE, but it crashed every time I wanted to unlock a panel… Therefore…
zfs rollback ...
- Most of the devices just work, including Wifi, Bluetooth, Camera, Microphone, Speaker. Even 3-monitor config work
out of the box if you install
nvidiadriver that shipped with Arch Linux.
- Suspends and wake-on-lan both are working out of the box.
Only one thing before I can say it’s perfect:
- Speaker and headphone switch does not work perfectly. Sometimes I tried to unplug the headphone but the speaker still does not make any sound (even Test Speakers works), but after a while it’ll be back again.
I know I am running Arch Linux (lovely rolling release distro) on an iMac (super Linux “friendly” hardware),
but I’ve got ZFS, so if the update ruins anything,
zfs rollback ....