qubes-installer-qubes-os/anaconda/data/post-scripts/40-qubes-alt-kernels.ks
Marek Marczykowski-Górecki 31a39b98c2 Revert "anaconda+lorax: install 3.11 VM kernel in addition to default one (#868)"
This reverts commit 277c6dde71.
DispVM is back working with newer kernels.
2014-06-27 17:25:21 +02:00

21 lines
833 B
Plaintext

%post --nochroot
for pkg in /run/install/repo/extrakernels/*.rpm; do
name=`basename $pkg .rpm`
rpm --root=$ANA_INSTALL_PATH -q $name > /dev/null || rpm --root=$ANA_INSTALL_PATH -i --oldpackage $pkg
done
# Set grub default to the current kernel if running not the latest one
latest=`basename /run/install/repo/Packages/k/kernel-[0-9]*.rpm .rpm|cut -d- -f2-`
if [ "$latest" != "`uname -r`" ]; then
rootdev=`grep " $ANA_INSTALL_PATH " /proc/mounts | cut -f 1 -d ' '`
sysid=`blkid -o value -s UUID $rootdev`
xenver=`dmesg | grep 'Xen version:' | sed -e 's/.*version: \([0-9.]\+\).*/\1/'`
grubid="gnulinux-advanced-$sysid"
grubid="$grubid>xen-hypervisor-$xenver-$sysid"
grubid="$grubid>xen-gnulinux-`uname -r`-advanced-$sysid"
grub2-set-default --boot-directory=$ANA_INSTALL_PATH/boot "$grubid"
fi
%end