...
Description of problem: Tar compose type created by os-build does not include some of the mandatory packages which can cause system installed with tar file (using liveimg command) to be unbootable. If we create an empty blueprint as per below to create `tar` compose and then use the tar file created to install a system using Boot ISO and Kickstart file which points to tar file using the liveimg command. ~~~ cat blueprint-test-1.toml name = "blueprint-test-1" description = "LONG FORM DESCRIPTION TEXT" version = "0.0.1" modules = [] groups = [] [[packages]] name = "tmux" version = "*" ~~~ Depsolve show that this does not add the grub or shim or efibootmgr or lvm or xfs related rpms. ~~~ composer-cli blueprints depsolve blueprint-test-1 | grep -e tmux -e grub -e efibootmgr -e lvm -e shim -e xfs -e authselect -e subscription-manager tmux-3.2a-4.el9.x86_64 ~~~ There are not booting related file created. ~~~ compose-cli compose image 9fea8c6c-1c17-43f6-b07e-f7c4e91d4506 9fea8c6c-1c17-43f6-b07e-f7c4e91d4506-root.tar.xz tar -tvf 9fea8c6c-1c17-43f6-b07e-f7c4e91d4506-root.tar.xz | grep /boot drwx------ root/root 0 2023-04-12 18:36 ./var/lib/selinux/targeted/active/modules/100/bootloader/ rw------ root/root 4238 2023-02-16 18:23 ./var/lib/selinux/targeted/active/modules/100/bootloader/cil rw------ root/root 12610 2023-02-16 18:23 ./var/lib/selinux/targeted/active/modules/100/bootloader/hll rw------ root/root 2 2023-02-16 18:23 ./var/lib/selinux/targeted/active/modules/100/bootloader/lang_ext rw-rr- root/root 463 2022-01-18 17:05 ./usr/lib/systemd/system/boot-complete.target rw-rr- root/root 256 2022-07-15 14:00 ./usr/lib/firmware/RTL8192E/boot.img.xz rw-rr- root/root 232 2022-07-15 14:00 ./usr/lib/firmware/av7110/bootcode.bin.xz rw-rr- root/root 192 2022-07-15 14:00 ./usr/lib/firmware/dsp56k/bootstrap.bin.xz rw-rr- root/root 3808 2022-07-15 14:00 ./usr/lib/firmware/edgeport/boot.fw.xz rw-rr- root/root 3592 2022-07-15 14:00 ./usr/lib/firmware/edgeport/boot2.fw.xz rw-rr- root/root 4636 2023-02-13 21:21 ./usr/share/man/man7/bootup.7.gz dr-xr-xr-x root/root 0 2023-04-12 18:36 ./boot/ rw------ root/root 16860183 2023-04-12 18:36 ./boot/initramfs-5.14.0-162.23.1.el9_1.x86_64.img ~~~ I used the following Kickstart to do the installation where the URL with liveimg points to this tar along with RHEL 9.1 Boot ISO the installation fails during the post installation stage where the grub command are run by anaconda. ~~~ text firstboot --enable keyboard --vckeymap=us --xlayouts='us' lang en_US.UTF-8 timezone America/New_York --utc liveimg --url http://192.168.122.25/liveimg-tests/9fea8c6c-1c17-43f6-b07e-f7c4e91d4506-root.tar.xz authselect --enableshadow --passalgo=sha512 rootpw --iscrypted XXXXXXXXX user --groups=wheel --name=ameya --password=XXXXXXX --iscrypted --gecos="ameya" network --hostname=rhel9-default.test.local --bootproto=dhcp --onboot=yes --ipv6=auto --activate bootloader --append=" crashkernel=auto console=tty0 console=ttyS0,115200n8" --location=mbr ignoredisk --only-use=vda clearpart --all --initlabel autopart --type=lvm ~~~ After experimenting with the packages needed for the installation to complete and the system to reboot sucessfully after installation with BIOS as well as UEFI and for lvm as well as standard partitioning. I have listed the error which I used to receive when I skip the package in the comment in the blueprints below. ~~~ cat blueprint-test-2.toml name = "blueprint-test-2" description = "LONG FORM DESCRIPTION TEXT" version = "0.0.1" modules = [] groups = [] For EFI support Pulls necessary deps for both BIOS as well as UEFI grub packages such as grub2-tools which provide grub2-mkconfig and other utilities. For UEFI - dasbus.error.DBusError: [Errno 2] No such file or directory: '/mnt/sysroot/boot/efi/EFI/redhat/grub.cfg' FOR BIOS - dasbus.error.DBusError: [Errno 2] No such file or directory: 'grub2-editenv' [[packages]] name = "grub2-efi-x64" version = "*" Needed for secure boot. Secure boot does not work without this. [[packages]] name = "shim-x64" version = "*" Required for UEFI system after grub is installed. #dasbus.error.DBusError: [Errno 2] No such file or directory: 'efibootmgr' [[packages]] name = "efibootmgr" version = "*" For BIOS Support Need grub2-pc-modules for grub2-install command to work. grub2-install fails with missing /usr/lib/grub/i386-pc/modinfo.sh [[packages]] name = "grub2-pc-modules" version = "*" xfsprogs required otherwise the xfs_freeze command ran just before grub2-install fails. #INFO:program:Running... xfs_freeze -u /boot #ERROR:program:Error running xfs_freeze: No such file or directory #ERROR:blivet:failed to sync filesytem: [Errno 2] No such file or directory: 'xfs_freeze' Note I have not install "e2fsprogs" because the automatic partitioning used by Anaconda is XFS , however using Kickstart with ext4 partitioning, I think will require it. [[packages]] name = "xfsprogs" version = "*" For LVM support in both UEFI and BIOS Error - Cant install on an LVM device , it fails during the filesystem check during the first boot. [[packages]] name = "lvm2" version = "*" For authselect to be able to run post installation pyanaconda.modules.common.errors.installation.SecurityInstallationError: /usr/bin/authselect is missing. Cannot setup authentication. [[packages]] name = "authselect" version = "*" Subscription-manager is not installed by default so the system cant be subscribed. [[packages]] name = "subscription-manager" version = "*" ~~~ Version-Release number of selected component (if applicable): The installation of system using Kickstart was also done using RHEL 9.1 ISO The tar was created with Latest RHEL 9.1 packages ~~~ rpm -qa | grep osbuild osbuild-composer-dnf-json-62.1-3.el9_1.x86_64 osbuild-composer-core-62.1-3.el9_1.x86_64 python3-osbuild-65-1.el9.noarch osbuild-65-1.el9.noarch osbuild-selinux-65-1.el9.noarch osbuild-ostree-65-1.el9.noarch osbuild-luks2-65-1.el9.noarch osbuild-lvm2-65-1.el9.noarch osbuild-composer-worker-62.1-3.el9_1.x86_64 osbuild-composer-62.1-3.el9_1.x86_64 ~~~ How reproducible: Everytime Steps to Reproduce: 1. Create a tar compose with a short test blueprint. ~~~ cat blueprint-test-1.toml name = "blueprint-test-1" description = "LONG FORM DESCRIPTION TEXT" version = "0.0.1" modules = [] groups = [] [[packages]] name = "tmux" version = "*" composer-cli blueprints push blueprint-test-1.toml composer-cli blueprints show blueprint-test-1 composer-cli compose start blueprint-test-1 tar ~~~ 2. Download the tar image and use it for installation with a test kickstart. ~~~ composer-cli compose image <UUID> mkdir -v /var/www/html/liveimg-tests/ cp -v <UUID>-root.tar.xz /var/www/html/liveimg-tests/ yum install httpd -y ; systemctl enable --now httpd ; firewall-cmd --add-service=http cat /var/www/html/liveimg-tests/rhel9.ks text firstboot --enable keyboard --vckeymap=us --xlayouts='us' lang en_US.UTF-8 timezone America/New_York --utc liveimg --url http://192.168.122.25/liveimg-tests/9fea8c6c-1c17-43f6-b07e-f7c4e91d4506-root.tar.xz authselect --enableshadow --passalgo=sha512 rootpw --iscrypted XXXXXXXXX user --groups=wheel --name=ameya --password=XXXXXXX --iscrypted --gecos="ameya" network --hostname=rhel9-default.test.local --bootproto=dhcp --onboot=yes --ipv6=auto --activate bootloader --append=" crashkernel=auto console=tty0 console=ttyS0,115200n8" --location=mbr ignoredisk --only-use=vda clearpart --all --initlabel autopart --type=lvm ~~~ 3. Install using the Kickstart to try to boot on UEFI or BIOS. Boot with RHEL 9.1 ISO and add the boot parameter for Kickstart inst.ks=http://192.168.122.25/rhel9.ks Actual results: System does not install if there is no package mentioned. It also fails for first boot if you have few pacakges like grub/shim pacakges and not LVM but the installation was done with LVM enabled. Expected results: The tar image help install sucessfully and also boot sucessfully first boot. Additional info: Other compose like qcow2/ami/etc. contain these packages on the installed system by default even with the same blueprint which does not listed them specifically.
Won't Do