What were you trying to do that didn't work?
Running grub2-mkconfig while an LVM2 snapshot of the root file system is present.
Please provide the package NVR for which bug is seen:
grub2-tools-2.06-77.el9.x86_64
How reproducible:
100%
Steps to reproduce
-
lvcreate -L <size> -n root-snap rhel/root lvcreate -L <size> -n var-snap rhel/var lvcreate -L <size> -n home-snap rhel/home
-
grub2-mkconfig -o /var/tmp/grub.cfg
Expected results
grub2-mkconfig exits normally and writes the specified grub.cfg file.
Actual results
[root@localhost ~]# grub2-mkconfig -o /var/tmp/grub.cfg
Generating grub configuration file ...
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41229: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41229: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41229: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41229: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41229: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41229: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41229: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41229: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41229: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41229: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41229: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41229: grub2-probe
grub2-probe: error: ../grub-core/kern/fs.c:121:unknown filesystem.
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41339: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41339: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41339: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41339: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41339: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41339: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41339: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41339: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41339: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41339: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41339: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41339: grub2-probe
grub2-probe: error: ../grub-core/kern/fs.c:121:unknown filesystem.
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41511: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41511: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41511: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41511: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41511: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41511: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41511: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41511: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41511: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41511: grub2-probe
File descriptor 3 (pipe:[77384]) leaked on vgs invocation. Parent PID 41511: grub2-probe
File descriptor 9 (pipe:[77425]) leaked on vgs invocation. Parent PID 41511: grub2-probe
grub2-probe: error: ../grub-core/kern/fs.c:121:unknown filesystem.
/usr/sbin/grub2-probe: error: ../grub-core/kern/fs.c:121:unknown filesystem.
Found Red Hat Enterprise Linux 9.4 (Plow) on /dev/mapper/rhel-root--snap
[... hangs forever ...]
ps ax --forest output:
2060 pts/0 Ss 0:00 \_ -bash 40725 pts/0 S+ 0:00 | \_ /usr/bin/sh /usr/sbin/grub2-mkconfig -o /var/tmp/grub.cfg 40984 pts/0 S+ 0:00 | \_ /usr/bin/sh /etc/grub.d/30_os-prober 41636 pts/0 S+ 0:00 | \_ /usr/bin/sh /etc/grub.d/30_os-prober 41637 pts/0 S+ 0:00 | \_ /usr/bin/sh /usr/bin/linux-boot-prober /dev/mapper/rhel-root--snap 41654 pts/0 S+ 0:00 | | \_ /usr/bin/sh /usr/bin/linux-boot-prober /dev/mapper/rhel-root--snap 41656 pts/0 S+ 0:00 | | \_ logger 41638 pts/0 S+ 0:00 | \_ tr ^ 41639 pts/0 S+ 0:00 | \_ paste -s -d 41691 pts/1 Ss 0:00 \_ -bash 41717 pts/1 R+ 0:00 \_ ps ax --forest
A grub2-mount process is also running and has a mount at /var/lib/os-prober/mount:
41668 ? Ss 0:00 grub2-mount /dev/mapper/rhel-root--snap /var/lib/os-prober/mount
[root@localhost ~]# mount | grep mount
grub2-mount on /var/lib/os-prober/mount type fuse.grub2-mount (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
The mount persists after killing grub2-mkconfig with Ctrl-C and has to be cleaned up manually. The new grub.cfg is not written.