Issue with the GRUB patch

Got back to my computer after a day & a half and decided to update, one of which is the latest patch for GRUB.

Ran yay and… now the update is currently stuck at post transaction hooks. Been stuck here for 10+ min now. Namely, it’s stuck on my Win10 install on another drive. I’m worried about killing this or rebooting. Here’s where my terminal is currently stuck at. One core has been maxed out this whole time.

:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) Warn about old perl modules
(3/5) Inform user to reboot after certain system package upgrades.
(4/5) Fix 'grub' and 'os-prober' after upgrading either of them.
===> INFO: grub-tools / grub-fix-initrd-generation:
===> INFO: /etc/grub.d/30_os-prober changed. See file /var/log/grub-fix-initrd-generation.log.
===> INFO: /etc/grub.d/10_linux changed. See file /var/log/grub-fix-initrd-generation.log.
Generating grub configuration file ...
Found theme: /boot/grub/themes/Tela/theme.txt
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot: initramfs-linux-zen-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot: initramfs-linux-zen-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
Found Windows Boot Manager on /dev/sda2@/efi/Microsoft/Boot/bootmgfw.efi

Here are my logs for the last 15 min:
http://ix.io/2sUQ

Any advice?

Can you show log file at /var/log/grub-fix*?

cat /var/log/grub-fix-initrd-generation.log

===> INFO: Changes for /etc/grub.d/30_os-prober:
210c210
<         LINITRD="`echo ${LINUX} | cut -d ':' -f 5 | tr '^' ' '`"
---
>         LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
===> INFO: Backup to /etc/grub.d/30_os-prober.bak.
===> INFO: Changes for /etc/grub.d/10_linux:
95c95
<             title="$(gettext_printf "%s, with kernel %s (recovery mode)" "${os}" "${version}")" ;;
---
>             title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
97c97
<             title="$(gettext_printf "%s, with kernel %s (fallback initramfs)" "${os}" "${version}")" ;;
---
>             title="$(gettext_printf "%s, with Linux %s (fallback initramfs)" "${os}" "${version}")" ;;
99c99
<             title="$(gettext_printf "%s, with kernel %s" "${os}" "${version}")" ;;
---
>             title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
143c143
<   message="$(gettext_printf "Loading kernel %s ..." ${version})"
---
>   message="$(gettext_printf "Loading Linux %s ..." ${version})"
===> INFO: Backup to /etc/grub.d/10_linux.bak.
===> INFO: /etc/default/grub not changed.
===> INFO: /usr/lib/linux-boot-probes/mounted/40grub2 not changed.

I just happened to the similar with Solus, there is some problem with Grub, since Solus was also updated.

The strange thing is that they are different disks, but well sometimes grub installs other distros, but they don’t always work.

