From f6a02fbdb961aa19460bd7f351c21279f71034d2 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 16 Dec 2016 11:10:23 +1100 Subject: [PATCH] Install dracut-generic-config package dracut has a "hostonly" mode where it builds an initramfs that is suitable for booting the system it is building on. This is on by default, but obviously in our nested multi-platform chroot situation this is fraught with danger. As highlighted by [1] our builds were inadvertently turning off "hostonly" mode when the mountpoints in the chroot were not found. The CentOS 7.3 behaviour change broke this and we ended up with an initramfs with no file-system modules. Iaf2a1e8470f642bfaaaad3f9b7f26cfc8cc445c9 introduced a regeneration of the initramfs, which I think does work as described because it runs in the loopback device. However, dracut includes a package that installs configuration overrides to build a generic initramfs. This is really what we want, and should solve the problem no matter where the initramfs is created. Add this package into yum-minimal and remove the extra re-create call which should not be necessary. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1405238 Change-Id: I5d203f2abe743cb23a44d449850e692a948e7871 --- elements/yum-minimal/finalise.d/55-dracut-recreate | 12 ------------ elements/yum-minimal/package-installs.yaml | 1 + 2 files changed, 1 insertion(+), 12 deletions(-) delete mode 100755 elements/yum-minimal/finalise.d/55-dracut-recreate diff --git a/elements/yum-minimal/finalise.d/55-dracut-recreate b/elements/yum-minimal/finalise.d/55-dracut-recreate deleted file mode 100755 index 477e93ec..00000000 --- a/elements/yum-minimal/finalise.d/55-dracut-recreate +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -# Recreate the initramfs within the loop device so everything gets -# picked up correctly. - -if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -dracut --regenerate-all --force --verbose diff --git a/elements/yum-minimal/package-installs.yaml b/elements/yum-minimal/package-installs.yaml index b7cf1e36..8bafc7cd 100644 --- a/elements/yum-minimal/package-installs.yaml +++ b/elements/yum-minimal/package-installs.yaml @@ -1,5 +1,6 @@ audit: dracut: +dracut-config-generic: grubby: kernel: initscripts: