random notes

How to test and boot FreeBSD memstick over ipxe
Login

How to test and boot FreeBSD memstick over ipxe

Context

OVHCloud baremetal boot everything machine with ipxe, a user can push his own ipxe script for provisioning via API.

baremetal machines can be either EFI or legacy boot, always amd64

being able to boot over syslinux memdisk would allow to have home made recuse image, or to spawn the installer.

Testing under qemu

Install the needed packages

$ pkg install ipxe syslinux qemu

Create a ipxe script

#!ipxe
initrd https://download.freebsd.org/snapshots/ISO-IMAGES/15.0/FreeBSD-15.0-CURRENT-amd64-20240509-ce7756fdca1f-270021-mini-memstick.img
chain https://bapt.nours.eu/memdisk harddisk raw

The memdisk here is the one provided by the syslinux package

Run qemu

$ qemu-system-x86_64 -boot n -m 4g -cdrom /usr/local/share/ipxe/ipxe.iso -k de  -device virtio-net,netdev=n1 -netdev user,id=n1,tftp=$(pwd),bootfile=/freebsd.ipxe

it is supposed to boot