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.
release3.0
Marek Marczykowski-Górecki 9 years ago
parent 20ec7c3935
commit 2726c5a9f5
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -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

@ -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

Loading…
Cancel
Save