Bug#1051514: grub-common: Please remove grub-common.service from boot hot path

Paul Menzel pmenzel at molgen.mpg.de
Fri Sep 8 23:21:29 BST 2023


Package: grub-common
Version: 2.12~rc1-9
Severity: normal


Dear Debian folks,


The unit `grub-common.service` is installed to the multi-user.target and 
therefore run during boot-up, slowing down the boot, especially as shell 
commands are used.

```
$ systemctl cat grub-common.service
# /lib/systemd/system/grub-common.service
[Unit]
Description=Record successful boot for GRUB
After=suspend.target hibernate.target hybrid-sleep.target 
suspend-then-hibernate.target
ConditionPathExists=/boot/grub/grub.cfg

[Service]
Type=oneshot
Restart=no
ExecStartPre=/bin/sh -c '[ -s /boot/grub/grubenv ] || rm -f 
/boot/grub/grubenv; mkdir -p /boot/grub'
ExecStart=grub-editenv /boot/grub/grubenv unset recordfail
ExecStartPost=/bin/sh -c 'if grub-editenv /boot/grub/grubenv list | grep 
-q initrdless_boot_fallback_triggered=1; then echo "grub: 
GRUB_FORCE_PARTUUID set, initrdless boot paniced, fallback triggered."; fi'
StandardOutput=kmsg

[Install]
WantedBy=multi-user.target suspend.target hibernate.target 
hybrid-sleep.target suspend-then-hibernate.target
```

It’d be great, if you removed it from the hot path and it would be run 
by some kind of timer.


Kind regards,

Paul



More information about the Pkg-grub-devel mailing list