[2020-08-01T23:00:27-0300] [PACMAN] Running 'pacman -Syu'
[2020-08-01T23:00:27-0300] [PACMAN] synchronizing package lists
[2020-08-01T23:00:37-0300] [PACMAN] starting full system upgrade
[2020-08-01T23:01:05-0300] [ALPM] transaction started
[2020-08-01T23:01:06-0300] [ALPM] upgraded libx11 (1.6.9-7 -> 1.6.10-1)
[2020-08-01T23:01:06-0300] [ALPM] upgraded xorg-server-common (1.20.8-2 -> 1.20.8-3)
[2020-08-01T23:01:06-0300] [ALPM] upgraded xorg-server (1.20.8-2 -> 1.20.8-3)
[2020-08-01T23:01:06-0300] [ALPM] upgraded mesa (20.1.4-1 -> 20.1.4-3)
[2020-08-01T23:01:06-0300] [ALPM] upgraded welcome (3.2.9-1 -> 3.2.10-1)
[2020-08-01T23:01:06-0300] [ALPM] warning: /etc/pacman.d/mirrorlist installed as /etc/pacman.d/mirrorlist.pacnew
[2020-08-01T23:01:06-0300] [ALPM] upgraded pacman-mirrorlist (20200606-1 -> 20200801-1)
[2020-08-01T23:01:06-0300] [ALPM] upgraded eos-update-notifier (1.7.5-1 -> 1.7.7-1)
[2020-08-01T23:01:07-0300] [ALPM] upgraded grub (2:2.04-7 -> 2:2.04-8)
[2020-08-01T23:01:07-0300] [ALPM] upgraded imagemagick (7.0.10.24-2 -> 7.0.10.25-1)
[2020-08-01T23:01:07-0300] [ALPM] upgraded lib32-libx11 (1.6.9-1 -> 1.6.10-1)
[2020-08-01T23:01:11-0300] [ALPM] upgraded python-psutil (5.7.0-1 -> 5.7.1-1)
[2020-08-01T23:01:11-0300] [ALPM] upgraded re2 (1:20200706-1 -> 1:20200801-1)
[2020-08-01T23:01:11-0300] [ALPM] upgraded xfwm4 (4.14.3-1 -> 4.14.4-1)
[2020-08-01T23:01:11-0300] [ALPM] transaction completed
[2020-08-01T23:01:11-0300] [ALPM] running '30-systemd-update.hook'...
[2020-08-01T23:01:11-0300] [ALPM] running 'detect-old-perl-modules.hook'...
[2020-08-01T23:01:11-0300] [ALPM] running 'eos-reboot-required.hook'...
[2020-08-01T23:01:11-0300] [ALPM] running 'grub-fix-initrd-generation.hook'...
[2020-08-01T23:01:11-0300] [ALPM-SCRIPTLET] ===> INFO: grub-tools / grub-fix-initrd-generation:
[2020-08-01T23:01:11-0300] [ALPM-SCRIPTLET] ===> INFO: /etc/grub.d/30_os-prober changed. See file /var/log/grub-fix-initrd-generation.log.
[2020-08-01T23:01:11-0300] [ALPM-SCRIPTLET] ===> INFO: /etc/grub.d/10_linux changed. See file /var/log/grub-fix-initrd-generation.log.
[2020-08-01T23:01:13-0300] [ALPM-SCRIPTLET] Generating grub configuration file ...
[2020-08-01T23:01:14-0300] [ALPM-SCRIPTLET] Found theme: /boot/grub/themes/EndeavourOS/theme.txt
[2020-08-01T23:01:15-0300] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-linux-hardened
[2020-08-01T23:01:15-0300] [ALPM-SCRIPTLET] Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-hardened.img
[2020-08-01T23:01:15-0300] [ALPM-SCRIPTLET] Found fallback initrd image(s) in /boot: initramfs-linux-hardened-fallback.img
[2020-08-01T23:01:15-0300] [ALPM-SCRIPTLET] Found linux image: /boot/vmlinuz-linux
[2020-08-01T23:01:15-0300] [ALPM-SCRIPTLET] Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
[2020-08-01T23:01:16-0300] [ALPM-SCRIPTLET] Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 6 (socket:[22194]) leaked on vgs invocation. Parent PID 2644: grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 7 (socket:[22195]) leaked on vgs invocation. Parent PID 2644: grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 8 (socket:[22198]) leaked on vgs invocation. Parent PID 2644: grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 9 (socket:[22200]) leaked on vgs invocation. Parent PID 2644: grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 6 (socket:[22194]) leaked on vgs invocation. Parent PID 2644: grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 7 (socket:[22195]) leaked on vgs invocation. Parent PID 2644: grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 8 (socket:[22198]) leaked on vgs invocation. Parent PID 2644: grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 9 (socket:[22200]) leaked on vgs invocation. Parent PID 2644: grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 6 (socket:[22194]) leaked on vgs invocation. Parent PID 2734: /usr/bin/grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 7 (socket:[22195]) leaked on vgs invocation. Parent PID 2734: /usr/bin/grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 8 (socket:[22198]) leaked on vgs invocation. Parent PID 2734: /usr/bin/grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 9 (socket:[22200]) leaked on vgs invocation. Parent PID 2734: /usr/bin/grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 6 (socket:[22194]) leaked on vgs invocation. Parent PID 2734: /usr/bin/grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 7 (socket:[22195]) leaked on vgs invocation. Parent PID 2734: /usr/bin/grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 8 (socket:[22198]) leaked on vgs invocation. Parent PID 2734: /usr/bin/grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] File descriptor 9 (socket:[22200]) leaked on vgs invocation. Parent PID 2734: /usr/bin/grub-probe
[2020-08-01T23:01:20-0300] [ALPM-SCRIPTLET] Found Solus (4.1) on /dev/mapper/SolusSystem-Root
[2020-08-01T23:01:23-0300] [ALPM-SCRIPTLET] done
[2020-08-01T23:01:23-0300] [ALPM] running 'gtk-update-icon-cache.hook'...
[2020-08-01T23:01:23-0300] [ALPM] running 'texinfo-install.hook'...
[2020-08-01T23:01:23-0300] [ALPM] running 'update-desktop-database.hook'...

/var/log/grub-fix

===> INFO: Changes for /etc/grub.d/30_os-prober:
210c210
<         LINITRD="`echo ${LINUX} | cut -d ':' -f 5 | tr '^' ' '`"
---
>         LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
===> INFO: Backup to /etc/grub.d/30_os-prober.bak.
===> INFO: Changes for /etc/grub.d/10_linux:
95c95
< 	      title="$(gettext_printf "%s, with kernel %s (recovery mode)" "${os}" "${version}")" ;;
---
> 	      title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
97c97
< 	      title="$(gettext_printf "%s, with kernel %s (fallback initramfs)" "${os}" "${version}")" ;;
---
> 	      title="$(gettext_printf "%s, with Linux %s (fallback initramfs)" "${os}" "${version}")" ;;
99c99
< 	      title="$(gettext_printf "%s, with kernel %s" "${os}" "${version}")" ;;
---
> 	      title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
143c143
<   message="$(gettext_printf "Loading kernel %s ..." ${version})"
---
>   message="$(gettext_printf "Loading Linux %s ..." ${version})"
===> INFO: Backup to /etc/grub.d/10_linux.bak.
===> INFO: /etc/default/grub not changed.
===> INFO: /usr/lib/linux-boot-probes/mounted/40grub2 not changed.

