NiKiZe / Gentoo-iPXE

Sample to support iPXE boot of Gentoo Minimal livecd
https://gentoo.ipxe.se/
MIT License
19 stars 4 forks source link

Try to get files into squashfs without rebuild #6

Open NiKiZe opened 3 years ago

NiKiZe commented 3 years ago

Often customizations is wanted to pxe booted machines, such as init scripts, or config files (public ssh keys) It would be nice to have this without need for squashfs rebuilds, maybe that is possible already, but could do with documentation if it is. And if not we want to be able to transfer files from initrd root (which can be modified by appending to cpio) to the "realroot" (new root when switching to squashfs)

This is in part in reference to numberly/gentoo-pxe-builder#5 Another usecase is the mess at https://github.com/ASoft-se/Gentoo-HAI/blob/master/gentoocd_unpack.sh#L68-L72

NiKiZe commented 3 years ago

cdupdate.sh should be usable, investigate this

https://github.com/gentoo/genkernel/blob/369cfa98f72675a285ec98439e9054ab57b234c9/defaults/linuxrc#L1274

https://github.com/gentoo/genkernel/blob/369cfa98f72675a285ec98439e9054ab57b234c9/defaults/initrd.scripts#L2469-L2491

ASoft-se/Gentoo-HAI#8 Mentions this Gentoo bug #593866 Resolved in gentoo/genkernel@3a005bbaea41cf1e87e6a256bbf9e53cd26584a9

NiKiZe commented 3 years ago

So create a cpio directory structure, add basic cdupdate.sh and folders for possible data with .keep files

local.d for x.start files bashrc extensions root user dir (fix .ssh and authorization keys)

Make sure all this can support Gentoo-HAI testing.