Since Gentoo Live now uses dracut
as initramfs handler, legacy documentation about diskless PXE is irrelevant.
The live
boot is supported directly by dracut
from root=
command line argument, but if we just pass
the image.squashfs
, the image won't be mounted correctly.
The special case where the squashfs image can be passed directly requires the image name to end with .img
With the latest iPXE trick, which allows specifying the filename inside the initramfs at load time, it allows to easily
fix loader by suffixing .img
to the squashfs file.
The boot.ipxe
provided as an example uses a remote HTTP server to serve kernel, initramfs and squashfs image,
which makes download way faster than syslinux http
or even tftp
. The initrd=magic.initrd
trick is not required
anymore since kernel 5.7+
(live runs 6.6.58
at the moment I write this).
There is no need to build combined initramfs anymore, etc. The provided example sets the root
password to root
and automatically starts sshd
on boot.
The extract.sh
script here mount
the ISO, which avoids any dependencies to be installed (except a kernel supporting ISO mounting, obviously). If you don't want to use mount
, you still can use any tools to extract files from the ISO. You need a minimal-install
ISO file.
By using isoinfo you can avoid the need for mounting.
https://github.com/NiKiZe/Gentoo-iPXE/blob/46c239ec9c76bc537f6b67ed9e5e0b3faf601056/gentoocd_unpack.sh#L42
Even better if Gentoo would publish these directly to avoid the need for extraction.
See the Gennto bug mentioned in NiKiZe/Gentoo-iPXE#2