fsBefore does not recognise one filesystem as depending on another filesystem in the case of bind mounts where the source of the bind mount is not itself a mount point #86955
Labels
0.kind: bug
Something is broken
6.topic: nixos
Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Describe the bug
stage-1.nix
generates a list of file systems that are needed for boot. This list is not topologically sorted, which leads to situations where the system won't boot because the file systems aren't mounted in the right order.Edit: After looking at it for a while, it seems the real problem is that this function is too strict:
I think it should be something like this instead:
To Reproduce
Because
/nix
comes before/persist
alphabetically, it's mounted first (which fails). You can read theinitrd-fsinfo
file using:nixos-rebuild build
nix-store -qR ./result | grep initrd-linux
archivemount <result of last command>/initrd mnt
cat mnt/nix/store/*initrd-fsinfo*
Expected behavior
The list of file systems to be topologically sorted.
Additional context
Originally found this while trying to try out root-on-tmpfs.
Notify maintainers
Couldn't find anyone.
Metadata
"x86_64-linux"
Linux 5.6.7, NixOS, 20.03.1619.ab3adfe1c76 (Markhor)
yes
yes
nix-env (Nix) 2.3.4
"nixos-20.03.1619.ab3adfe1c76, nixos-19.09-19.09.2477.a7ceb2536ab, nixos-unstable-20.09pre223023.fce7562cf46, nixos-unstable-small-20.09pre223385.3b00e78e63b"
"nixpkgs-20.09pre221814.10100a97c89"
/home/jakob/.nix-defexpr/channels/nixpkgs
Maintainer information:
The text was updated successfully, but these errors were encountered: