Fedora image: be sure to use right kernel version when generating
initramfs
This commit is contained in:
parent
65f5bfb996
commit
d11620a9fb
1 changed files with 2 additions and 1 deletions
|
@ -143,7 +143,8 @@ run_root dnf -y install kernel grub2
|
||||||
cat > /mnt/etc/dracut.conf.d/virtio-blk.conf <<EOF
|
cat > /mnt/etc/dracut.conf.d/virtio-blk.conf <<EOF
|
||||||
add_drivers="virtio-blk"
|
add_drivers="virtio-blk"
|
||||||
EOF
|
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.
|
# Configure grub2.
|
||||||
run_root grub2-install --target=i386-pc "${NBD_DEVICE}"
|
run_root grub2-install --target=i386-pc "${NBD_DEVICE}"
|
||||||
|
|
Loading…
Reference in a new issue