#1051507 grub-common.service fails on read-only root

Package:
grub-common
Source:
grub-common
Description:
GRand Unified Bootloader (common files)
Submitter:
Jörg Sommer
Date:
2023-09-10 11:54:04 UTC
Severity:
normal
Tags:
#1051507#5
Date:
2023-09-08 19:50:23 UTC
From:
To:
Hi,

my root filesystem (including /boot) is mounted read-only, which makes the
service grub-common fail:

```text
% journalctl -b -u grub-common
Sep 08 21:15:44 systemd[1]: Starting grub-common.service - Record successful boot for GRUB...
Sep 08 21:15:44 grub-editenv[865]: grub-editenv: Fehler: »/boot/grub/grubenv« kann nicht geöffnet werden: Das Dateisystem ist nur lesbar.
Sep 08 21:15:44 systemd[1]: grub-common.service: Main process exited, code=exited, status=1/FAILURE
Sep 08 21:15:44 systemd[1]: grub-common.service: Failed with result 'exit-code'.
Sep 08 21:15:44 systemd[1]: Failed to start grub-common.service - Record successful boot for GRUB.
```

I've added an additional condition:

```text
[Unit]
ConditionPathIsReadWrite=/boot/grub/grubenv
```

Regards,

Jörg

#1051507#10
Date:
2023-09-10 11:49:34 UTC
From:
To:
Control: tag -1 wontfix

Write access to the file is a necessity of recording a successful
boot, and hence a failure is the correct outcome here, otherwise
you don't notice the failure.

A write-only /boot should be considered unsupported.