From 2726c5a9f556d0d905e1ada1e301aacd6d70c7ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 12 Jul 2015 01:33:08 +0200 Subject: [PATCH] anaconda: use kernel-install instead of grubby to regenerate initrd/grub.conf Since we have own hook there, it properly handles Xen. This means we no longer need post scripts in kickstart for that. --- anaconda/data/post-scripts/50-qubes.ks | 5 ----- anaconda/pyanaconda/packaging/__init__.py | 7 +++---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/anaconda/data/post-scripts/50-qubes.ks b/anaconda/data/post-scripts/50-qubes.ks index 65e6161..1b9238b 100644 --- a/anaconda/data/post-scripts/50-qubes.ks +++ b/anaconda/data/post-scripts/50-qubes.ks @@ -1,10 +1,5 @@ %post rpm --import /etc/pki/rpm-gpg/* -for initrd in /boot/initramfs-*.img; do - version=`basename $initrd .img|cut -f 2- -d-` - dracut --force $initrd $version -done -grub2-mkconfig -o /boot/grub2/grub.cfg %end diff --git a/anaconda/pyanaconda/packaging/__init__.py b/anaconda/pyanaconda/packaging/__init__.py index b6aebb4..2aeb513 100644 --- a/anaconda/pyanaconda/packaging/__init__.py +++ b/anaconda/pyanaconda/packaging/__init__.py @@ -571,7 +571,7 @@ class Payload(object): # prevent boot on some systems def recreateInitrds(self, force=False): - """ Recreate the initrds by calling new-kernel-pkg + """ Recreate the initrds by calling kernel-install This needs to be done after all configuration files have been written, since dracut depends on some of them. @@ -585,9 +585,8 @@ class Payload(object): for kernel in self.kernelVersionList: log.info("recreating initrd for %s", kernel) - iutil.execWithRedirect("new-kernel-pkg", - ["--mkinitrd", "--dracut", - "--depmod", "--update", kernel], + iutil.execWithRedirect("kernel-install", + ["add", kernel, "/boot/vmlinuz-%s" % kernel], root=ROOT_PATH) self._createdInitrds = True