Score:1

Is it possible to deploy fully configured CentOS 8 installations over PXE? Non-interactive

am flag

I have ~30 machines scattered around a ship that management wants to use to show our web app.

I have a central virtualisation cluster with a mirror and PXE server on it.

I've been able to PXE boot into a fresh CentOS 8 ISO from the remote machines, and am looking into configuring it post deployment with %post or ansible.

However, what I'd really like to do is that a pre-configured VM, clone the filesystem, and deploy it to the remote. I kind of vibe that this could be done with liveimg in kickstart, but damned if I can make it work.

I've used these lines

xfsdump -l 0 - / | gzip -2 | ssh user@server dd of=/home/marine/image/server-full-backup-`date '+%d-%B-%Y'`.dump.gz

correlates to kickstart -

authconfig --enableshadow --passalgo=sha512

liveimg --url="ftp://server/pub/server-full-backup-20-September-2021.dump.gz"

or

tar -zcpf full-backup-`date '+%d-%B-%Y'`.tar.gz --directory / --exclude=mnt --exclude=proc --exclude=tmp --exclude home/marine/image .
authconfig --enableshadow --passalgo=sha512

liveimg --url="ftp://server/pub/full-backup-20-September-2021.tar.gz"

With both styles I end up at a dracut-initqueue emergency shell after it looks at downloading the archives.

  1. Is what I'm trying to do actually possible / sensible?
  2. How would one actually use kickstart to copy a whole filesystem? The docs just say

liveimg - Install from a disk image instead of packages. The image can be the squashfs.img file from a live ISO image, a compressed tar file (.tar, .tbz, .tgz, .txz, .tar.bz2, .tar.gz, or .tar.xz.), or any file system that the installation media can mount. Supported file systems are ext2, ext3, ext4, vfat, and xfs.

I've looked into mkisofs and clonezilla, I'm just at an awful crossroads of nothing suggesting it's particularly possible or impossible, and I'm doing a lot of chasing my own tail.

Thanks in advance

Michael Hampton avatar
cz flag
Have you considered [Image Builder](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/composing_a_customized_rhel_system_image/index)? This is the RHEL doc, but it works nearly identically on CentOS 8. You end up with a virtual machine image ready to go.
Score:1
cn flag

Late answer but I've used squashfs to create image files when deploying Fedora workstations during a kickstart.

See: https://elinux.org/Squash_FS_Howto for creating images, I can post my full solution if needed later as I don't have access to it right now.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.