diskimage-builder/elements/yum-minimal
Ian Wienand a72645f431 Recreate initramfs within loopback image
dracut has a loop [1] where it probes top-level directories, tries to
find what block device they are on, then determines the file-system of
that block device.  It then puts those file-system modules into the
initramfs for boot.

Since we install the kernel package during the chroot phase, / there
is not a block device and thus this loop matches nothing and we end up
with no file-system modules in the initramfs.  This results in a very
annoying silent boot hang.

By moving re-generation of dracut into finalise.d phase, we run inside
the final image where / is the loop-device; the root file-system gets
detected correctly and the ext4 module is included correctly.

[1] http://git.kernel.org/cgit/boot/dracut/dracut.git/tree/dracut.sh?h=RHEL-7#n1041

Change-Id: Iaf2a1e8470f642bfaaaad3f9b7f26cfc8cc445c9
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-12-15 12:37:00 -05:00
..
finalise.d Recreate initramfs within loopback image 2016-12-15 12:37:00 -05:00
install.d Export FS_TYPE and remove hardcoded ext4 values 2016-05-19 17:33:36 +10:00
pre-install.d Rework yum-minimal locale cleanup 2016-05-31 15:14:24 +10:00
root.d yum-minimal: add systemd to initial install 2016-11-25 21:09:11 +11:00
element-deps Add a yum-minimal element that just uses yum 2015-04-14 13:39:18 -04:00
package-installs.yaml Install lsb package by map name instead of package name 2016-11-11 14:30:21 -06:00
pkg-map Add a yum-minimal element that just uses yum 2015-04-14 13:39:18 -04:00
README.rst yum-minimal: do not configure eth0 & eth1 for DHCP automatically 2015-12-22 08:39:04 +11:00

===========
yum-minimal
===========
Base element for creating minimal yum-based images.

This element is incomplete by itself, you'll want to use the centos-minimal
or fedora-minimal elements to get an actual base image.

Use of this element will require 'yum' and 'yum-utils' to be installed on
Ubuntu and Debian. Nothing additional is needed on Fedora or CentOS.

The `DIB_OFFLINE` or more specific `DIB_YUMCHROOT_USE_CACHE`
variables can be set to prefer the use of a pre-cached root filesystem
tarball.

If you wish to have DHCP networking setup for eth0 & eth1 via
/etc/sysconfig/network-config scripts/ifcfg-eth[0|1], set the
environment variable `DIB_YUM_MINIMAL_CREATE_INTERFACES` to `1`.