Have you upgraded/updated grub or os-prober yet as it says? Do you dual boot?

Yea, the GRUB update/patch is one of the updates I took.

I do have a (very rarely accessed) Win10 install on a different SSD.

If you happen to have any other linux installation too, I suggest you wait maybe max 20 minutes more.

Anyway, generating /boot/grub/grub.cfg is the last operation. Please check that file, it might be OK already. I’m not sure, if you stop it, only grub.cfg may be partly bad.

Currently Win10 is the only other OS I have installed on bare metal on this machine.

My current grub.cfg hasn’t been modified since before this process started, I believe. It’s 22:26 here now.

⚡ root@polak-deelucks  /boot/grub  ll
total 84K
drwxr-xr-x 1 root root  158 Aug  1 21:47 .
drwxr-xr-x 1 root root  338 Jul 30 21:06 ..
drwxr-xr-x 1 root root   22 Jul 27 23:38 fonts
-rw-r--r-- 1 root root  49K Aug  1 21:47 grub-btrfs.cfg
-rw------- 1 root root 7.5K Aug  1 21:47 grub.cfg
-rw------- 1 root root  13K Aug  1 21:47 grub.cfg.new
-rw-r--r-- 1 root root 1.0K Jul 27 23:38 grubenv
drwxr-xr-x 1 root root  526 Jul 27 23:38 locale
drwxr-xr-x 1 root root   48 Jul 28 22:50 themes
-rw-r--r-- 1 root root  150 Jul 28 22:48 unicode.pf2
drwxr-xr-x 1 root root 6.1K Jul 27 23:38 x86_64-efi

What’s the Solus in the output?
It seems to have trouble after grub.cfg generation.

Not following what you mean. Solus?

I don’t understand well, do you need the Solus grub output?

Sorry, I mixed Judd’s output…

Btw, it is 5.35 a.m. here…

Until tomorrow and rest !!

1 Like

Should I be ok to kill this and re-run grub-mkconfig -o /boot/grub/grub.cfg?

Here grub updated without problems. So I really don’t know what causes the delay, unless there is another linux installation on the disk.

Be sure to have backups of your important data!
But I guess you can stop it and try that command. Note: no guarantees though! :wink:

Hm. Killing, then running it gives me this curious output:

sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub/themes/Tela/theme.txt
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot: initramfs-linux-zen-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot: initramfs-linux-zen-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/amd-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
rmdir: failed to remove '/var/lib/os-prober/mount': Device or resource busy
rmdir: failed to remove '/var/lib/os-prober/mount': Device or resource busy
rmdir: failed to remove '/var/lib/os-prober/mount': Device or resource busy
rmdir: failed to remove '/var/lib/os-prober/mount': Device or resource busy
rmdir: failed to remove '/var/lib/os-prober/mount': Device or resource busy
rmdir: failed to remove '/var/lib/os-prober/mount': Device or resource busy
rmdir: failed to remove '/var/lib/os-prober/mount': Device or resource busy
rmdir: failed to remove '/var/lib/os-prober/mount': Device or resource busy
###### - Grub-btrfs: Snapshot detection started - ######
# Info: Separate boot partition not detected
# Found snapshot: 2020-08-01 21:47:10 | timeshift-btrfs/snapshots/2020-08-01_21-47-10/@
# Found snapshot: 2020-08-01 00:00:01 | timeshift-btrfs/snapshots/2020-08-01_00-00-01/@
# Found snapshot: 2020-07-31 12:26:36 | timeshift-btrfs/snapshots/2020-07-31_12-26-36/@
# Found snapshot: 2020-07-31 08:31:53 | timeshift-btrfs/snapshots/2020-07-31_08-31-53/@
# Found snapshot: 2020-07-30 23:11:15 | timeshift-btrfs/snapshots/2020-07-30_23-11-15/@
# Found snapshot: 2020-07-29 23:25:17 | timeshift-btrfs/snapshots/2020-07-29_23-25-17/@
# Found snapshot: 2020-07-29 00:00:01 | timeshift-btrfs/snapshots/2020-07-29_00-00-01/@
# Found snapshot: 2020-07-28 21:29:27 | timeshift-btrfs/snapshots/2020-07-28_21-29-27/@
# Found snapshot: 2020-07-28 01:22:49 | @
# Found snapshot: 2020-07-27 23:46:57 | timeshift-btrfs/snapshots/2020-07-27_23-46-57/@
# Found 10 snapshot(s)
###### - Grub-btrfs: Snapshot detection ended   - ######
done

Though, according to this article, rebooting is the solution.

The problem may be related to btrfs. I use ext4.
But does grub.cfg seem ok?

Maybe the previous grub generation left those partitions open…
Reboot may solve it.

I’m new to BTRFS myself, and to be honest I wouldn’t know where to look in there to see a problem.