Bug 1578290 - Unify kernel and initramdisk path with upstream
Summary: Unify kernel and initramdisk path with upstream
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Discovery Image
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.4.0
Assignee: Lukas Zapletal
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks: 1572980 1598020
TreeView+ depends on / blocked
 
Reported: 2018-05-15 08:17 UTC by Lukas Zapletal
Modified: 2019-11-05 23:19 UTC (History)
7 users (show)

Fixed In Version: foreman-discovery-image-3.5.1
Doc Type: Release Note
Doc Text:
Starting from Satellite 6.4, the paths to the foreman discovery image are changed to conform with upstream: * `boot/fdi-image-rhel_7-vmlinuz` > `boot/fdi-image/vmlinuz0` * `initrd=boot/fdi-image-rhel_7-img` > `boot/fdi-image/initrd0.img` It was leading to issues with PXE templates previously. Now the new global templates already contains the new paths.
Clone Of:
Environment:
Last Closed: 2018-10-16 16:48:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1611525 0 unspecified CLOSED mkdir: cannot create directory ‘fdi-image’: File exists while installing discovery image 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1611541 0 unspecified CLOSED Broken symlink for initrd0.img and vmlinuz0 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2018:2928 0 None None None 2018-10-16 16:49:14 UTC

Internal Links: 1611525 1611541

Description Lukas Zapletal 2018-05-15 08:17:20 UTC
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.

Comment 1 Lukas Zapletal 2018-05-15 08:24:56 UTC
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

Comment 3 Lukas Zapletal 2018-05-15 08:26:50 UTC
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

Comment 8 Lukas Zapletal 2018-05-30 07:41:54 UTC
REL-ENG: This is a FDI SPEC change, see the patch in comment 2.

Comment 11 Lukas Zapletal 2018-07-20 08:59:33 UTC
This BZ must be part of our next FDI build for 6.4. Setting depends-on.

Comment 14 Roman Plevka 2018-09-10 08:43:11 UTC
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

Comment 16 errata-xmlrpc 2018-10-16 16:48:22 UTC
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


Note You need to log in before you can comment on or make changes to this bug.