danderson / netboot

Packages and utilities for network booting
Apache License 2.0
1.48k stars 179 forks source link

Support for Arch Linux #75

Open afq984 opened 5 years ago

afq984 commented 5 years ago

When booting Arch Linux via PXE [1], besides the kernel and initramfs, an additional the root filesystem image (airootfs.sfs) has to be transferred. If the location of airootfs.sfs is specified from the kernel command line then a boot hook will download it from the specified location [2][3][4][5].

It would be great if pixiecore could support:

  1. Serving additional static files (#73), so there is no need for running an additional HTTP/NFS/NBD server
  2. {{ ServerHost }} on the --cmdline flag (#74), so the address of the server does not have to be manually specified [6]

References/Notes:

[1] https://wiki.archlinux.org/index.php/PXE [2] https://git.archlinux.org/archiso.git/tree/configs/releng/syslinux/archiso_pxe.cfg?h=v39#n33 [3] https://git.archlinux.org/archiso.git/tree/docs/README.bootparams?h=v39#n92 [4] https://git.archlinux.org/archiso.git/tree/archiso/initcpio/hooks/archiso_pxe_http?h=v39#n4 [5] The fs image can be served from either HTTP/NFS/NBD, but as pixiecore already runs HTTP, I'd like it to be served from pixiecore [6] The archiso understands ${pxeserver}, but it resolves to the address of the DHCP server offering the IP address instead of the address of pixiecore

danderson commented 5 years ago

Thanks for filing this, and for the PRs to implement it! I'm looking at them now. I might have some requests to change how the passing of the rootfs works, because I'm not super happy with making quick boots depend on static file serving... But static file serving by itself can also be handy in some cases, so I'm thinking about how to maybe adjust things to have the best of both worlds.

Unfortunately I'm travelling right now, so it might take a few days to review in detail. I'll respond to this bug rather than individual PRs if I have suggestions for larger changes.

afq984 commented 5 years ago

Thanks for your input! Please let me elaborate more about the ideas behind the PRs.

(#76) The implemented quick boot command itself does not depend on serving static files. The rootfs image is also served on archlinux mirrors, and the quick boot command would instruct the PXE-booted OS to download it from the Internet via kernel cmdline.

(#73, #74) The {{ ServerHost }} and static file PRs for my use case, are aimed towards an Ethernet-only installation. It prevents generating huge amount of internet traffic when installing on tens of machines. I also find the HTTP server useful for the rootfs image as well as serving packages, configuration files & scripts, especially given the flexibility to modify the served content without requiring to set up a proper mirror.

wedi commented 4 years ago

I'd like to second this issue. This would help ubuntu users, too.

Since release 20.04 autoconfiguring machines via cloud-init is baked into Ubuntu's new default installer subiquity (docs). The easiest way to use it off cloud is via cloud-init's nocloud-net provider.

The nocloud-net provider expects an http(s) URL on the kernel command line from which it then downloads two files ./meta-data and ./user-data.

Autoinstalling without the need of any additional software would be just great.