projectatomic / atomic

Atomic Run Tool for installing/running/managing container images.
Other
524 stars 139 forks source link

Installing CentOS atomic host 7 in VM with PXE and UEFI - is that known to work? #1259

Closed fencekicker closed 4 years ago

fencekicker commented 4 years ago

Hi,

This is more of a question than an actual issue. We have an OS image based on CentOS 7 atomic host and I was wondering if automated installation of the distro with PXE and UEFI is supposed to work. I've tried these instructions: https://wiki.fysik.dtu.dk/it/PXE_and_UEFI , but using the vmlinuz and initrd.img files from the atomic DVD (the 1902 version), and with this grub entry:

menuentry "Install CentOS 7" { set gfxpayload=keep linuxefi centos7/vmlinuz devfs=nomount ip=dhcp inst.ks=http://10.38.179.86/marshall/ks.cfg inst.repo=http://mirror.centos.org/centos-7/7.6.1810/os/x86_64 initrdefi centos7/initrd.img }

I'm trying to install a VM like this:

sudo virt-install --hvm --connect qemu:///system --network=bridge:virbr0 --pxe --graphics spice --boot uefi --name centos7-pxetest --ram=2048 --vcpus=2 --os-type=linux --os-variant=rhel7.6 --disk path=/data/qcows/centos7-pxetest.qcow2

If I try that, the installer fails with a weird error: "namespace OSTree not found". As far as I can tell, this line in the anaconda Python code fails - I guess a python module missing:

gi.require_version("OSTree", "1.0")

Not sure if anaconda is part of the initrd, and simply a different initrd would make a difference here.

I'm asking because the only thing I've found online about this is this RH bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1243543 . Besides a bunch of dead links, it has a pointer to a version that supposedly works. Diffing the two anaconda versions (I have 21.48.22.147-1, the good version is supposedly 23.16-1), I see a lot of EFI-related fixes.

The goal here is to create a disk image to deploy on actual hardware - we're booting a VM and customizing it, then we can dd that on the actual hardware box. We already have this approach working for an older platform, where we use legacy BIOS.

fencekicker commented 4 years ago

I've managed to make this use case work, with two tweaks to the above steps:

So this proved to be more of a kickstart / installer understanding issue.

fencekicker commented 4 years ago

Closing.