[bitfolk] EPEL kernel-ml boot problems - no block devices

Top Page
Author: Andy Smith
Date:  
To: users
Subject: [bitfolk] EPEL kernel-ml boot problems - no block devices

Reply to this message
gpg: Signature made Sat Dec 4 05:58:33 2021 UTC
gpg: using DSA key 0E4236CB52951E14536066222099B64CBF15490B
gpg: Good signature from "Andy Smith <andy@strugglers.net>" [unknown]
gpg: aka "Andrew James Smith <andy@strugglers.net>" [unknown]
gpg: aka "Andy Smith (UKUUG) <andy.smith@ukuug.org>" [unknown]
gpg: aka "Andy Smith (BitFolk Ltd.) <andy@bitfolk.com>" [unknown]
gpg: aka "Andy Smith (Linux User Groups UK) <andy@lug.org.uk>" [unknown]
gpg: aka "Andy Smith (Cernio Technology Cooperative) <andy.smith@cernio.com>" [unknown]
Hi,

Some time in the last 6 months the kernel-ml kernel and associated packages from
EPEL (used to work under Xen on CentOS 7, 8 and later and other
RHEL-like) seems to not include the module xen-blkfront in the
initramfs that it creates. As a result you don't see any block
devices at boot.

I don't know if this is intentional. I don't exactly know how it's
meant to work. I *think* that dracut is supposed to be able to work
out what drivers are required for your root filesystem and include
those without you having to do anything special.

Whatever the case it is not doing it right now. It's easy to fix
though.

# lsinitrd /boot/initramfs-5.15.6-1.el7.elrepo.x86_64.img | grep xen-
xen-netfront
# # note: no xen-blkfront
# cat > /etc/dracut.conf.d/xen.conf <<End-of-script
add_drivers+=" xen-blkfront "
End-of-script
# dracut -f --kver "5.15.6-1.el7.elrepo.x86_64" /boot/initramfs-5.15.6-1.el7.elrepo.x86_64.img
# lsinitrd /boot/initramfs-5.15.6-1.el7.elrepo.x86_64.img | grep xen-
xen-netfront
xen-blkfront

If your VM is currently unbootable you'll need to do this from the
rescue VM:

user@rescue:~$ sudo -s
root@rescue:/home/user# mount /dev/xvda1 /mnt
root@rescue:/home/user# cd /mnt
root@rescue:/mnt# mount -t proc /proc proc/
root@rescue:/mnt# mount --rbind /sys sys/
root@rescue:/mnt# mount --rbind /dev dev/
root@rescue:/mnt# chroot /mnt /bin/bash
[root@rescue /]# # This is your CentOS install, proceed as above

Our installer for CentOS 8 takes care of the above for you right
now, but if you have a pre-existing CentOS 7 or 8 (or whatever)
system using kernel-ml from EPEL then you may want to confirm that
your initramfs still has xen-blkfront inside of it otherwise you
will get a nasty surprise at next boot.

Cheers,
Andy

--
https://bitfolk.com/ -- No-nonsense VPS hosting