Update driver included in discovery image

Problem:

Hey guys! We would like to provision some new workstation systems with an installed Intel l219-LM network adapter through the foreman discovery image. Unfortunately the installed network card, needs a more recent intel e1000e driver version, to initialize the installed network card. (https://access.redhat.com/solutions/2521021)

As a quick solution, I installed the latest driver version via rpm from https://centos.pkgs.org/7/elrepo-x86_64/kmod-e1000e-3.8.4-2.el7_8.elrepo.x86_64.rpm.html on my local machine, compressed the included e1000e.ko and rebuild the initrd included in the discovery-image with the downloaded kernel module.

Basically I did the following:

  1. Extract the initrd

    /usr/lib/dracut/skipcpio initrd0.img | gunzip -c | cpio -i -d

  2. Compress the provided e1000e.ko

  3. Overwrite the included e1000e.ko file in the initrd directory tree

  4. Rebuild the initramdisk

    find . | cpio --create --format=‘newc’ > /tmp/newinitramfs
    gzip -S .img /tmp/newinitramfs

  5. Overwrite the initrd0.img included in fdi

  6. Generate a new fdi with mkisofs

Unfortunately, when I boot from this newly created fdi, log into the live system and load the included e1000e.ko kernel module via modprobe, I get the old version of this driver module!? Where does this module come from? Is it included in the kernel used by the fdi?

The more recent version of this kernel module, which I overwrit before is correctly included in the generated /isolinux/initrd0.img !?

Extracted initrd0.img on the live system:

[root@fdi tmp]# modinfo ./usr/lib/modules/3.10.0-1062.1.2.el7.x86_64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko.xz
filename:       /tmp/./usr/lib/modules/3.10.0-1062.1.2.el7.x86_64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko.xz
**version:        3.8.4-NAPI**
license:        GPL
description:    Intel(R) PRO/1000 Network Driver
author:         Intel Corporation, <linux.nics@intel.com>
retpoline:      Y
rhelversion:    7.8
srcversion:     5507E646B9C1006005CF01C

Included e1000e.ko.xz in /usr/lib/modules/

[root@fdi ~]# modinfo e1000e
filename:       /lib/modules/3.10.0-1062.1.2.el7.x86_64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko.xz
**version:        3.2.6-k**
license:        GPL v2
description:    Intel(R) PRO/1000 Network Driver
author:         Intel Corporation, <linux.nics@intel.com>
retpoline:      Y
rhelversion:    7.7
srcversion:     043110184A2E8C433DE02E1

Maybe @lzap could help? :slight_smile: Is there any better way to update the included driver?

Many thanks & Best regards!

Expected outcome:

The newly created initrd should contain the included version of the kernel module

Foreman and Proxy versions:

foreman-2.1.4-1.el7.noarch
fdi-bootable-3.5.7.iso

Distribution and version:

NAME=“Red Hat Enterprise Linux Server”
VERSION=“7.8 (Maipo)”

Can’t you just add the elrepo to the kickstart and rebuild the image according to the README? I am not huge fan of regenerating init RAM disks to be honest.

Anyway, I noticed the RPM carries the driver on a different path: /lib/modules/3.10.0-1127.19.1.el7.x86_64/extra/e1000e/e1000e.ko note the extra directory while you are modprobing the one from the old path? I am not very familiar with kmod to be honest, kmod is kind of a hack that NVidia users are used to. I am happy AMD (Radeon-Ryzen) users and I did not have to mess around with kmod for many years now :slight_smile:

So my advice - try to load the correct file first, if it does not work just rebuild the image, however since the driver has a same name, I don’t know which one will be picked up first.

Of course kmod was not built only for NVidia, this rant was irrelevant, but… could not help it! :slight_smile:

Wow many thanks for the quick response! :slight_smile:

I will check the README how to update the included driver. Just to clarify:

I copied the driver provided by the mentioned rpm manually to the extracted initrd tree, so the original e1000e.ko file included in the initrd0.img gets overwritten.

After that, I build a new initrd0.img and included this newly created initrd0.img in a new discovery-image and made a new iso-file via mkisofs.

Iam wondering how its even possible that I get the old version of this driver after booting from this newly created iso? I thought the /isolinux/initrd0.img gets mounted by the kernel when I start the discovery-image? There is not even an old version of the e1000e driver included in the generated initrd0.img!? :face_with_monocle:

I am not sure in your case, but after the ISO file is built (which includes kernel and initramdisk of course), then there is a script https://github.com/theforeman/foreman-discovery-image/blob/master/aux/livecd-iso-to-pxeboot which extract the files (kernel, initramdisk) and then concatenates the init RAM disk + the ISO file. When correct kernel command options are provided, dracut detects the concatenated ISO and mounts it. This is how LiveCD was built and discovery is no different. So maybe you have two different ramdisks you are working with?

Also note that init RAM disk is dropped and remounted with the actual filesystem (from the ISO) at some point during boot, if you haven’t changed that (and only the RAM disk) you will see the old file.

You can drop any file to the root folder here:

During build, discovery overwrites all files from this directory on the target system as the last build step. You can overwrite pretty much anything, but I am not sure if this happens before initramdisk is generated or after. It’s in %post section of the kickstart.

Thank you for the explanation. :slight_smile: I didn’t use the mentioned script to built the new discovery-image. I basically did the following:

  1. Download the mentioned driver-rpm

  2. Extract the content to get the driver

# rpm2cpio kmod-e1000e-3.8.4-2.el7_8.elrepo.x86_64.rpm | cpio -idmv

  1. Find the e1000e.ko from the rpm and compress it

# xz -z e1000e.ko

  1. loop-mount and copy the content of the latest foreman discovery image to some directory

  2. Extract the included /isolinux/intrd0.img

# /usr/lib/dracut/skipcpio initrd0.img | gunzip -c | cpio -i -d

  1. Copy the new driver into the directory tree from the extracted initrd0.img

# cp /tmp/lib/modules/3.10.0-1127.19.1.el7.x86_64/extra/e1000e/e1000e.ko.xz /initramdisk/usr/lib/modules/3.10.0-1062.1.2.el7.x86_64/kernel/drivers/net/ethernet/intel/e1000e/

  1. Generate a new initrd

# find . | cpio --create --format='newc' > /tmp/newinitramfs

  1. Compress it

# gzip -S .img /tmp/newinitramfs

  1. Copy the new initrd file to the extracted disovery image, to overwrite the old one

  2. Go to the extracted discovery image directory

  3. Generate a new discovery-image via mkisofs

mkisofs -quiet -U -A "fdi" -V "fdi" -volset "fdi" -J -joliet-long -r -v -T -o ../bootdisk_fdi_new_e1000e.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -input-charset utf-8 -boot-info-table -eltorito-alt-boot -e isolinux/efiboot.img -no-emul-boot .

After booting the newly created discovery-image there should be no old driver-version available? Or how is this even possible? :frowning_face:

EDIT: I got it! :smiley: … the driver is included in the squashfs.img

Puhh atleast I won’t be having any nightmares now. :smiley: I was wondering and investigating for multiple hours to understand where the old driver version comes from.

Greetings!

Hey @lzap :slight_smile:

Can I create a new discovery image following the official guide https://github.com/theforeman/foreman-discovery-image based on the CentOS8 repository? Do you know if this would work?

CentOS8.2 include the necessary driver for my Intel e1000e card.

If thats not possible, could you give me a hint how I get the driver into the discovery image, so that the discovery image would recognize my network adapter?

many thanks!

That is what I was trying to say with “root is remounted during boot”.

We haven’t tested this yet, maybe. But FDI requires some packages from our Foreman YUM repositories and these are EL7 only, you will get some troubles. Going forward we would like to get rid of these dependencies and possibly completely drop Ruby and only have FDI based on SSH connections and simple HTTP callbacks. Before we update to CentOS8 I would like to work on simplifying first.

Create a YUM repository with repocreate containing newest kernel from Fedora, add the repository to the 00-repos-centos7.ks and build the FDI using instructions. This might work, not sure.

Alternatively, if you are Red Hat customer, call in and ask for driver backport, however I think RHEL7 passed the milestone and only security fixes go in at this point.

@Marek_Hulan FYI this is the first time someone is having troubles with FDI because it has way too old kernel. We might get CentOS8 upgrade prioritized a bit.

Hi @lzap,

the build-livecd script creates an archive including kernel + initrd for booting via PXE.

Could you give me a quick guide how to generate a bootable ISO from this?

Many thanks & best regards!

Got it! :slight_smile:

As described in https://www.youtube.com/watch?v=QPQZThbMCbY I’ve got the .iso after running livecd-creator directly.

Hi @lzap,

Ive build a new fdi image including the e100e driver, but unfortunately the generated iso fails to start :frowning:

I got some (minor) failures while building, ‘unknown filesystem type’ and some repo erros, cause im building behind a http proxy.

https://pastebin.com/raw/y7Y9QLrN

Do you have an idea whats going on? I set the http_proxy variable, the package-download is successful, but there seems to be connection problems inside the chroot environment created by the livecd-creator!?

Iam using RHEL 7.8 as build host and installed all dependencies mentioned on github

Command Line   : install hfsplus-tools-540.1.linux3-4.el7.x86_64.rpm livecd-tools-21.4-2.el7.x86_64.rpm python-imgcreate-21.4-2.el7.x86_64.rpm
Transaction performed with:
    Installed     rpm-4.11.3-43.el7.x86_64                    @rhel-7-server-rpms
    Installed     subscription-manager-1.24.26-3.el7_8.x86_64 @rhel-7-server-rpms
    Installed     yum-3.4.3-167.el7.noarch                    @rhel-7-server-rpms
    Installed     yum-metadata-parser-1.1.4-10.el7.x86_64     @anaconda/7.6
Packages Altered:
    Dep-Install GConf2-3.2.6-8.el7.x86_64                               @rhel-7-server-rpms
    Dep-Install dosfstools-3.0.20-10.el7.x86_64                         @rhel-7-server-rpms
    Dep-Install dumpet-2.1-8.el7.x86_64                                 @rhel-7-server-rpms
    Install     hfsplus-tools-540.1.linux3-4.el7.x86_64                 @/hfsplus-tools-540.1.linux3-4.el7.x86_64
    Dep-Install isomd5sum-1:1.0.10-5.el7.x86_64                         @rhel-7-server-rpms
    Install     livecd-tools-1:21.4-2.el7.x86_64                        @/livecd-tools-21.4-2.el7.x86_64
    Dep-Install lorax-19.7.26-1.el7.x86_64                              @rhel-7-server-rpms
    Dep-Install plymouth-graphics-libs-0.8.9-0.33.20140113.el7.x86_64   @rhel-7-server-rpms
    Dep-Install plymouth-plugin-label-0.8.9-0.33.20140113.el7.x86_64    @rhel-7-server-rpms
    Dep-Install plymouth-plugin-two-step-0.8.9-0.33.20140113.el7.x86_64 @rhel-7-server-rpms
    Dep-Install psmisc-22.20-16.el7.x86_64                              @rhel-7-server-rpms
    Dep-Install pykickstart-1.99.66.21-1.el7.noarch                     @rhel-7-server-rpms
    Dep-Install pyparted-1:3.9-15.el7.x86_64                            @rhel-7-server-rpms
    Dep-Install python-beaker-1.5.4-10.el7.noarch                       @rhel-7-server-rpms
    Install     python-imgcreate-1:21.4-2.el7.x86_64                    @/python-imgcreate-21.4-2.el7.x86_64
    Dep-Install python-mako-0.8.1-2.el7.noarch                          @rhel-7-server-rpms
    Dep-Install python-paste-1.7.5.1-9.20111221hg1498.el7.noarch        @rhel-7-server-rpms
    Dep-Install python-tempita-0.5.1-6.el7.noarch                       @rhel-7-server-rpms
    Dep-Install redhat-upgrade-dracut-0.8.10-1.el7.x86_64               @rhel-7-server-rpms
    Dep-Install redhat-upgrade-dracut-plymouth-0.8.10-1.el7.noarch      @rhel-7-server-rpms
    Dep-Install squashfs-tools-4.3-0.21.gitaae0aff4.el7.x86_64          @rhel-7-server-rpms
    Dep-Install syslinux-extlinux-4.05-15.el7.x86_64                    @rhel-7-server-rpms
    Dep-Install system-config-keyboard-1.4.0-5.el7.noarch               @rhel-7-server-rpms
    Dep-Install system-config-keyboard-base-1.4.0-5.el7.noarch          @rhel-7-server-rpms

Command Line   : install livecd-tools pykickstart isomd5sum syslinux grub2-efi shim grub2-efi-x64 grub2-efi-x64-cdboot shim-x64
Transaction performed with:
    Installed     rpm-4.11.3-43.el7.x86_64                    @rhel-7-server-rpms
    Installed     subscription-manager-1.24.26-3.el7_8.x86_64 @rhel-7-server-rpms
    Installed     yum-3.4.3-167.el7.noarch                    @rhel-7-server-rpms
    Installed     yum-metadata-parser-1.1.4-10.el7.x86_64     @anaconda/7.6
Packages Altered:
    Install grub2-efi-x64-cdboot-1:2.02-0.81.el7.x86_64 @rhel-7-server-optional-rpms

I commented out the following lines in build-livecd-root script to get the desired iso file, unfortunately that didnt work either :frowning:

 56 #echo "* Converting to initrd"
 57 #bash -x $srcdir/aux/livecd-iso-to-pxeboot $tmpdir/fdi.iso
 58 #
 59 #if [ $? -ne 0 ]; then
 60 #    KEEP_TMPDIR=yes
 61 #    echo "Error converting to initrd"
 62 #    exit 1
 63 #fi
 64 #
 65 #echo "* Building tarball"
 66 #mkdir fdi-image
 67 #mv tftpboot/initrd0.img tftpboot/vmlinuz0 fdi-image || KEEP_TMPDIR=yes
 68 #cd fdi-image
 69 #cat > README <<EOF
 70 #This is Foreman discovery image
 71 #
 72 #To get instructions how to use the image head over to
 73 #
 74 #https://github.com/theforeman/foreman_discovery
 75 #
 76 #Image was built from $last_tag ($last_sha)
 77 #
 78 #To verify the kernel and initrd in this tar, run
 79 #
 80 #  sha256sum -c SHA256SUM
 81 #EOF
 82 #
 83 #sha256sum initrd0.img vmlinuz0 > SHA256SUM
 84 #
 85 #cd ..
 86 #tarball=$destdir/fdi-image-${last_tag#release-}.tar
 87 #tar cf $tarball fdi-image/
 88 #ls -lh $tarball
 89 #chown --reference $srcdir/build-livecd $tarball
 90 #
 91 #echo "* Done"
 92 #echo "The image was built:"
 93 #du -h $tarball
 94 exit 0

FDI nightly is currently broken, I am in process of upgrading from Ruby 2.0 and Facter 2.x to Ruby 2.5 in TFM SCL and Facter 4.0. This is not something that can be done in a day, sorry to trick you into thinking that rebuilding an image is a solution for you. Currently it’s very broken.

I managed to fix this, this is a preliminary patch - PXE workflow untested.

1 Like

Hey @lzap,

no problem :slight_smile: after some hours of troubleshooting I finally got it working with the foreman- & foreman-plugin 2.1 release repositories.

The included driver works also, the e1000e network adapter gets correctly recognized now. :slight_smile:

Unfortunately we got a new issue: The system freezes after kexec.

When I login into the live system and execute the kexec manually, I see the following debug code. The system will not freeze then, but doesn’t proceed to load the new kernel.

Do you have an idea what’s going on?

[root@fdi tmp]# kexec -d -l vmlinuz --initrd=initrd.img --append="ks=http://foreman/unattended/provision?token=44163ae0-1cc7-4599-8b77-34846d23d046&static=yes inst.ks.sendmac ip=10.236.57.97::10.236.57.62:255.255.255.0:::none nameserver=10.62.32.13 ksdevice=bootif BOOTIF=00-2c-f0-5d-15-72-22 nomodeset nokaslr nomodeset"
Try gzip decompression.
Try LZMA decompression.
lzma_decompress_file: read on vmlinuz of 65536 bytes failed
kernel: 0x7effab80c010 kernel_size: 0x8802f8
MEMORY RANGES
0000000000000100-000000000009dfff (0)
000000000009e000-000000000009efff (1)
000000000009f000-000000000009ffff (0)
00000000000a0000-00000000000fffff (1)
0000000000100000-000000003fffffff (0)
0000000040000000-00000000403fffff (1)
0000000040400000-000000008981e017 (0)
000000008981e018-000000008982e457 (0)
000000008982e458-000000008ab45fff (0)
000000008ab46000-000000008ab46fff (3)
000000008ab47000-000000008ab69fff (0)
000000008ab6a000-000000008ab6afff (1)
000000008ab6b000-0000000091af2fff (0)
0000000091af3000-0000000099f7ffff (1)
0000000099f80000-000000009a0affff (2)
000000009a0b0000-000000009a1affff (3)
000000009a1b0000-000000009adfefff (1)
000000009adff000-000000009adfffff (0)
000000009ae00000-000000009f7fffff (1)
00000000e0000000-00000000efffffff (1)
00000000fe000000-00000000fe010fff (1)
00000000fec00000-00000000fec00fff (1)
00000000fee00000-00000000fee00fff (1)
00000000ff000000-00000000ffffffff (1)
0000000100000000-000000205c7fffff (0)
sym: sha256_starts info: 12 other: 00 shndx: 1 value: 10d0 size: 48
sym: sha256_starts value: 205c7f80d0 addr: 205c7f7004
R_X86_64_64
sym: sha256_update info: 12 other: 00 shndx: 1 value: 3c80 size: 1a
sym: sha256_update value: 205c7fac80 addr: 205c7f700f
R_X86_64_64
sym: sha256_regions info: 11 other: 00 shndx: 8 value: 20 size: 100
sym: sha256_regions value: 205c7fc020 addr: 205c7f701a
R_X86_64_64
sym: sha256_regions info: 11 other: 00 shndx: 8 value: 20 size: 100
sym: sha256_regions value: 205c7fc120 addr: 205c7f7044
R_X86_64_64
sym: sha256_finish info: 12 other: 00 shndx: 1 value: 3ca0 size: 1a4
sym: sha256_finish value: 205c7faca0 addr: 205c7f705b
R_X86_64_64
sym: sha256_digest info: 11 other: 00 shndx: 8 value: 0 size: 20
sym: sha256_digest value: 205c7fc000 addr: 205c7f706c
R_X86_64_64
sym:     memcmp info: 12 other: 00 shndx: 1 value: 59b size: 21
sym: memcmp value: 205c7f759b addr: 205c7f7079
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 205c7faf60 addr: 205c7f708f
R_X86_64_64
sym:     printf info: 12 other: 00 shndx: 1 value: 4bc size: a0
sym: printf value: 205c7f74bc addr: 205c7f709b
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 205c7faf80 addr: 205c7f70a7
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 205c7faf90 addr: 205c7f70be
R_X86_64_64
sym:     printf info: 12 other: 00 shndx: 1 value: 4bc size: a0
sym: printf value: 205c7f74bc addr: 205c7f70c8
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 205c7faf96 addr: 205c7f70da
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 205c7faf98 addr: 205c7f70eb
R_X86_64_64
sym: sha256_digest info: 11 other: 00 shndx: 8 value: 0 size: 20
sym: sha256_digest value: 205c7fc000 addr: 205c7f70fa
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 205c7faf90 addr: 205c7f710e
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 205c7faf96 addr: 205c7f7122
R_X86_64_64
sym:     printf info: 12 other: 00 shndx: 1 value: 4bc size: a0
sym: printf value: 205c7f74bc addr: 205c7f712c
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 205c7fafa8 addr: 205c7f7149
R_X86_64_64
sym:     printf info: 12 other: 00 shndx: 1 value: 4bc size: a0
sym: printf value: 205c7f74bc addr: 205c7f7155
R_X86_64_64
sym: setup_arch info: 12 other: 00 shndx: 1 value: 762 size: 3a
sym: setup_arch value: 205c7f7762 addr: 205c7f7162
R_X86_64_64
sym: verify_sha256_digest info: 12 other: 00 shndx: 1 value: 0 size: 147
sym: verify_sha256_digest value: 205c7f7000 addr: 205c7f716e
R_X86_64_64
sym: post_verification_setup_arch info: 12 other: 00 shndx: 1 value: 7d4 size: 3b
sym: post_verification_setup_arch value: 205c7f77d4 addr: 205c7f7181
R_X86_64_64
sym:    putchar info: 12 other: 00 shndx: 1 value: d57 size: 143
sym: putchar value: 205c7f7d57 addr: 205c7f71c9
R_X86_64_64
sym:    putchar info: 12 other: 00 shndx: 1 value: d57 size: 143
sym: putchar value: 205c7f7d57 addr: 205c7f720b
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 205c7fafba addr: 205c7f72d6
R_X86_64_64
sym:    putchar info: 12 other: 00 shndx: 1 value: d57 size: 143
sym: putchar value: 205c7f7d57 addr: 205c7f73da
R_X86_64_64
sym:   vsprintf info: 12 other: 00 shndx: 1 value: 18b size: 29b
sym: vsprintf value: 205c7f718b addr: 205c7f74aa
R_X86_64_64
sym:   vsprintf info: 12 other: 00 shndx: 1 value: 18b size: 29b
sym: vsprintf value: 205c7f718b addr: 205c7f754a
R_X86_64_64
sym:    entry32 info: 10 other: 00 shndx: 1 value: 5c0 size: 0
sym: entry32 value: 205c7f75bc addr: 205c7f75cd
R_X86_64_PC32
sym:    entry32 info: 10 other: 00 shndx: 1 value: 5c0 size: 0
sym: entry32 value: 205c7f75bc addr: 205c7f75e2
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fc13c addr: 205c7f75fd
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fc11c addr: 205c7f7604
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7fae74 addr: 205c7f760a
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fc18c addr: 205c7f7610
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7fae4c addr: 205c7f7616
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faee1 addr: 205c7f7649
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faef0 addr: 205c7f7650
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faefb addr: 205c7f7657
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faf06 addr: 205c7f765e
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faf11 addr: 205c7f7665
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faf1c addr: 205c7f766c
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faf27 addr: 205c7f7673
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faf16 addr: 205c7f767a
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fc251 addr: 205c7f7681
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faf0c addr: 205c7f7693
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faf3c addr: 205c7f76a9
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7fae7c addr: 205c7f76bc
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7fae84 addr: 205c7f76c3
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7fae8c addr: 205c7f76ca
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7fae94 addr: 205c7f76d1
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7fae9c addr: 205c7f76d8
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faea4 addr: 205c7f76df
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faeac addr: 205c7f76e6
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faeb4 addr: 205c7f76ed
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faebc addr: 205c7f76f4
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faec4 addr: 205c7f76fb
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faecc addr: 205c7f7702
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faed4 addr: 205c7f7709
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faedc addr: 205c7f7710
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faee4 addr: 205c7f7717
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faeec addr: 205c7f771e
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faef4 addr: 205c7f7725
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faefc addr: 205c7f772b
R_X86_64_PC32
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faf3c addr: 205c7f7733
R_X86_64_PC32
sym: jump_back_entry info: 11 other: 00 shndx: 8 value: 2008 size: 8
sym: jump_back_entry value: 205c7fe004 addr: 205c7f774d
R_X86_64_PC32
sym:       .bss info: 03 other: 00 shndx: a value: 0 size: 0
sym: .bss value: 205c7ffffc addr: 205c7f7754
R_X86_64_PC32
sym:  purgatory info: 12 other: 00 shndx: 1 value: 147 size: 44
sym: purgatory value: 205c7f7143 addr: 205c7f7759
R_X86_64_PC32
sym:    entry64 info: 10 other: 00 shndx: 1 value: 690 size: 0
sym: entry64 value: 205c7f768c addr: 205c7f775e
R_X86_64_PC32
sym:  reset_vga info: 11 other: 00 shndx: 8 value: 2012 size: 1
sym: reset_vga value: 205c7fe012 addr: 205c7f7764
R_X86_64_64
sym: x86_reset_vga info: 12 other: 00 shndx: 1 value: e9a size: 1fb
sym: x86_reset_vga value: 205c7f7e9a addr: 205c7f7774
R_X86_64_64
sym: legacy_pic info: 11 other: 00 shndx: 8 value: 2011 size: 1
sym: legacy_pic value: 205c7fe011 addr: 205c7f7780
R_X86_64_64
sym: x86_setup_legacy_pic info: 12 other: 00 shndx: 1 value: 1095 size: 31
sym: x86_setup_legacy_pic value: 205c7f8095 addr: 205c7f7790
R_X86_64_64
sym: cmdline_end info: 11 other: 00 shndx: 8 value: 2000 size: 8
sym: cmdline_end value: 205c7fe000 addr: 205c7f779e
R_X86_64_64
sym: jump_back_entry info: 11 other: 00 shndx: 8 value: 2008 size: 8
sym: jump_back_entry value: 205c7fe008 addr: 205c7f77b0
R_X86_64_64
sym: .rodata.str1.1 info: 03 other: 00 shndx: 5 value: 0 size: 0
sym: .rodata.str1.1 value: 205c7fafcb addr: 205c7f77ba
R_X86_64_64
sym:    sprintf info: 12 other: 00 shndx: 1 value: 426 size: 96
sym: sprintf value: 205c7f7426 addr: 205c7f77c7
R_X86_64_64
sym: panic_kernel info: 11 other: 00 shndx: 8 value: 2010 size: 1
sym: panic_kernel value: 205c7fe010 addr: 205c7f77d6
R_X86_64_64
sym: crashdump_backup_memory info: 12 other: 00 shndx: 1 value: c73 size: 3e
sym: crashdump_backup_memory value: 205c7f7c73 addr: 205c7f77e6
R_X86_64_64
sym: jump_back_entry info: 11 other: 00 shndx: 8 value: 2008 size: 8
sym: jump_back_entry value: 205c7fe008 addr: 205c7f77f2
R_X86_64_64
sym: x86_setup_jump_back_entry info: 12 other: 00 shndx: 1 value: 79c size: 38
sym: x86_setup_jump_back_entry value: 205c7f779c addr: 205c7f7803
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe047 addr: 205c7f7827
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe04f addr: 205c7f782d
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe075 addr: 205c7f784d
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe07f addr: 205c7f7853
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe089 addr: 205c7f7859
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe093 addr: 205c7f785f
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe076 addr: 205c7f7866
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe08d addr: 205c7f786d
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe06d addr: 205c7f7937
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe075 addr: 205c7f793d
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe09b addr: 205c7f795d
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe0a5 addr: 205c7f7963
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe0af addr: 205c7f7969
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe0b9 addr: 205c7f796f
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe0e2 addr: 205c7f79b2
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe12b addr: 205c7f79f5
R_X86_64_PC32
sym: backup_src_start info: 11 other: 00 shndx: 8 value: 2078 size: 8
sym: backup_src_start value: 205c7fe078 addr: 205c7f7c75
R_X86_64_64
sym: backup_src_size info: 11 other: 00 shndx: 8 value: 2070 size: 8
sym: backup_src_size value: 205c7fe070 addr: 205c7f7c82
R_X86_64_64
sym: backup_start info: 11 other: 00 shndx: 8 value: 2080 size: 8
sym: backup_start value: 205c7fe080 addr: 205c7f7c94
R_X86_64_64
sym:     memcpy info: 12 other: 00 shndx: 1 value: 583 size: 18
sym: memcpy value: 205c7f7583 addr: 205c7f7ca6
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe088 addr: 205c7f7cb3
R_X86_64_64
sym: serial_base info: 11 other: 00 shndx: 8 value: 2090 size: 2
sym: serial_base value: 205c7fe090 addr: 205c7f7cc1
R_X86_64_64
sym: serial_baud info: 11 other: 00 shndx: 8 value: 208c size: 4
sym: serial_baud value: 205c7fe08c addr: 205c7f7cfb
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe088 addr: 205c7f7d2f
R_X86_64_64
sym: console_vga info: 11 other: 00 shndx: 8 value: 2093 size: 1
sym: console_vga value: 205c7fe093 addr: 205c7f7d5a
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe098 addr: 205c7f7d70
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe098 addr: 205c7f7dd5
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe094 addr: 205c7f7dea
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe098 addr: 205c7f7df9
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe098 addr: 205c7f7e0c
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe094 addr: 205c7f7e18
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe094 addr: 205c7f7e3c
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe094 addr: 205c7f7e4f
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe098 addr: 205c7f7e61
R_X86_64_64
sym: console_serial info: 11 other: 00 shndx: 8 value: 2092 size: 1
sym: console_serial value: 205c7fe092 addr: 205c7f7e6b
R_X86_64_64
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f7cb1 addr: 205c7f7e7d
R_X86_64_64
sym: sha256_process info: 12 other: 00 shndx: 1 value: 1120 size: 2a2d
sym: sha256_process value: 205c7f8120 addr: 205c7faba7
R_X86_64_64
sym:     memcpy info: 12 other: 00 shndx: 1 value: 583 size: 18
sym: memcpy value: 205c7f7583 addr: 205c7fac04
R_X86_64_64
sym: sha256_process info: 12 other: 00 shndx: 1 value: 1120 size: 2a2d
sym: sha256_process value: 205c7f8120 addr: 205c7fac39
R_X86_64_64
sym:     memcpy info: 12 other: 00 shndx: 1 value: 583 size: 18
sym: memcpy value: 205c7f7583 addr: 205c7fac4e
R_X86_64_64
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7fab50 addr: 205c7fac87
R_X86_64_64
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7fab50 addr: 205c7fad1f
R_X86_64_64
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fe0a0 addr: 205c7fad29
R_X86_64_64
sym:    entry16 info: 10 other: 00 shndx: 1 value: 810 size: 0
sym: entry16 value: 205c7f7810 addr: 205c7fae78
R_X86_64_64
sym:    entry32 info: 10 other: 00 shndx: 1 value: 5c0 size: 0
sym: entry32 value: 205c7f75c0 addr: 205c7faf00
R_X86_64_64
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faf10 addr: 205c7faf12
R_X86_64_64
sym:    .rodata info: 03 other: 00 shndx: 3 value: 0 size: 0
sym: .rodata value: 205c7faf40 addr: 205c7faf42
R_X86_64_64
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f7000 addr: 205c7fb008
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f7147 addr: 205c7fb040
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f718b addr: 205c7fb070
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f7426 addr: 205c7fb0c0
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f74bc addr: 205c7fb0e0
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f755c addr: 205c7fb118
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f756f addr: 205c7fb130
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f7583 addr: 205c7fb148
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f759b addr: 205c7fb160
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f7762 addr: 205c7fb190
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f779c addr: 205c7fb1b0
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f77d4 addr: 205c7fb1c8
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f7c73 addr: 205c7fb200
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f7cb1 addr: 205c7fb230
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f7d57 addr: 205c7fb250
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f7e9a addr: 205c7fb298
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f8095 addr: 205c7fb2c8
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f80d0 addr: 205c7fb2f8
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7f8120 addr: 205c7fb310
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7fab50 addr: 205c7fb358
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7fac80 addr: 205c7fb3c0
R_X86_64_PC32
sym:      .text info: 03 other: 00 shndx: 1 value: 0 size: 0
sym: .text value: 205c7faca0 addr: 205c7fb3d8
R_X86_64_PC32
sym:      .data info: 03 other: 00 shndx: 8 value: 0 size: 0
sym: .data value: 205c7fc120 addr: 205c7fc122
R_X86_64_64
Loaded purgatory at addr 0x205c7f7000
Loaded real_mode_data and command line at 0x205c7f2000
kernel init_size 0x2d62000
Loaded 64bit kernel at 0x2059a00000
Loaded initrd at 0x2055be6000 size 0x3e19158
E820 memmap:
0000000000000100-000000000009dfff (1)
000000000009e000-000000000009efff (2)
000000000009f000-000000000009ffff (1)
00000000000a0000-00000000000fffff (2)
0000000000100000-000000003fffffff (1)
0000000040000000-00000000403fffff (2)
0000000040400000-000000008981e017 (1)
000000008981e018-000000008982e457 (1)
000000008982e458-000000008ab45fff (1)
000000008ab46000-000000008ab46fff (4)
000000008ab47000-000000008ab69fff (1)
000000008ab6a000-000000008ab6afff (2)
000000008ab6b000-0000000091af2fff (1)
0000000091af3000-0000000099f7ffff (2)
0000000099f80000-000000009a0affff (3)
000000009a0b0000-000000009a1affff (4)
000000009a1b0000-000000009adfefff (2)
000000009adff000-000000009adfffff (1)
000000009ae00000-000000009f7fffff (2)
00000000e0000000-00000000efffffff (2)
00000000fe000000-00000000fe010fff (2)
00000000fec00000-00000000fec00fff (2)
00000000fee00000-00000000fee00fff (2)
00000000ff000000-00000000ffffffff (2)
0000000100000000-000000205c7fffff (1)
/sys/firmware/edd does not exist.
kexec_load: entry = 0x205c7f7730 flags = 0x3e0000
nr_segments = 6
segment[0].buf   = 0x1eefe50
segment[0].bufsz = 0x70
segment[0].mem   = 0x100000
segment[0].memsz = 0x1000
segment[1].buf   = 0x1eefd00
segment[1].bufsz = 0x140
segment[1].mem   = 0x101000
segment[1].memsz = 0x1000
segment[2].buf   = 0x7effa79f2010
segment[2].bufsz = 0x3e19158
segment[2].mem   = 0x2055be6000
segment[2].memsz = 0x3e1a000
segment[3].buf   = 0x7effab810610
segment[3].bufsz = 0x87bcf8
segment[3].mem   = 0x2059a00000
segment[3].memsz = 0x2d62000
segment[4].buf   = 0x1eeb5a0
segment[4].bufsz = 0x4753
segment[4].mem   = 0x205c7f2000
segment[4].memsz = 0x5000
segment[5].buf   = 0x1ee44b0
segment[5].bufsz = 0x70e0
segment[5].mem   = 0x205c7f7000
segment[5].memsz = 0x9000

Additional note: I’m trying to boot on UEFI system.

Make sure SecureBoot is turned off. Other than that, I can only tell you that kexec is quite buggy and I can only recommend it for VMs.

To complete this thread, below is a short summary of the steps I did to rebuild the foreman discovery image to include the needed e1000e driver:

  1. Clone Foreman discovery image repository from github

git clone https://github.com/theforeman/foreman-discovery-image.git

  1. Create a new directory and place the kmod-rpm file inside of it

root@foreman(foreman) [~/bootdisk-build/foreman-discovery-image-master/foreman-discovery-image]# mkdir e1000e_driver

root@foreman(foreman) [~/bootdisk-build/foreman-discovery-image-master/foreman-discovery-image]# ls -l e1000e_driver/

total 148
-rw-r–r--. 1 root root 146540 Nov 23 16:22 kmod-e1000e-3.8.4-2.el7_8.elrepo.x86_64.rpm

  1. Use the createrepo utility to generate a local repository from the previous created directory

root@foreman (foreman) [~/bootdisk-build/foreman-discovery-image-master/foreman-discovery-image]# createrepo -v e1000e_driver

Spawning worker 0 with 1 pkgs
Spawning worker 1 with 0 pkgs
Spawning worker 2 with 0 pkgs
Spawning worker 3 with 0 pkgs
Worker 0: reading kmod-e1000e-3.8.4-2.el7_8.elrepo.x86_64.rpm
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Starting other db creation: Thu Dec 3 10:22:26 2020
Ending other db creation: Thu Dec 3 10:22:26 2020
Starting filelists db creation: Thu Dec 3 10:22:26 2020
Ending filelists db creation: Thu Dec 3 10:22:26 2020
Starting primary db creation: Thu Dec 3 10:22:26 2020
Ending primary db creation: Thu Dec 3 10:22:26 2020
Sqlite DBs complete

  1. Modify the related kickstart repository file (e.g. 00-repos-centos7.ks)
    (Change the specified foreman repositories from nightly to release, to ensure a stable source. Add the recently created e1000e repository)

root@foreman (foreman) [~/bootdisk-build/foreman-discovery-image-master/foreman-discovery-image]# cat 00-repos-centos7.ks

repo --name=centos-extras --mirrorlist=http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras
repo --name=centos --mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=os
repo --name=centos-updates --mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=updates
repo --name=epel7 --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
repo --name=centos-sclo-rh --mirrorlist=http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=sclo-rh

#repo --name=foreman-el7 --baseurl=http://yum.theforeman.org/nightly/el7/$basearch/
#repo --name=foreman-el7 --baseurl=http://yum.theforeman.org/nightly/el7/$basearch/

repo --name=foreman-el7 --baseurl=http://yum.theforeman.org/releases/2.1/el7/$basearch/
repo --name=foreman-plugins-el7 --baseurl=http://yum.theforeman.org/plugins/2.1/el7/$basearch/

repo --name=e1000e --baseurl=file:///root/bootdisk-build/foreman-discovery-image-master/foreman-discovery-image/e1000e_driver

  1. Add kmod and the driver package (kmod-e1000e) to the appropriate kickstart file (e.g. 20-packages.ks for centos7)

%packages --excludedocs
bash
kernel
biosdevname
grub2
grub2-tools
e2fsprogs
passwd
policycoreutils
chkconfig
rootfiles
yum
vim-minimal
acpid
tftp
lldpad
isomd5sum
elfutils-libs

#e1000e driver package
kmod
kmod-e1000e

  1. Execute ./build-livecd to generate the fdi-image.ks kickstart file

  2. Comment out the following lines in ./build-livecd-root to prevent the script from converting the resulting iso to initrd. (Dont know if there is any ‘official’ way to prevent this!?)

 56 #echo "* Converting to initrd"
 57 #bash -x $srcdir/aux/livecd-iso-to-pxeboot $tmpdir/fdi.iso
 58 #
 59 #if [ $? -ne 0 ]; then
 60 #    KEEP_TMPDIR=yes
 61 #    echo "Error converting to initrd"
 62 #    exit 1
 63 #fi
 64 #
 65 #echo "* Building tarball"
 66 #mkdir fdi-image
 67 #mv tftpboot/initrd0.img tftpboot/vmlinuz0 fdi-image || KEEP_TMPDIR=yes
 68 #cd fdi-image
 69 #cat > README <<EOF
 70 #This is Foreman discovery image
 71 #
 72 #To get instructions how to use the image head over to
 73 #
 74 #https://github.com/theforeman/foreman_discovery
 75 #
 76 #Image was built from $last_tag ($last_sha)
 77 #
 78 #To verify the kernel and initrd in this tar, run
 79 #
 80 #  sha256sum -c SHA256SUM
 81 #EOF
 82 #
 83 #sha256sum initrd0.img vmlinuz0 > SHA256SUM
 84 #
 85 #cd ..
 86 #tarball=$destdir/fdi-image-${last_tag#release-}.tar
 87 #tar cf $tarball fdi-image/
 88 #ls -lh $tarball
 89 #chown --reference $srcdir/build-livecd $tarball
 90 #
 91 #echo "* Done"
 92 #echo "The image was built:"
 93 #du -h $tarball
 94 exit 0

Execute ./build-livecd-root afterwards to generate the new foreman discovery image

4 Likes

I hope that the next generation image will be just a dracut image. This would make this proccess as easy as one command. And also fast.

Thanks for getting back to us.

1 Like