NB: This project is currently not being actively maintained, and is not usable at this moment. PRs are still very welcome in order to fix the current usability issues.
This will setup Arch Linux on your Mac or MacBook all from Mac OSX. No need for any USB drives or figuring out the proper network/video drivers to get your system to get up. It should install without any rebooting etc. Just launch it and enter your password twice and go about your business.
Warning: Backup your stuff or use a fresh iMac or MacBook. There are no guarantees this will work and it might leave your machine in an unusable state. I personally didn't worry about this to much as one can just reset it back to a [factory restore] (https://github.com/yantis/instant-archlinux-on-mac/blob/master/factory-restore.md) with "⌘ + R" at startup or "option + ⌘ + R for internet recovery.
That being said. It has been designed to not write anything in case of failure. So worst case if it doesn't work you will probably be OK. Though seriously back up anything you actually want to be safe.
Will this work with your iMac or MacBook? Possibly. It worked with all the ones I tested it with. I suspect it will most likely work and even if not perfect you will be in a much better place than trying to do it by hand. I do know for a fact that I haven't set it up to work with fusion drives yet so if your drive is a fusion drive it won't work without some minor changes.
If you have any problems feel free to shoot me an email at [email protected]
- Installs without USB.
- Installs without needing network drivers.
- Installs without needing video drivers.
- Installs 100% in Mac OSX with no rebooting neeed.
- When you do choose to use Arch Linux it should be 100% usable by simply rebooting.
- Very quick install. If your bandwidth is fast enough the whole install takes under 10 minutes.
- Easy to remove and revert back to normal.
- rEFInd with rEFInd minimal theme.
- KDE Plasma, XCFE4, and Awesome window desktop managers.
- SDDM with Archlinux Theme
- Infinality Fonts preconfigured and installed.
- Latest Intel, Nvidia, and AMD/ATI Radeon drivers (DKMS)
- Network Drivers and Broadcom firmware preinstalled and setup.
- Network manager and applets setup for lan or wifi use.
- Powerline with Powerline fonts installed
- ZSH, Oh-my-zsh, tmux, vim preinstalled.
- Google Chrome
- Sound system preconfigured (Alsa/Pulseaudio)
- Mac OSX Drive is shared read only
- Development Tools plus python2, python3, & ruby.
- Thermald and cpupower
- Mac Fan control daemon
- Terminals: xfce4-terminal, konsole, gnome-terminal, vte3
- xf86-input-mtrack package installed and configured.
- Yaourt for AUR
- Mountain Lion, Lion, Yosemite, El Capitan, and Sierra
- [MacBookPro10,1] - MacBook Pro (Retina, Mid 2012)
- [MacBookPro10,2] - MacBook Pro (Retina, 13-inch, Late 2012)
- [iMac15,1] - iMac Retina 2014
- [MacBook8,1] - MacBook 12" Oct 29th, 2016 Update - Still no working keyboard though fully working if I install a usb hub, keyboard, mouse and usb ethernet
- If the OS is El Capitan then you need to disable System Integrity Protection by rebooting and at the chime hiting command+R and opening a terminal and typing: csrutil disable; reboot
- Make sure FileVault encryption is turned off. If it isn't you need to disable it and reboot.
- Use ⌘ + space to open spotlight. Type in terminal and hit return.
- Optionally, update your software either through the terminal or App store Though if you do you may have to reboot though probably not. This step can take a while on a new machine. It usually is a 2+ GB download. You simply might want to use the GUI update application to have some indication of progress.
sudo softwareupdate -i -a
If you wanted your Mac to have 100GB and Arch Linux to have the rest type this:
curl -O https://raw.githubusercontent.com/yantis/instant-archlinux-on-mac/master/mac-install.sh && mac-install.sh 100
Same as above but using Google's URL shortener:
curl -OL goo.gl/VdgxPO && sh VdgxPO 100
There is a USB option but I haven't figured out the booting on that yet. So that is a work in progress but to do that type:
curl -O https://raw.githubusercontent.com/yantis/instant-archlinux-on-mac/master/mac-install.sh && mac-install.sh USB
- Command Line Developer tools, Homebrew, VirtualBox, Boot2docker, Docker all get silently and automatically installed.
- Since Mac OSX doesn't support the Ext4 file system. We install a 10 day trial of Paragon ExtFS (It can be uninstalled after the install)
- The file system gets converted to HFS+ if needed then volume gets shrunk down to make room for Arch Linux.
- The physical volume gets mapped to virtual volumes for VirtualBox.
- The system is profiled to be able to dynamically adapt to its hardware.
- Boot2docker launches VirtualBox with our physical volumes mapped.
- A docker container gets launched which then downloads this script to dynamically setup Arch Linux.
- It unsquashes a rootfs image into a chroot environment.
- Everything gets installed and setup in that chroot environment.
- Once completed everything in that chroot environment gets rsynced over to the virtual mapped physical drive.
- rEFInd is installed for dual booting Mac OSX & Linux As well as a very sexy rEFInd Minimal Theme
- Nothing actually gets written unless everything is successful.
- When booting up there is now a small but noticable delay of around 30 seconds. This has something to do with rEFInd and should be fixable.
The defaults for an HFS+ file system look like this. This script expects your "Macintosh HD" to be at disk0s2.
$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 499.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
The defaults for Core Storage look like this. This script expects "Apple_CoreStorage" to be at disk0s2.
$ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 499.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD *499.0 GB disk1
Logical Volume on disk0s2
C3E9416F-A8DF-4E50-9BEE-87B2C538689E
Unencrypted
- Make sure that FireVault is turned off
- If the script doesn't remove Core Storage for you. You can try the trick of enabling FileVault, rebooting, disabling it and rebooting. Which should remove Core Storage.
- Fusion drives do not work yet as it hasn't been programmed in yet.
- Make sure to leave at least 30GB for Mac OSX (or at least whatever the drive space is plus a few GB for updates).
- If you want to mess with a minimal install of Archlinux. It runs perfectly fine on 10GB or less of space.
- This hasn't been tested with bootcamp but I suspect it will not work as is.
- If for some reason on boot you get no disk found select linux and hit F2 and select "Fallback with Micokernel updates" and run as root "mkinitcpio -p linux" to regenerate the initramfs and reboot
- https://wiki.gentoo.org/wiki/Apple_Macbook_Pro_Retina
- https://loicpefferkorn.net/2015/01/arch-linux-on-macbook-pro-retina-2014-with-dm-crypt-lvm-and-suspend-to-disk/
- https://wiki.archlinux.org/index.php/MacBook
- https://bbs.archlinux.org/viewtopic.php?id=195924
- https://github.com/pandeiro/arch-on-air
- https://github.com/jantman/puppet-archlinux-macbookretina
- https://wiki.debian.org/iMacIntel
- https://github.com/coldnew/macbookair-2013-config/blob/master/kernel-config.example
- https://github.com/NapoleonWils0n/cerberus/
- https://github.com/gammy/macbook8-1_archlinux
- https://wiki.archlinux.org/index.php/MacBook
- https://loicpefferkorn.net/2015/01/arch-linux-on-macbook-pro-retina-2014-with-dm-crypt-lvm-and-suspend-to-disk/
- https://medium.com/@PhilPlckthun/arch-linux-running-on-my-macbook-2ea525ebefe3
- https://help.ubuntu.com/community/MacBookPro11-1/utopic
- https://github.com/jantman/puppet-archlinux-macbookretina
- https://www.nixknight.com/2014/02/arch-linux-installation-with-kde-desktop/
- https://codylittlewood.com/arch-linux-on-macbook-pro-installation/
- https://aur.archlinux.org/packages/linux-macbook-pro
- https://apple.stackexchange.com/questions/63130/create-new-partition-in-unallocated-space-with-diskutil
- https://github.com/cowboy/dotfiles/blob/master/bin/osx_hide_partition
- https://en.wikipedia.org/wiki/GUID_Partition_Table
- https://blog.javabien.net/2014/03/03/setup-docker-on-osx-the-no-brainer-way/
- https://viget.com/extend/how-to-use-docker-on-os-x-the-missing-guide
- https://github.com/carlcarl/blog/blob/cacca2e50fe4fbcca2e9c3d68bad9176a66f8016/content/archive/osx_mavericks_ext4.md
- https://download.paragon-software.com/doc/Manual_extfsmac_eng.pdf
- https://www.paragon-software.com/home/extfs-mac/download.html
- https://jamfnation.jamfsoftware.com/discussion.html?id=12843
- https://tips.jay.cat/ext4-support-in-osx-yosemite/
- https://github.com/SicVolo/hid-apple-4.1.2
- https://bugzilla.kernel.org/show_bug.cgi?id=96771
- https://forums.opensuse.org/showthread.php/507933-openSUSE-on-the-2015-Apple-12-Inch-Retina-MacBook/page2
- https://en.wiki2.org/wiki/NVM_Express
- https://www.nvmexpress.org/resources/linux-driver-information/
- https://www.anandtech.com/show/9136/the-2015-macbook-review/8
- https://ubuntuforums.org/showthread.php?t=2283423
- https://bbs.archlinux.org/viewtopic.php?id=198051
- https://bugzilla.kernel.org/show_bug.cgi?id=99891
- https://bugzilla.kernel.org/show_bug.cgi?id=110901
- https://forums.opensuse.org/showthread.php/507933-openSUSE-on-the-2015-Apple-12-Inch-Retina-MacBook/page5
- https://www.bountysource.com/issues/35422234-macbook8-1-12-inch-early-2015-keyboard-and-trackpad-don-t-work
- https://bugzilla.kernel.org/show_bug.cgi?id=108331