For systemd, the ability to boot system images via HTTP is being developed.

Lennart Poettering proposed to include a change in the system manager systemd that allows the system to boot using a root FS image obtained from an external host via HTTP. The change involves extending systemd with the capability not only to download a disk image via HTTP during the early boot stage but also to unpack the downloaded image, bind it to a block device in loopback mode, mount the block device as /sysroot, and boot the system from there.

Support for downloading disk images during system boot using systemd-import-generator has already been included in systemd 257. The remaining functionality is still in the prototype stage and requires further development. Currently, the implementation does not support a full boot cycle, but in the future, they plan to extend the functionality to support booting universal kernel images (UKI) through UEFI HTTP Boot, which combines the bootloader for UEFI (UEFI boot stub), the Linux kernel image, and the initial RAM filesystem (initrd) in one file.

The URL for downloading the system image is planned to be calculated based on the URL specified for the EFI image in the UEFI HTTP Boot settings (for example, when booting via EFI HTTP Boot "http://example.com/somedir/myimage.efi", the UKI initrd handler will download the rootfs image as "http://example.com/somedir/myimage.raw.xz"). In the future, in addition to HTTP, support for NVMe-over-TCP technology is planned to be added as a transport method for obtaining images, allowing access to NVMe drives over the network (NVM Express over Fabrics) using the TCP protocol.

It is expected that booting from images obtained from an external host will simplify the organization of testing modern immutable operating systems on real hardware. A developer can create an image with the system environment using the mkosi utility on their computer and make it available via HTTP with the command "mkosi -f serve". On the computer where the system needs to be tested, it is enough to enable HTTP boot in EFI and add the URL of the image to be downloaded with the command: kernel-bootcfg —add-uri=http://192.168.47.11:8081/image.efi —title=testloop —boot-order=0

After that, you can simply reboot the computer and it will load the standard UKI kernel image, which will then load the developer-prepared disk image with the root filesystem. Until the HTTP boot in EFI is disabled, each subsequent reboot of the computer will lead to loading a fresh system image. Local disks are not affected in this type of testing.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster