Hello,
I am upgrading our hardware inventory discovery liveCD (https://githubā¦.com/theforeman/foreman-discovery-image) from EL7 to EL8 and lorax, I have performed I hope all the necessary kickstart changes, the ISO image builds fine however livemedia-creator errors out with "Directory or file not found: /tmp". The error message is in Czech locale, I am using /tmp for faster builds (tmpfs) but I did try this on /var/tmp too with the same result:
```
sudo livemedia-creator --ks fdi-image.ks --make-iso --iso centos.iso --tmp /tmp
2021-05-18 09:19:00,219: livemedia-creator v34.9-1
2021-05-18 09:19:00,219: selinux is enabled and in Permissive mode
2021-05-18 09:19:00,307: disk_img = /tmp/lmc-disk-mr2qmvzx.img
2021-05-18 09:19:00,307: Using disk size of 4002MiB
2021-05-18 09:19:00,307: install_log = /home/lzap/work/foreman-discovery-image/virt-install.log
2021-05-18 09:19:01,053: qemu vnc=127.0.0.1:0
2021-05-18 09:19:01,053: Running qemu
2021-05-18 09:19:01,077: Processing logs from ('127.0.0.1', 43800)
2021-05-18 09:24:22,108: Installation finished without errors.
2021-05-18 09:24:22,109: Shutting down log processing
2021-05-18 09:24:22,109: unmounting the iso
2021-05-18 09:24:22,128: Disk Image install successful
2021-05-18 09:24:22,128: working dir is /tmp/lmc-work-xpjl3jue
2021-05-18 09:24:22,172: Partition mounted on /tmp/tmpt7b80s77 size=4194304000
2021-05-18 09:24:22,172: Using disk size of 4002MiB
2021-05-18 09:24:22,204: [Errno 2] AdresĆ”Å nebo soubor neexistuje: '/tmp/tmpt7b80s77/boot'
```
The `centos.iso` symlink is a CentOS 8.3 full installation DVD. Kickstart is here (we do bit of injecting of some files and minimizing the image to the smallest possible size for PXE):
https://gist.github.com/lzap/3924956da758104e9276219ffe5239be
Additional logs:
```
2021-05-18 09:19:00,219 DEBUG livemedia-creator: Namespace(make_iso=True, make_disk=False, make_fsimage=False, make_appliance=False, make_ami=False, make_tar=False, make_tar_disk=False, make_pxe_live=False, make_ostree_live=False, make_oci=False, make_vagrant=False, iso='/home/lzap/work/foreman-discovery-image/centos.iso', iso_only=False, iso_name=None, ks=['/home/lzap/work/foreman-discovery-image/fdi-image.ks'], image_only=False, no_virt=False, proxy=None, anaconda_args=None, armplatform=None, location=None, logfile='/home/lzap/work/foreman-discovery-image/livemedia.log', lorax_templates=None, tmp='/tmp', result_dir=None, domacboot=True, extra_boot_args='', disk_image=None, keep_image=False, fs_image=None, image_name=None, tar_disk_name=None, fs_label='Anaconda', image_size_align=0, image_type=None, qemu_args=[], qcow2=False, compression='xz', compress_args=[], app_name=None, app_template=None, app_file='appliance.xml', ram=2048, vcpus=None, vnc=None, arch=None, kernel_args=None, ovmf_path='/usr/share/edk2/ovmf/', virt_uefi=False, no_kvm=False, with_rng='/dev/random', dracut_conf=None, dracut_args=None, live_rootfs_size=0, live_rootfs_keep_size=False, oci_config=None, oci_runtime=None, vagrant_metadata=None, vagrantfile=None, project='Linux', releasever='34', volid=None, squashfs_only=False, timeout=None)
2021-05-18 09:19:00,219 INFO livemedia-creator: livemedia-creator v34.9-1
2021-05-18 09:19:00,219 INFO pylorax: selinux is enabled and in Permissive mode
2021-05-18 09:19:00,307 INFO pylorax: disk_img = /tmp/lmc-disk-mr2qmvzx.img
2021-05-18 09:19:00,307 INFO pylorax: Using disk size of 4002MiB
2021-05-18 09:19:00,307 INFO pylorax: install_log = /home/lzap/work/foreman-discovery-image/virt-install.log
2021-05-18 09:19:00,308 DEBUG pylorax.imgutils: make tmp mountdir /tmp/lorax.imgutils.nl37yl_1
2021-05-18 09:19:00,984 DEBUG pylorax.imgutils: find /tmp/lmc-ksdir-hxqyz9sc -print0 |cpio --null --quiet -H newc -o | xz -T4 --check=crc32 -9 > /tmp/lmc-ks-q0g822st.img
2021-05-18 09:19:01,053 INFO pylorax: qemu vnc=127.0.0.1:0
2021-05-18 09:19:01,053 INFO pylorax: Running qemu
2021-05-18 09:19:01,053 DEBUG pylorax: ['qemu-system-x86_64', '-no-user-config', '-m', '2048', '-machine', 'accel=kvm', '-kernel', '/tmp/lorax.imgutils.nl37yl_1/isolinux/vmlinuz', '-initrd', '/tmp/lmc-initrd-_wx_h7kw.img', '-drive', 'file=/tmp/lmc-disk-mr2qmvzx.img,cache=unsafe,discard=unmap,format=raw', '-drive', 'file=/home/lzap/work/foreman-discovery-image/centos.iso,media=cdrom,readonly=on', '-append', 'ks=file:/fdi-image.ks inst.stage2=hd:LABEL=CentOS-8-3-2011-x86_64-dvd inst.text inst.cmdline', '-nographic', '-monitor', 'none', '-serial', 'null', '-display', 'vnc=127.0.0.1:0', '-device', 'virtio-serial-pci,id=virtio-serial0', '-device', 'virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.fedoraproject.anaconda.log.0', '-chardev', 'socket,id=charchannel0,host=127.0.0.1,port=40401', '-object', 'rng-random,id=virtio-rng0,filename=/dev/random', '-device', 'virtio-rng-pci,rng=virtio-rng0,id=rng0,bus=pci.0,addr=0x9']
2021-05-18 09:19:01,077 INFO livemedia-creator: Processing logs from ('127.0.0.1', 43800)
2021-05-18 09:24:22,108 INFO pylorax: Installation finished without errors.
2021-05-18 09:24:22,109 INFO livemedia-creator: Shutting down log processing
2021-05-18 09:24:22,109 INFO pylorax: unmounting the iso
2021-05-18 09:24:22,127 DEBUG pylorax.imgutils: remove tmp mountdir /tmp/lorax.imgutils.nl37yl_1
2021-05-18 09:24:22,128 INFO pylorax: Disk Image install successful
2021-05-18 09:24:22,128 INFO pylorax: working dir is /tmp/lmc-work-xpjl3jue
2021-05-18 09:24:22,163 DEBUG pylorax.imgutils: add map loop0p1 (253:8): 0 8192000 linear 7:0 2048
2021-05-18 09:24:22,172 INFO pylorax.imgutils: Partition mounted on /tmp/tmpt7b80s77 size=4194304000
2021-05-18 09:24:22,172 INFO pylorax: Using disk size of 4002MiB
2021-05-18 09:24:22,204 ERROR livemedia-creator: [Errno 2] AdresĆ”Å nebo soubor neexistuje: '/tmp/tmpt7b80s77/boot'
```
Also:
```
2021-05-18 09:19:00,308 INFO: Running... mount -o loop /home/lzap/work/foreman-discovery-image/centos.iso /tmp/lorax.imgutils.nl37yl_1
2021-05-18 09:19:00,325 INFO: mount: /tmp/lorax.imgutils.nl37yl_1: WARNING: source write-protected, mounted read-only.
2021-05-18 09:19:00,325 DEBUG: Return code: 0
2021-05-18 09:19:01,053 INFO: Running... qemu-system-x86_64 -no-user-config -m 2048 -machine accel=kvm -kernel /tmp/lorax.imgutils.nl37yl_1/isolinux/vmlinuz -initrd /tmp/lmc-initrd-_wx_h7kw.img -drive file=/tmp/lmc-disk-mr2qmvzx.img,cache=unsafe,discard=unmap,format=raw -drive file=/home/lzap/work/foreman-discovery-image/centos.iso,media=cdrom,readonly=on -append ks=file:/fdi-image.ks inst.stage2=hd:LABEL=CentOS-8-3-2011-x86_64-dvd inst.text inst.cmdline -nographic -monitor none -serial null -display vnc=127.0.0.1:0 -device virtio-serial-pci,id=virtio-serial0 -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.fedoraproject.anaconda.log.0 -chardev socket,id=charchannel0,host=127.0.0.1,port=40401 -object rng-random,id=virtio-rng0,filename=/dev/random -device virtio-rng-pci,rng=virtio-rng0,id=rng0,bus=pci.0,addr=0x9
2021-05-18 09:24:22,103 DEBUG: Return code: 0
2021-05-18 09:24:22,109 INFO: Running... umount /tmp/lorax.imgutils.nl37yl_1
2021-05-18 09:24:22,127 DEBUG: Return code: 0
2021-05-18 09:24:22,128 INFO: Running... kpartx -v -a -s /tmp/lmc-disk-mr2qmvzx.img
2021-05-18 09:24:22,162 INFO: add map loop0p1 (253:8): 0 8192000 linear 7:0 2048
2021-05-18 09:24:22,163 DEBUG: Return code: 0
2021-05-18 09:24:22,163 INFO: Running... mount /dev/mapper/loop0p1 /tmp/tmpt7b80s77
2021-05-18 09:24:22,171 DEBUG: Return code: 0
2021-05-18 09:24:22,173 INFO: Running... umount /tmp/tmpt7b80s77
2021-05-18 09:24:22,178 DEBUG: Return code: 0
2021-05-18 09:24:22,178 INFO: Running... kpartx -d -s /tmp/lmc-disk-mr2qmvzx.img
2021-05-18 09:24:22,204 DEBUG: Return code: 0
```
Virt-install log is bigger (will get deleted in 24 hours):
https://paste.centos.org/view/a9e864fe
Do you have an idea what could be culprit of this? This is clean Fedora 34 installation, I set SELinux to permissive. I cannot find any verbose or debug logging of the tool, I do not understand what lorax is trying to do with the /boot directory (is that a mounted ISO image?).
I'd appreciate if you could give my KS a spin to figure out. Or let me know what do I need to test. Thanks.