{"id":13761397,"url":"https://github.com/kyoz/mac-artix","last_synced_at":"2025-04-15T11:05:15.707Z","repository":{"id":143840914,"uuid":"292806235","full_name":"kyoz/mac-artix","owner":"kyoz","description":"Artix (With Runit) dual boot installation guide for Macbook","archived":false,"fork":false,"pushed_at":"2021-06-30T09:38:22.000Z","size":2755,"stargazers_count":17,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T11:04:52.838Z","etag":null,"topics":["arch","artix","dual-boot","macbook"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kyoz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-09-04T09:25:06.000Z","updated_at":"2024-05-31T21:32:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"e834b8cf-5c10-4fe6-9fc5-2ee7d7e28279","html_url":"https://github.com/kyoz/mac-artix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoz%2Fmac-artix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoz%2Fmac-artix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoz%2Fmac-artix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyoz%2Fmac-artix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyoz","download_url":"https://codeload.github.com/kyoz/mac-artix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249058371,"owners_count":21205910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arch","artix","dual-boot","macbook"],"created_at":"2024-08-03T13:01:52.979Z","updated_at":"2025-04-15T11:05:15.665Z","avatar_url":"https://github.com/kyoz.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"# mac-artix\n\u003e Artix (With Runit) dual boot installation guide for Macbook\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"demo.png\" width=\"1000\"\u003e\n\u003c/p\u003e\n\n- :ballot_box_with_check: display\n- :ballot_box_with_check: audio\n- :ballot_box_with_check: internet connection, wifi\n- :ballot_box_with_check: keyboard (work perfectly as normal keyboard)\n- :ballot_box_with_check: trackpad \u0026 external mouse (with natural scroll and more)\n- :ballot_box_with_check: screen backlight\n- :ballot_box_with_check: keyboard backlight\n- :ballot_box_with_check: fan\n- :ballot_box_with_check: battery\n\n\n# Contents\n\n- [Before you start](#before-you-start)\n- [Install Artix dual boot](#install-artix-dual-boot)\n  - [Make space for Artix](#make-space-for-artix)\n  - [Make installer USB](#make-installer-usb)\n  - [Boot it up](#boot-it-up)\n  - [Login](#login)\n  - [Partition](#partition)\n  - [Format and Mount](#format-and-mount)\n  - [Connect Wifi](#connect-wifi)\n  - [Install Base System](#install-base-system)\n  - [Install Kernel](#install-kernel)\n  - [Generate fstab](#generate-fstab)\n  - [Configure the Base System](#configure-the-base-system)\n  - [Configure Network](#configure-network)\n  - [Install the Bootloader](#install-the-bootloader)\n  - [Reboot the System](#reboot-the-system)\n  - [Make Artix Dual Bootable](#make-artix-dual-bootable)\n- [Install to make artix usable](#install-to-make-artix-usable)\n  - [Set tty default font](#set-tty-default-font)\n  - [Install drivers](#install-drivers)\n  - [Install require packages](#install-require-packages)\n  - [Install Window Manager](install-window-manager)\n\n\n# Before you start\n\nIt's seem [Macbook with T2 Security](https://support.apple.com/en-us/HT208862) isn't support linux very well, view this [discussions](https://discussions.apple.com/thread/251087440?answerId=252062188022#252062188022)\n\n# Install Artix dual boot\n\n## Make space for Artix\n\nUse Disk Utility Partition feature to add new Partition for Artix, follow [this guide](https://wiki.archlinux.org/index.php/Mac#Arch_Linux_with_OS_X_or_other_operating_systems)\n\nOr if you already know how to use Disk Utility, then create a partition with FAT32 format.\n\n## Make installer USB\n\nDownload Artix base ISO [here](https://iso.artixlinux.org/isos.php)\n\nFind usb by using `lsblk` or `diskutil list`, etc..., then:\n\n```sh\n# Assume usb disk is /dev/diskX\numount /dev/diskX\ndd if=path/to/arch.iso of=/dev/diskX bs==1m\n```\n\n## Boot it up\n\nHold \u003ckbd\u003ealt/option\u003c/kbd\u003e when system bootup, then choose boot from USB.\n\n:warning: If you are using Retina Macbook, tty font will be very small. To get larger font, [connect to wifi](#connect-wifi) and run these commands:\n\n```sh\nsudo pacman -Sy terminus-font\nsetfont /usr/share/kbd/consolefonts/ter-132b.psf.gz\n```\n\nOr you can use some font already in `/usr/share/kbd/consolefonts`\n\n## Login\n\nAfter boot up, choose `keytable`, `lang` or leave it default if you not sure what are they, then choose:\n\n`[From CD/DVD/ISO: artix.x86_64]`\n\nThen login with:\n\n```sh\nUsername: artix\nPassword: artix\n```\n\n## Partition\n\nView all your partitions to choose correct one with:\n\n```sh\nlsblk\n```\n\nThen open cfdisk to partition own disk\n\n```sh\n# Assume my disk is /dev/sda\ncfdisk /dev/sda\n```\n\nThen create these new partitions:\n\n|Size    |Type              |Description|\n|---     |---               |---        |\n|128MB   |Apple HFS+        |This is required in order to make artix dual boot with OSX|\n|256MB   |Linux filesystem  |Artix file system|\n|xMB     |Linux Swap        |If you have space, try to make it double size of your ram size|\n|xGB     |Linux filesystem  |This is our home|\n\n## Format and Mount\n\nAssuming you have this after partitioning\n\n|Device             |Size            |Type|\n|---                |---             |---|\n|/dev/sda3          |128MB           |Apple HFS+|\n|/dev/sda4          |256MB           |Linux filesystem|\n|/dev/sda5          |16GB            |Linux Swap|\n|/dev/sda6          |64GB            |Linux filesystem|\n\nNow let format it all:\n\n```sh\nmkfs.ext4 /dev/sda4\nmkfs.ext4 /dev/sda6\nmkswap /dev/sda5\n```\n\nThen mount \u0026 turn on swap:\n\n```sh\nmount /dev/sda6 /mnt\nmkdir /mnt/boot\nmount /dev/sda4 /mnt/boot\nswapon /dev/sda5\n```\n\n## Connect Wifi\n\nConnect with [connman](https://wiki.archlinux.org/index.php/ConnMan)\n\nExample:\n\n```sh\nconnmanctl              # Open connman\nenable wifi             # Enable wifi\nscan wifi               # Scan wifi\nagent on                # Enable wireless agent\nservices                # List all scanned wifi\nconnect wifi_XXX        # Connect with wifi_XXX goes after your wifi name\n```\n\nThen check connection with:\n\n```sh\nping -c 3 google.com\n```\n\n## Install Base System\n\nI'm using runit so:\n\n```sh\nbasestrap /mnt base base-devel runit elogind-runit\n```\n\n## Install Kernel\n\nYou can choose `linux` or `linux-lts`. I'v tried `linux` kernel on my [MJLQ2-MBP](https://support.apple.com/kb/sp719?locale=en_VN) but it cause udev stuck and we have to fix by edit grub default like:\n\n```sh\nGRUB_CMDLINE_LINUX_DEFAULT=\"nomodeset quiet rootflags=data=writeback\"\n```\n\nAlthough that fix udev get stuck but then you will can't control backlight of your MBP\n\nSo, i'v install `linux-lts` and everything work out of the box:\n\n```sh\nbasestrap /mnt linux-lts linux-firmware\n```\n\n## Generate fstab\n\nRun this command:\n\n```sh\nfstabgen -U /mnt \u003e\u003e /mnt/etc/fstab\n```\n\n:warning: If you are using SSD Drive, Open fstab config file:\n\n```sh\nvim /mnt/etc/fstab\n```\n\nRemove all `discard` in all lines \u0026 edit everything to look like:\n\n/dev/sda4   /boot   ext2   defaults,relatime,stripe=4        0 2\n/dev/sda6   /       ext4   defaults,noatime,data=writeback   0 1\n\n## Configure the Base System\n\nLet chroot into own new Artix system:\n\n```sh\nartools-chroot /mnt\n```\n\nSet system clock:\n\n```sh\nln -sf /usr/share/zoneinfo/Region/City /etc/localtime\nhwclock --systohc\n```\n\nLocalization:\n\n```sh\n# Uncomment `en_US.UTF-8 UTF-8` (Or what ever locale you want) line in `/etc/locale.gen` file, then run:\nlocale-gen\necho LANG=en_US.UTF-8 \u003e /etc/locale.conf\nexport LANG=en_US.UTF-8\n```\n\nAdd user:\n\n```sh\nuseradd -m -G wheel your_username\npasswd your_username   (Create your password)\n\n# Also change your sudo password with:\npasswd\n```\n\nAdd sudo rights for our user by open `/etc/sudoers` file and uncomment this line:\n\n```sh\n%wheel ALL=(ALL) ALL\n```\n\nCreate an initial ramdisk environment:\n\n```sh\nmkinitcpio -p linux-lts\n# or linux if you using linux kernel\n```\n\n## Configure Network\n\nSet hostname:\n\n```sh\necho artix \u003e /etc/hostname   (Change artix with your preper hostname)\n```\n\nInstall there packages:\n\n```sh\npacman -S connman-runit dhcpcd wpa_supplicant\n```\n\n:warning: If you only have wireless connection, be sure to install `wpa_supplicant` and make sure it install successfully\n\nEnable connmand service:\n\n```sh\nln -s /etc/runit/sv/connmand /etc/runit/runsvdir/default\n```\n\n## Install the Bootloader\n\nWe will boot using OSX native EFI boot loader, so install this:\n\n```sh\npacman -S grub-efi-x86_64\n```\n\nChange `/etc/default/grub` to look like:\n\n```sh\nGRUB_CMDLINE_LINUX_DEFAULT=\"quiet rootflags=data=writeback\"\n```\n\n⚠ If you using `linux` kernel instead of `linux-lts` kernel, you may try this:\n\n```sh\nGRUB_CMDLINE_LINUX_DEFAULT=\"nomodeset quiet rootflags=data=writeback\"\n```\n\nThen create boot.efi with GRUB:\n\n```sh\n# Create empty \"boot/grub/grub.cfg\" file if it not exist\ngrub-mkconfig -o boot/grub/grub.cfg\ngrub-mkstandalone -o boot.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi --compress xz boot/grub/grub.cfg\n```\n\n:heavy_exclamation_mark: Important: Copy boot.efi to your usb or upload it somewhere, we'll need this to dual boot with OSX.\n\nTo copy it to usb, use:\n\n```\nmkdir /mnt/myusb \u0026\u0026 mount /dev/sdb /mnt/myusb\ncp boot.efi /mnt/myusb/\n```\n\nOr upload it to [file.io](https://www.file.io/):\n\n```\ncurl -F \"file=@boot.efi\" https://file.io\n```\n\n## Reboot the System\n\nIf everything ok, now you can exit chroot and reboot (Back to OSX word)\n\n```sh\nexit             \u003c- (exit chroot environment)\numount -R /mnt\nreboot\n```\n\n## Make Artix Dual Bootable\n\nWhen OSX loaded. Using Disk Utility to format 128MB Apple HFS+ we have created \u0026 formatted before with `Journaled` format.\n\nThen create this file structure inside:\n\n```\n|___mach_kernel   \n|___System   \n    |___Library   \n        |___CoreServices   \n            |___SystemVersion.plist   \n            |___boot.efi              \u003c- (is the boot.efi file we'v copied or uploaded in the previous step)  \n```\n\nAdd below content to `SystemVersion.plist`:\n\n```xml\n\u003cxml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cplist version=\"1.0\"\u003e\n\u003cdict\u003e\n    \u003ckey\u003eProductBuildVersion\u003c/key\u003e\n    \u003cstring\u003e\u003c/string\u003e\n    \u003ckey\u003eProductName\u003c/key\u003e\n    \u003cstring\u003eLinux\u003c/string\u003e\n    \u003ckey\u003eProductVersion\u003c/key\u003e\n    \u003cstring\u003eArtix Linux\u003c/string\u003e\n\u003c/dict\u003e\n\u003c/plist\u003e\n```\n\nThen reboot and hold \u003ckbd\u003ealt/option\u003c/kbd\u003e and enjoy Artix 😺\n\n# Install to make artix usable\n\n## Set tty default font\n\n:warning: Font in retina screen is very small, so this maybe the first step you should do . If you can see the font clearly, you don't have to do this step.\n\nInstall terminus-font (or whatever font you prefer, make sure it have large size): \n\n```sh\nsudo pacman -S terminus-font\n```\n\ncreate file `/etc/vconsole.conf` with content:\n\n```\nFONT=ter-132b\n```\n\nInstall these default fonts (to make browser look suckless):\n\n```\nyay -S ttf-mac-fonts ttf-ms-fonts ttf-opensans\n```\n\n## Install drivers\n\n```\nsudo pacman -S xf86-video-intel xf86-input-libinput mesa\n```\n\n## Install require packages\n\nUsing pacman to install all these packages:   \n\n|Package       | Description |\n|---           |---          |\n|xorg-server   | graphical server |\n|xorg-xinit    | starts graphical server |\n|xorg-xrandr   | resize \u0026 rotate utility for X |\n|xorg-xsetroot | utility to set your root window background to a given pattern or color |\n|xorg-xev      | indentifying keycodes |\n|picom         | lightweight compositor for X11 |\n|xwallpaper    | set wallpaper |\n|arandr        | UI for screen adjustment |\n\n## Install Window Manager\n\nI build my own [dwm](https://github.com/kyoz/dwm), [dmenu](https://github.com/kyoz/dmenu), [st](https://github.com/kyoz/st) from [suckless](https://suckless.org/)\n\nBut you can install any window manager you like\n\n\n\n## Bluetooth\npacman -S bluez bluez-runit bluez-utils\nln -s /etc/runit/sv/bluetoothd /run/runit/service\nsv start bluetoothd\nsv restart bluetoothd\n\nFor bluetooth audio device, install these\n```sh\nsudo pacman -S pulseaudio-alsa pulseaudio-bluetooth\n```\n\nYou may need install blueman for easily manage your bluetooth devices\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyoz%2Fmac-artix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyoz%2Fmac-artix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyoz%2Fmac-artix/lists"}