Skip to content

Commit 54a65ab

Browse files
authored
nixos/systemd-initrd: silence various warnings (#432704)
2 parents 9566814 + 216d98a commit 54a65ab

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

nixos/modules/system/boot/systemd/initrd.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@ in
481481
settings.Manager.DefaultEnvironment = "PATH=/bin:/sbin";
482482

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

@@ -503,6 +502,8 @@ in
503502

504503
"/bin".source = "${initrdBinEnv}/bin";
505504
"/sbin".source = "${initrdBinEnv}/sbin";
505+
"/usr/bin".source = "${initrdBinEnv}/bin";
506+
"/usr/sbin".source = "${initrdBinEnv}/sbin";
506507

507508
"/etc/os-release".source = config.boot.initrd.osRelease;
508509
"/etc/initrd-release".source = config.boot.initrd.osRelease;

pkgs/build-support/kernel/make-initrd-ng.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ runCommand name
100100
++ lib.optional makeUInitrd ubootTools;
101101
})
102102
''
103-
mkdir -p ./root/var/empty
103+
mkdir -p ./root/{run,tmp,var/empty}
104+
ln -s ../run ./root/var/run
104105
make-initrd-ng "$contentsPath" ./root
105106
mkdir "$out"
106107
(cd root && find . -exec touch -h -d '@1' '{}' +)

0 commit comments

Comments
 (0)