From 2d9a56a9ec8a5957b9b5b08680818d565b9795a4 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Thu, 16 Feb 2012 14:58:13 -0500 Subject: [PATCH] add anaconda dracut module Install the anaconda dracut module during 'install', use it when rebuilding initramfs, and clean it up afterward. Also install '.buildstamp' into the initramfs (the anconda module wants it). --- share/runtime-cleanup.tmpl | 2 +- share/runtime-install.tmpl | 4 +++- src/pylorax/__init__.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl index 45bcca4e..e211cf2c 100644 --- a/share/runtime-cleanup.tmpl +++ b/share/runtime-cleanup.tmpl @@ -21,7 +21,7 @@ removepkg plymouth* removefrom ${product.name}-logos /usr/share/plymouth/* ## we don't create new initramfs/bootloader conf inside anaconda ## (that happens inside the target system after we install dracut/grubby) -removepkg dracut-network grubby +removepkg dracut-network grubby anaconda-dracut ## In order to execute the /usr move on upgrades we need convertfs from dracut removefrom dracut --allbut /usr/lib/dracut/modules.d/30convertfs/convertfs.sh ## we don't run SELinux (not in enforcing, anyway) diff --git a/share/runtime-install.tmpl b/share/runtime-install.tmpl index 2ae34283..7fba2981 100644 --- a/share/runtime-install.tmpl +++ b/share/runtime-install.tmpl @@ -34,10 +34,12 @@ installpkg kernel %endif ## extra dracut modules -installpkg dracut-network +installpkg dracut-network anaconda-dracut ## required for dracut installpkg kbd kbd-misc +## required for anaconda-dracut (img-lib etc.) +installpkg tar xz dmidecode curl ## basic system stuff installpkg systemd-sysv systemd-units diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 758d6563..ef0a1c02 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -248,7 +248,8 @@ class Lorax(BaseLoraxClass): templatedir=templatedir) logger.info("rebuilding initramfs images") - dracut_args=["--xz", "--add", "livenet", "--add", "convertfs", "--omit", "plymouth"] + dracut_args=["--xz", "--add", "anaconda", "--omit", "plymouth", + "--install", "/.buildstamp"] treebuilder.rebuild_initrds(add_args=dracut_args) logger.info("populating output tree and building boot images")