Custom Discovery Image

I am attempting to make a custom discovery image following the process
outlined here : https://github.com/theforeman/foreman-discovery-image

Figured it would be fairly simple to add a few additional packages (namely
Dell DTK to configure BIOS, RAID, etc on discovery).

Unfortunately I have run into a few issues. The first is that adding a few
additional packages (22M in total RPM) errors on livecd-creator with

Transaction couldn't start:

installing package tar-2:1.26-29.el7.x86_64 needs 2MB on the / filesystem

installing package tftp-5.2-12.el7.x86_64 needs 2MB on the / filesystem

installing package unzip-6.0-15.el7.x86_64 needs 3MB on the / filesystem

installing package isomd5sum-1:1.0.10-5.el7.x86_64 needs 3MB on the /
filesystem

installing package uuid-1.6.2-26.el7.x86_64 needs 3MB on the / filesystem

It seems that the addition of the packages has crossed over some limit and
there is no space to install all the packages. Problem is I don't know
where the space constraint it. I was added two packages to the packages-ks
snippet (syscfg and dtk-scripts). If I just put in syscfg it works, so I
guess dtk-scripts (which isn't a big install so confused as to why that is
causing what I suspect is a DB issue).

The second issue is on generation of the initrd image. To proceed past the
first part I just installed one new package, syscfg which installs a bunch
of binaries in /opt/dell. The bootable ISO (if I extract it and mount the
ext3root.img) contains all the binaries. But the generated initrd0.img does
not. So the step livecd-iso-to-pxeboot, which takes the ISO and extracts
the vmlinuz and initrd must have rules on what is needed in the initrd
image. So I would need to update that to include the DTK tools.

Thanks

Figured out the first issue, the space issue I believe.

The kickstart root partition was specified with size 1024 (so 1 G). I
increased that and it allowed me to install more packages. Still not 100%
sure how that came into play as prior to adding those packages it appears
the full install was 600 M, so adding a few more packages shouldn't have
pushed that over 1G. Also, it errors fairly early in the process, after
installing just 5 packages, so not sure how it would determine it "might"
run out of space.

Anyways I am now able to build the image with all packages wanted.

However the second issue persists. On converting the LiveCD using
livecd-iso-to-pxeboot it doesn't keep all the binaries installed by the
OpenMange DTK RPM. It creates the directory structure /opt/dell/… but
they are all empty. Whereas the LiveCD ISO itself has all the files in it.

··· On Thursday, March 3, 2016 at 5:27:56 PM UTC-8, Matthew Ceroni wrote: > > I am attempting to make a custom discovery image following the process > outlined here : https://github.com/theforeman/foreman-discovery-image > > Figured it would be fairly simple to add a few additional packages (namely > Dell DTK to configure BIOS, RAID, etc on discovery). > > Unfortunately I have run into a few issues. The first is that adding a few > additional packages (22M in total RPM) errors on livecd-creator with > > Transaction couldn't start: > > installing package tar-2:1.26-29.el7.x86_64 needs 2MB on the / filesystem > > installing package tftp-5.2-12.el7.x86_64 needs 2MB on the / filesystem > > installing package unzip-6.0-15.el7.x86_64 needs 3MB on the / filesystem > > installing package isomd5sum-1:1.0.10-5.el7.x86_64 needs 3MB on the / > filesystem > > installing package uuid-1.6.2-26.el7.x86_64 needs 3MB on the / filesystem > > > It seems that the addition of the packages has crossed over some limit and > there is no space to install all the packages. Problem is I don't know > where the space constraint it. I was added two packages to the packages-ks > snippet (syscfg and dtk-scripts). If I just put in syscfg it works, so I > guess dtk-scripts (which isn't a big install so confused as to why that is > causing what I suspect is a DB issue). > > > > The second issue is on generation of the initrd image. To proceed past the > first part I just installed one new package, syscfg which installs a bunch > of binaries in /opt/dell. The bootable ISO (if I extract it and mount the > ext3root.img) contains all the binaries. But the generated initrd0.img does > not. So the step livecd-iso-to-pxeboot, which takes the ISO and extracts > the vmlinuz and initrd must have rules on what is needed in the initrd > image. So I would need to update that to include the DTK tools. > > > Thanks >

Hello,

> The kickstart root partition was specified with size 1024 (so 1 G). I
> increased that and it allowed me to install more packages. Still not 100%
> sure how that came into play as prior to adding those packages it appears
> the full install was 600 M, so adding a few more packages shouldn't have
> pushed that over 1G. Also, it errors fairly early in the process, after
> installing just 5 packages, so not sure how it would determine it "might"
> run out of space.

that's exactly it. Out of curiosity, what packages do you need? That's
bunch of dependencies, isn't this installing X Window system?

> However the second issue persists. On converting the LiveCD using
> livecd-iso-to-pxeboot it doesn't keep all the binaries installed by the
> OpenMange DTK RPM. It creates the directory structure /opt/dell/… but
> they are all empty. Whereas the LiveCD ISO itself has all the files in it.

The script does not have any special magic in it:

It actually concatenate init ram disk with the ISO itself which mounts
via loopback from memory. So you should have all the data.

Investigate mount points (isn't /opt over-mounted?) and also you should
be able to find the mountpoint of the loopback, where you will find
contents of your ISO (untouched).

··· -- Later, Lukas #lzap Zapletal