CentOS / sig-cloud-instance-build

CentOS Cloud Instance SIG: Metadata to build & release instances
362 stars 168 forks source link

Missing package when run in container #172

Closed XenGi closed 4 years ago

XenGi commented 4 years ago

Trying to run this in a centos8 container because I have no centos installation in place. Gives me a strange error:

# ./containerbuild.sh centos-8.ks 
RPM yum-langpacks missing
# dnf search yum-langpacks
Last metadata expiration check: 0:05:32 ago on Tue 07 Apr 2020 11:44:34 AM UTC.
No matches found.

Even when I try it "the hard way" I can't figure out why it doesn't mount loopback devices. Doesn't even work with a privileged container. I'm now testing it in a VM but no luck in there either:

$ sudo livemedia-creator --make-tar --iso=boot8.iso --ks=centos-8.ks --image-name=centos8-root.tar.xz
2020-04-07 14:04:30,891: livemedia-creator v28.14.30-1
2020-04-07 14:04:30,892: selinux is enabled and in Permissive mode
2020-04-07 14:04:30,963: disk_img = /var/tmp/centos8-root.tar.xz
2020-04-07 14:04:30,963: Using disk size of 2MiB
2020-04-07 14:04:30,964: install_log = /home/xengi/sig-cloud-instance-build/docker/virt-install.log
2020-04-07 14:04:31,108: qemu vnc=127.0.0.1:0
2020-04-07 14:04:31,108: Running qemu
2020-04-07 14:04:31,172: Processing logs from ('127.0.0.1', 44146)
2020-04-07 14:05:24,196: Installation error detected. See logfile for details.
2020-04-07 14:05:24,196: VirtualInstall failed: QEMUInstall failed
2020-04-07 14:05:24,196: unmounting the iso
2020-04-07 14:05:24,214: Install failed: QEMUInstall failed
2020-04-07 14:05:24,214: ERROR: Image creation failed: QEMUInstall failed
2020-04-07 14:05:24,214: Image creation failed: QEMUInstall failed

I just need the equivalent of:

debootstrap /tmp/debian-rootfs buster http://deb.debian.org/debian
bsdtar cvf /tmp/debian-rootfs.tar.xz -C /tmp/debian-rootfs
XenGi commented 4 years ago

Found what I was looking for. I did that in a CentOS8 VM:

mkdir /tmp/root
cat /etc/yum.repos.d/CentOS-{Base,AppStream,Extras}.repo > /tmp/centos.repo
dnf -c /tmp/centos.repo  --disablerepo=* --enablerepo=AppStream --enablerepo=BaseOS --enablerepo=extras --disableplugin=* --installroot=/tmp/root --releasever=8 install centos-release basesystem