FAI for Linux on Apple Silicon?
Thomas Lange
lange at cs.uni-koeln.de
Fri Jan 17 12:00:21 CET 2025
Hi,
I've already successfully booted an ARM64 server via UEFI/PXE using
FAI. No installation was done, because this was a special FAI
environment, were no installation is needed, but some hardware testing
tools are used.
FAI 6.2.5 also includes some new code for creating a FAI-CD for
arm64. I could not test it myself because of missing hardware.
I've read that the M1 CPU needs a kernel using 16k pages.
I guess you mean Asahi not Avahi which is something different.
Not sure if Apple can do UEFI or if it needs a signed kernel (and
initrd) image.
I've just created a generic nfsroot using a 16k pages kernel from
Debian backports. It's available from:
https://fai-project.org/download/misc/
A short info is in /root/README inside the nfsroot.
You may try to PXE boot this nfsroot.
The DHCP config needs to be adjusted for ARM64 and the tftp directory
also needs additional parts.
Add this to dhcpd.conf:
if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00011" {
filename "boot/grub/grubnetaa64.efi";
}
Add this file:
# cp /srv/fai/nfsroot/usr/lib/grub/arm64-efi/monolithic/grubnetaa64.efi /srv/tftp/boot/grub/grubnetaa64.efi
Then you need a grub.cfg in /srv/tftp/grub/grub.cfg:
insmod all_video
insmod efi_gop
terminal_output gfxterm
set timeout=3
echo === GRUB grub.cfg geladen
sleep 3
menuentry 'FAI network boot' {
echo 'Loading FAI kernel ...'
sleep 1
linux $prefix/vmlinuz-6.5.0-5-arm64 ip=dhcp root=192.168.33.250:/srv/fai/nfsroot-arm:vers=3 rootovl FAI_FLAGS=verbose,sshd,createvt FAI_CONFIG_SRC=nfs://faiserver/srv/fai/config FAI_ACTION=install
echo 'Loading FAI initrd ...'
sleep 1
initrd $prefix/initrd.img-6.5.0-5-arm64
}
Here you must adjust the kernel and initrd names/versions.
Copy kernel and initrd into this dir:
# cp -pv /srv/fai/nfsroot/boot/vmlinu* /srv/fai/nfsroot/boot/initrd* /srv/tftp/grub/
# chmod a+r /srv/fai/nfsroot/boot/initrd*
It' more than a year ago, that I've test this. Please sent me any feeback.
I will try to build a FAI-CD for ARM64 in the next days.
--
best regards Thomas
More information about the linux-fai
mailing list