FAI for Linux on Apple Silicon?
Steffen Grunewald
steffen.grunewald at aei.mpg.de
Fri Jan 17 15:01:07 CET 2025
Hi Thomas,
On Fri, 2025-01-17 at 12:00:21 +0100, Thomas Lange wrote:
> 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.
I had installed Stretch and Buster on a ThunderX machine, via FAI,
quite a while ago.
Unfortunately I'm now stuck with old kernels as the box won't boot
any recent one.
> 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 never used a FAI-CD on any architecture...
> I've read that the M1 CPU needs a kernel using 16k pages.
That's something that looks important, nicely spotted!
> I guess you mean Asahi not Avahi which is something different.
Indeed. This must have been autocorrect in action, replacing Japanese
beer with something more computer-related ;)
> Not sure if Apple can do UEFI or if it needs a signed kernel (and
> initrd) image.
That's actually what I wanted to know. Others may help, perhaps?
(Maybe, as a first step, there's a hidden means to make the boot process
more verbose and non-graphic?)
> 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/
Thanks, downloaded, will go and analyze it.
> A short info is in /root/README inside the nfsroot.
> You may try to PXE boot this nfsroot.
Will do as soon as I know how...
Random thought: Would this also run on a more "normal" ARM64 machine?
> Add this to dhcpd.conf:
>
> if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00011" {
> filename "boot/grub/grubnetaa64.efi";
> }
I've been using this for years now ;) but I'm using the signed one, should
I revert this?
> 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.
Perhaps I'll go and try this with the ThunderX.
> 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*
My directory structure is a bit different but I understand what you mean.
Shouldn't the second command change the copy, not the source of the initrd?
> It' more than a year ago, that I've test this. Please sent me any feeback.
Will do as soon as I've got time to address the machine. Maybe next week,
maybe after mid-February...
> I will try to build a FAI-CD for ARM64 in the next days.
Your choice; I won't use it ;)
Thanks so far,
Steffen
--
Steffen Grunewald, Cluster Administrator
Max Planck Institute for Gravitational Physics (Albert Einstein Institute)
Am Mühlenberg 1 * D-14476 Potsdam-Golm * Germany
~~~
Fon: +49-331-567 7274
Mail: steffen.grunewald(at)aei.mpg.de
~~~
More information about the linux-fai
mailing list