Created attachment 1649169 [details] Debug output of discovery-iso-to-pxe Description of problem: While using "/usr/bin/discovery-iso-to-pxe" utility to extact vmlinuz and initrd files from a foreman-discovery-image-XX.iso , It creates the initrd file by packing it the live image iso named foreman-discovery-image-XX.iso but expected is that it will have the need build with fdi.iso . Version-Release number of selected component (if applicable): Satellite 6.6 [ 6.5 and 6.4 as well ] How reproducible: Always Steps to Reproduce: 1. Install foreman-discovery-package on Satellite 2. Perform the steps as mentioned below. [root@syssat66 foreman-discovery-image]# /usr/bin/discovery-iso-to-pxe foreman-discovery-image-3.5.4-6.iso mount: /dev/loop0 is write-protected, mounting read-only Your pxeboot image is complete. Copy tftpboot/ subdirectory to /tftpboot or a subdirectory of /tftpboot. Set up your DHCP, TFTP and PXE server to serve /tftpboot/.../pxeboot.0 Note: The initrd image contains the whole CD ISO and is consequently very large. You will notice when pxebooting that initrd can take a long time to download. This is normal behaviour. [root@syssat66 foreman-discovery-image]# ll total 257148 -rw-r--r-- 1 root root 263192576 Aug 2 14:05 foreman-discovery-image-3.5.4-6.iso -rw-r--r-- 1 root root 119511 Aug 2 14:05 foreman-discovery-image.ks drwxr-xr-x 3 root root 79 Jan 2 06:51 tftpboot [root@syssat66 foreman-discovery-image]# ll tftpboot/ total 226272 -rw-r--r-- 1 root root 225032553 Jan 2 06:51 initrd0.img -rw-r--r-- 1 root root 26743 Jan 2 06:51 pxelinux.0 drwxr-xr-x 2 root root 21 Jan 2 06:51 pxelinux.cfg -r--r--r-- 1 root root 6635920 Jan 2 06:51 vmlinuz0 [root@syssat66 foreman-discovery-image]# cat tftpboot/pxelinux.cfg/default DEFAULT pxeboot TIMEOUT 20 PROMPT 0 LABEL pxeboot KERNEL vmlinuz0 APPEND rootflags=loop initrd=initrd0.img root=live:/foreman-discovery-image-3.5.4-6.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 nomodeset nomodeset fdi.defaultoptions ONERROR LOCALBOOT 0 [root@syssat66 foreman-discovery-image]# grep live /var/lib/tftpboot/pxelinux.cfg/default APPEND initrd=boot/fdi-image/initrd0.img rootflags=loop root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nokaslr nomodeset proxy.url=https://syssat66.gsslab.pnq2.redhat.com proxy.type=foreman Actual results: Getting "root=live:/foreman-discovery-image-3.5.4-6.iso" in APPEND line which means the initrd was packed with that live image. ~~~~~~~~~~~~~~~~~~~~~~~~ [root@syssat66 foreman-discovery-image]# cat tftpboot/pxelinux.cfg/default DEFAULT pxeboot TIMEOUT 20 PROMPT 0 LABEL pxeboot KERNEL vmlinuz0 APPEND rootflags=loop initrd=initrd0.img root=live:/foreman-discovery-image-3.5.4-6.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 nomodeset nomodeset fdi.defaultoptions ONERROR LOCALBOOT 0 ~~~~~~~~~~~~~~~~~~~~~~~~ Expected results: It should pack the initrd file with live image names fdi.iso and the same should reflect in the "tftpboot/pxelinux.cfg/default" file. Additional info: If someone attempts to extract the vmlinuz and initrd from any foreman-discovery-image-XX.iso and just place them inside "/var/lib/tftpboot/boot/fdi-image/" , It will fail with below error. [ 2.778722] localhost dracut-initqueue[474]: losetup: /fdi.iso: failed to set up loop device: No such file or directory But if we modify the APPEND section of "/var/lib/tftpboot/pxelinux.cfg/default " to point to correct ISO name, it will work. Attached the debug output of the command and it seems everywhere the ISO variable is being referred for the name of the image and that is being used while packing the initrd file.
Good analysis, fixed in: https://github.com/theforeman/foreman-discovery-image/commit/e4eaff5568272ae599190c33f9fbb1179c5e38e6 for Satellite 6.8.
(In reply to Lukas Zapletal from comment #3) > Good analysis, fixed in: > https://github.com/theforeman/foreman-discovery-image/commit/ > e4eaff5568272ae599190c33f9fbb1179c5e38e6 for Satellite 6.8. Thanks Lukas, for your prompt response on this one.
FAILED QA in sat6.8.0-17 Installed Packages foreman-discovery-image.noarch 1:3.6.5-1.el7sat @Sat6-CI_Satellite_6_8_Composes_Satellite_6_8_RHEL7 probably a packaging bug, the patch is not present in /usr/bin/discovery-iso-to-pxe
Looking into why this is not shipped, weird.
This was a problem in our rel-eng process, the image we were testing was actually 3.5.4. We would like to respin FDI version 3.6.7 to fix this issue but full re-test is needed.
MODIFIED, available in brew: https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1340957
VERIFIED on sat6.8.0-19
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Satellite 6.8 release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:4366