dracut won't build initramfs under centos stream

Issues related to applications and software problems and general support
Post Reply
whiphubley
Posts: 6
Joined: 2021/09/04 16:20:25

dracut won't build initramfs under centos stream

Post by whiphubley » 2021/09/04 16:30:02

during yum update dracut is stuck at this stage...

dracut[123236]: Executing: /usr/bin/dracut -f /boot/initramfs-4.18.0-338.el8.x86_64.img 4.18.0-338.el8.x86_64

running manually in verbose mode doesn't help much...

# dracut -vvv -f /boot/initramfs-4.18.0-338.el8.x86_64.img 4.18.0-338.el8.x86_64
dracut: Executing: /usr/bin/dracut -vvv -f /boot/initramfs-4.18.0-338.el8.x86_64.img 4.18.0-338.el8.x86_64

just sits there forever.

any ideas if this is a known bug or how I can troubleshoot further ? thanks very much.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: dracut won't build initramfs under centos stream

Post by TrevorH » 2021/09/04 17:17:44

First I've heard of it. Switch to a different terminal and run ps fax and see what the process tree looks like and see what dracut is running at the time it gets stuck. Got any NFS mounts or similar things that might hang a process if they look at it and it doesn't respond?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

whiphubley
Posts: 6
Joined: 2021/09/04 16:20:25

Re: dracut won't build initramfs under centos stream

Post by whiphubley » 2021/09/04 20:14:37

so it runs when a new kernel gets installed as part of the rpm script...this is normal...but in this case it just hangs and the initramfs is never built.

$ rpm -q --scripts kernel-core-4.18.0-338.el8.x86_64 | grep add-kernel
/usr/sbin/weak-modules --add-kernel 4.18.0-338.el8.x86_64 || exit $?

$ grep "dracut -f" /usr/sbin/weak-modules
$dracut -f "$tmp_initramfs" "$kernel"

as noted when I run the dracut by hand it still fails.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: dracut won't build initramfs under centos stream

Post by TrevorH » 2021/09/04 21:13:07

Try what I suggested.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

whiphubley
Posts: 6
Joined: 2021/09/04 16:20:25

Re: dracut won't build initramfs under centos stream

Post by whiphubley » 2021/09/05 12:46:54

you suggested looking at the process...I've provided that. it's yum installing an RPM and the script in the RPM running dracut. and no this is not off an NFS share. thanks anyway for your help...I think this is a dracut and / or kernel issue.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: dracut won't build initramfs under centos stream

Post by TrevorH » 2021/09/05 12:49:17

you suggested looking at the process...I've provided that.
No, I suggested switching to a different terminal while dracut is running and stuck and then running ps fax | less so you can see the entire process tree including all the sub-processes that dracut has spawned. I've not seen the output from that.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

whiphubley
Posts: 6
Joined: 2021/09/04 16:20:25

Re: dracut won't build initramfs under centos stream

Post by whiphubley » 2021/09/05 13:21:39

OK good shout..

71464 pts/4 S+ 0:00 | \_ /bin/bash -p /bin/dracut -f /boot/initramfs-4.18.0-338.el8.x86_64.img 4.18.0-338.el8.x86_64
71483 pts/4 S+ 0:00 | \_ /bin/cat
71601 pts/4 S+ 0:00 | \_ /bin/bash -p /bin/dracut -f /boot/initramfs-4.18.0-338.el8.x86_64.img 4.18.0-338.el8.x86_64
71602 pts/4 D+ 0:00 | \_ lvm vgs --noheadings -o pv_name cs_ctream

So it seems that _any_ LV command just hangs...so clearly something is very wrong ( which is annoying as I actually use LVM for my setup )

So...off to investigate why LV seems...stuck.

Thanks.

whiphubley
Posts: 6
Joined: 2021/09/04 16:20:25

Re: dracut won't build initramfs under centos stream

Post by whiphubley » 2021/09/05 13:24:31

Hmm...looks like the yum update got a new version of lvm2...

# rpm -qi lvm2 | grep ^Build
Build Date : Thu 12 Aug 2021 06:06:53 BST
Build Host : x86-01.mbox.centos.org

They weren't kidding when they said CentOS Stream may cause issues, huh !!

whiphubley
Posts: 6
Joined: 2021/09/04 16:20:25

Re: dracut won't build initramfs under centos stream

Post by whiphubley » 2021/09/05 15:21:36

OK great doc here : https://access.redhat.com/solutions/57300

So I added the following filter to /etc/lvm/lvm.conf to exclude non-block-devices from the scan...

# grep ^filter /etc/lvm/lvm.conf
filter = [ "a|/dev/sda.*|", "a|/dev/sdb.*|", "r|/dev/sdc.*|", "r|/dev/sdd.*|", "r|/dev/sde.*|" ]

( essentially sda / sdb are the two SSD in my system under LVM control )

And now the LV command complete...so dracut completes...and I can boot into the new kernel !!

Thanks for your help.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: dracut won't build initramfs under centos stream

Post by TrevorH » 2021/09/05 15:32:42

Great, glad you got it fixed. If you think this might be a generic problem with Stream then you should probably report it as a bug on bugzilla.redhat.com in the RHEL section where you should be able to specify a version of "Stream". If they don't know there is a problem then this may well go out as part of RHEL 8.5 once it arrives.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply