Artix (With Runit) dual boot installation guide for Macbook
- ☑️ display
- ☑️ audio
- ☑️ internet connection, wifi
- ☑️ keyboard (work perfectly as normal keyboard)
- ☑️ trackpad & external mouse (with natural scroll and more)
- ☑️ screen backlight
- ☑️ keyboard backlight
- ☑️ fan
- ☑️ battery
It's seem Macbook with T2 Security isn't support linux very well, view this discussions
Use Disk Utility Partition feature to add new Partition for Artix, follow this guide
Or if you already know how to use Disk Utility, then create a partition with FAT32 format.
Download Artix base ISO here
Find usb by using lsblk or diskutil list, etc..., then:
# Assume usb disk is /dev/diskX
umount /dev/diskX
dd if=path/to/arch.iso of=/dev/diskX bs==1mHold alt/option when system bootup, then choose boot from USB.
sudo pacman -Sy terminus-font
setfont /usr/share/kbd/consolefonts/ter-132b.psf.gzOr you can use some font already in /usr/share/kbd/consolefonts
After boot up, choose keytable, lang or leave it default if you not sure what are they, then choose:
[From CD/DVD/ISO: artix.x86_64]
Then login with:
Username: artix
Password: artixView all your partitions to choose correct one with:
lsblkThen open cfdisk to partition own disk
# Assume my disk is /dev/sda
cfdisk /dev/sdaThen create these new partitions:
| Size | Type | Description |
|---|---|---|
| 128MB | Apple HFS+ | This is required in order to make artix dual boot with OSX |
| 256MB | Linux filesystem | Artix file system |
| xMB | Linux Swap | If you have space, try to make it double size of your ram size |
| xGB | Linux filesystem | This is our home |
Assuming you have this after partitioning
| Device | Size | Type |
|---|---|---|
| /dev/sda3 | 128MB | Apple HFS+ |
| /dev/sda4 | 256MB | Linux filesystem |
| /dev/sda5 | 16GB | Linux Swap |
| /dev/sda6 | 64GB | Linux filesystem |
Now let format it all:
mkfs.ext4 /dev/sda4
mkfs.ext4 /dev/sda6
mkswap /dev/sda5Then mount & turn on swap:
mount /dev/sda6 /mnt
mkdir /mnt/boot
mount /dev/sda4 /mnt/boot
swapon /dev/sda5Connect with connman
Example:
connmanctl # Open connman
enable wifi # Enable wifi
scan wifi # Scan wifi
agent on # Enable wireless agent
services # List all scanned wifi
connect wifi_XXX # Connect with wifi_XXX goes after your wifi nameThen check connection with:
ping -c 3 google.comI'm using runit so:
basestrap /mnt base base-devel runit elogind-runitYou can choose linux or linux-lts. I'v tried linux kernel on my MJLQ2-MBP but it cause udev stuck and we have to fix by edit grub default like:
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset quiet rootflags=data=writeback"Although that fix udev get stuck but then you will can't control backlight of your MBP
So, i'v install linux-lts and everything work out of the box:
basestrap /mnt linux-lts linux-firmwareRun this command:
fstabgen -U /mnt >> /mnt/etc/fstabvim /mnt/etc/fstabRemove all discard in all lines & edit everything to look like:
/dev/sda4 /boot ext2 defaults,relatime,stripe=4 0 2 /dev/sda6 / ext4 defaults,noatime,data=writeback 0 1
Let chroot into own new Artix system:
artools-chroot /mntSet system clock:
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohcLocalization:
# Uncomment `en_US.UTF-8 UTF-8` (Or what ever locale you want) line in `/etc/locale.gen` file, then run:
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8Add user:
useradd -m -G wheel your_username
passwd your_username (Create your password)
# Also change your sudo password with:
passwdAdd sudo rights for our user by open /etc/sudoers file and uncomment this line:
%wheel ALL=(ALL) ALLCreate an initial ramdisk environment:
mkinitcpio -p linux-lts
# or linux if you using linux kernelSet hostname:
echo artix > /etc/hostname (Change artix with your preper hostname)Install there packages:
pacman -S connman-runit dhcpcd wpa_supplicantwpa_supplicant and make sure it install successfully
Enable connmand service:
ln -s /etc/runit/sv/connmand /etc/runit/runsvdir/defaultWe will boot using OSX native EFI boot loader, so install this:
pacman -S grub-efi-x86_64Change /etc/default/grub to look like:
GRUB_CMDLINE_LINUX_DEFAULT="quiet rootflags=data=writeback"⚠ If you using linux kernel instead of linux-lts kernel, you may try this:
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset quiet rootflags=data=writeback"Then create boot.efi with GRUB:
# Create empty "boot/grub/grub.cfg" file if it not exist
grub-mkconfig -o boot/grub/grub.cfg
grub-mkstandalone -o boot.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi --compress xz boot/grub/grub.cfg❗ Important: Copy boot.efi to your usb or upload it somewhere, we'll need this to dual boot with OSX.
To copy it to usb, use:
mkdir /mnt/myusb && mount /dev/sdb /mnt/myusb
cp boot.efi /mnt/myusb/
Or upload it to file.io:
curl -F "[email protected]" https://file.io
If everything ok, now you can exit chroot and reboot (Back to OSX word)
exit <- (exit chroot environment)
umount -R /mnt
rebootWhen OSX loaded. Using Disk Utility to format 128MB Apple HFS+ we have created & formatted before with Journaled format.
Then create this file structure inside:
|___mach_kernel
|___System
|___Library
|___CoreServices
|___SystemVersion.plist
|___boot.efi <- (is the boot.efi file we'v copied or uploaded in the previous step)
Add below content to SystemVersion.plist:
<xml version="1.0" encoding="utf-8"?>
<plist version="1.0">
<dict>
<key>ProductBuildVersion</key>
<string></string>
<key>ProductName</key>
<string>Linux</string>
<key>ProductVersion</key>
<string>Artix Linux</string>
</dict>
</plist>Then reboot and hold alt/option and enjoy Artix 😺
Install terminus-font (or whatever font you prefer, make sure it have large size):
sudo pacman -S terminus-fontcreate file /etc/vconsole.conf with content:
FONT=ter-132b
Install these default fonts (to make browser look suckless):
yay -S ttf-mac-fonts ttf-ms-fonts ttf-opensans
sudo pacman -S xf86-video-intel xf86-input-libinput mesa
Using pacman to install all these packages:
| Package | Description |
|---|---|
| xorg-server | graphical server |
| xorg-xinit | starts graphical server |
| xorg-xrandr | resize & rotate utility for X |
| xorg-xsetroot | utility to set your root window background to a given pattern or color |
| xorg-xev | indentifying keycodes |
| picom | lightweight compositor for X11 |
| xwallpaper | set wallpaper |
| arandr | UI for screen adjustment |
I build my own dwm, dmenu, st from suckless
But you can install any window manager you like
pacman -S bluez bluez-runit bluez-utils ln -s /etc/runit/sv/bluetoothd /run/runit/service sv start bluetoothd sv restart bluetoothd
For bluetooth audio device, install these
sudo pacman -S pulseaudio-alsa pulseaudio-bluetoothYou may need install blueman for easily manage your bluetooth devices
