Builds a minimal Rocky Linux image to run on Apple silicon systems
![](https://private-user-images.githubusercontent.com/12903289/291026145-567206d3-c2bd-42fa-b1a7-b3c9e0dd553a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTI5MDAxNTEsIm5iZiI6MTcxMjg5OTg1MSwicGF0aCI6Ii8xMjkwMzI4OS8yOTEwMjYxNDUtNTY3MjA2ZDMtYzJiZC00MmZhLWIxYTctYjNjOWUwZGQ1NTNhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDEyVDA1MzA1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFiMjJmZDVhMGUzMzIyOWZjZTBhNDcyMDQ5ZWQyNDVjYzcwMWI3NzE4YTBhZThmNmRmYWFmY2JkMGYzOWNhNjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.5cclAxn1fZWmpuYgP88rZHmh9Cht_24ZEiM5Tzxut2k)
Make sure to update your macOS to version 13.5 or later, then just pull up a Terminal in macOS and paste in this command:
curl https://leifliddy.com/rocky.sh | sh
This image was built on a Fedora system
dnf install arch-install-scripts bubblewrap mkosi systemd-container zip
- The
qemu-user-static
package is needed if building the image on anon-aarch64
system - This project is based on
mkosi v20
which matches the current version ofmkosi
in theF39
repo
https://src.fedoraproject.org/rpms/mkosi/
However....mkosi
is updated so quickly that it's difficult to keep up at times (I have several projects based onmkosi
)
I'll strive to keep things updated to the latest version supported in Fedora
If needed, you can always install a specific version via pip
python3 -m pip install --user git+https://github.com/systemd/mkosi.git@v20
- The root password is rocky
- On the first boot the
asahi-firstboot.service
will run, selinux will be set to enforcing and the system will reboot. - This project utilizes rebuilt packages from the
Asahi Fedora Remix
project
https://leifliddy.com/asahi-linux/9/aarch64/
NetworkManager
is enabled by default.
To connect to a wireless network, use the following sytanx:
nmcli dev wifi connect network-ssid
An actual example:
nmcli dev wifi connect blacknet-ac password supersecretpassword
Bring up a Terminal in macOS and run the following Asahi Linux script:
sudo curl -L https://alx.sh/wipe-linux | sh
You should definitely understand what this script does before running it. You can find more info here:
https://github.com/AsahiLinux/docs/wiki/Partitioning-cheatsheet
Once Linux is installed, you can then boot a compatible usb drive via u-boot
This project will create a bootable Rocky Linux USB drive for Apple silicon systems:
https://github.com/leifliddy/asahi-rocky-usb
echo 'SUBSYSTEM=="power_supply", KERNEL=="macsmc-battery", ATTR{charge_control_end_threshold}="80"' | sudo tee /etc/udev/rules.d/10-battery.rules
The light
command can be used to adjust the screen and keyboard backlight.
light -s sysfs/leds/kbd_backlight -S 10
light -s sysfs/backlight/apple-panel-bl -S 50
On high-DPI displays, the terminal fonts (on the console) appear extremely small
To increase the size, edit /etc/vconsole.conf
and specify a larger font size, such as:
FONT="latarcyrheb-sun32"
Then update grub for the change to take effect
grub2-mkconfig -o /boot/grub2/grub.cfg