Skip to content

Commit

Permalink
nixos: Fix fsck with systemd 251.6 and later
Browse files Browse the repository at this point in the history
Version 251.6 of systemd introduced a small change[1] that now checks
whether the fsck command is available in *addition* to the filesystem
specific fsck.$fsname executable.

When bumping systemd to version 251.7 on our side[2], we introduced that
change. This subsequently caused our "fsck" test to fail and it looks
like this was an oversight during the pull request[3] introducing the
bump.

Since the fsck wrapper binary is in util-linux, I decided to address
this by adding util-linux to fsPackages because util-linux is already
part of the closure of any NixOS system so the impact should be pretty
low.

[1]: systemd/systemd-stable@73db7d9
[2]: NixOS@844a08c
[3]: NixOS#199618

Signed-off-by: aszlig <aszlig@nix.build>
  • Loading branch information
aszlig authored and rtimush committed Sep 21, 2023
1 parent cac7705 commit 7afe3a8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nixos/modules/tasks/filesystems.nix
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,11 @@ in
boot.supportedFilesystems = map (fs: fs.fsType) fileSystems;

# Add the mount helpers to the system path so that `mount' can find them.
system.fsPackages = [ pkgs.dosfstools ];
system.fsPackages = [
pkgs.dosfstools
# This is needed for the main fsck utility wrapping the fs-specific ones.
pkgs.util-linux
];

environment.systemPackages = with pkgs; [ fuse3 fuse ] ++ config.system.fsPackages;

Expand Down

0 comments on commit 7afe3a8

Please sign in to comment.