Fedora image: be sure to use right kernel version when generating

initramfs
This commit is contained in:
fnux 2019-12-17 10:18:40 +01:00
parent 65f5bfb996
commit d11620a9fb

View file

@ -143,7 +143,8 @@ run_root dnf -y install kernel grub2
cat > /mnt/etc/dracut.conf.d/virtio-blk.conf <<EOF
add_drivers="virtio-blk"
EOF
run_root dracut --force
kernel_version=$(ls /mnt/boot | grep "vmlinuz.*.$ARCH" | cut -d- -f2-)
run_root dracut --force --kver $kernel_version
# Configure grub2.
run_root grub2-install --target=i386-pc "${NBD_DEVICE}"