Upstream uses these paths: boot/fdi-image/vmlinuz0 initrd=boot/fdi-image/initrd0.img But downstream we have: boot/fdi-image-rhel_7-vmlinuz initrd=boot/fdi-image-rhel_7-img We need to keep copying PXE templates for every release, let's ditch it and create symlinks downstream.
diff --git a/foreman-discovery-image.spec.tmpl b/foreman-discovery-image.spec.tmpl index f81f322..4f71678 100644 --- a/foreman-discovery-image.spec.tmpl +++ b/foreman-discovery-image.spec.tmpl @@ -66,6 +66,9 @@ cp %{app_root}/tftpboot/initrd0.img %{boot_dir}/%{iso_filename}-img cd %{boot_dir} ln -snf %{iso_filename}-vmlinuz %{image_full_name}-vmlinuz ln -snf %{iso_filename}-img %{image_full_name}-img +mkdir fdi-image +ln -snf fdi-image/vmlinuz0 %{image_full_name}-vmlinuz +ln -snf fdi-image/initrd0.img %{image_full_name}-img rm -rf %{app_root}/fdi.iso %{app_root}/tftpboot @@ -84,6 +87,8 @@ rm -rf %{boot_dir}/%{iso_filename}-vmlinuz \ %{_datarootdir}/%{name}/%{name}.ks %ghost %{boot_dir}/%{iso_filename}-vmlinuz %ghost %{boot_dir}/%{iso_filename}-img +%ghost %{boot_dir}/fdi-image/vmlinuz0 +%ghost %{boot_dir}/fdi-image/initrd0.img %ghost %{boot_dir}/%{image_full_name}-vmlinuz %ghost %{boot_dir}/%{image_full_name}-img
QA NOTES: 1) Install foreman-discovery-image RPM 2) Verify there are no post RPM scriplet errors 3) Verify that these symlinks are valid: cd /var/lib/tftpboot/boot ls fdi-image/vmlinuz0 -> kernel file fdi-image/initrd0.img -> initrd file
REL-ENG: This is a FDI SPEC change, see the patch in comment 2.
This BZ must be part of our next FDI build for 6.4. Setting depends-on.
VERIFIED on sat6.4.0-21 # yum install foreman-discovery-image ============================================================================================================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================================================================================================== Installing: foreman-discovery-image noarch 1:3.5.2-1.el7sat Sat6-CI_Red_Hat_Satellite_6_4_Composes_Satellite_6_4_RHEL7 210 M Transaction Summary ============================================================================================================================================================================================================================================== Install 1 Package Total download size: 210 M Installed size: 239 M Is this ok [y/d/N]: y Installed: foreman-discovery-image.noarch 1:3.5.2-1.el7sat [root@intel-lizardhead-02 fdi-image]# ll /var/lib/tftpboot/boot total 0 drwxr-xr-x. 2 foreman-proxy root 139 Sep 10 04:38 fdi-image [root@intel-lizardhead-02 fdi-image]# ll /var/lib/tftpboot/boot/fdi-image/ total 213992 -rw-r--r--. 1 root root 212738406 Sep 10 04:38 foreman-discovery-image-3.5.2-1.iso-img -r--r--r--. 1 root root 6381872 Sep 10 04:38 foreman-discovery-image-3.5.2-1.iso-vmlinuz lrwxrwxrwx. 1 root root 39 Sep 10 04:38 initrd0.img -> foreman-discovery-image-3.5.2-1.iso-img lrwxrwxrwx. 1 root root 43 Sep 10 04:38 vmlinuz0 -> foreman-discovery-image-3.5.2-1.iso-vmlinuz
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, 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/RHBA-2018:2928