Skip to content

Commit

Permalink
nixos/systemd-initrd: create the /tmp mount point in the initrd
Browse files Browse the repository at this point in the history
systemd now requires the /tmp mount point in the initrd cpio archive
since systemd/systemd#25723

setting `"/tmp/.keep".text` will create the directory.

this fixes a boot failure:
```
(sd-gens): Failed to overmount /tmp/: No such file or directory
```
  • Loading branch information
gdamjan committed Mar 5, 2023
1 parent f7ce1d2 commit d2837a9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nixos/modules/system/boot/systemd/initrd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ in {
managerEnvironment.PATH = "/bin:/sbin";

contents = {
"/tmp/.keep".text = "systemd requires the /tmp mount point in the initrd cpio archive";
"/init".source = "${cfg.package}/lib/systemd/systemd";
"/etc/systemd/system".source = stage1Units;

Expand Down

0 comments on commit d2837a9

Please sign in to comment.