The legacy stage-1 generates the /etc/fstab from fsInfo but incorrectly adds a trailing , character to the mount options. While does not appear to have caused any issue yet we should trim the trailing , to be safe.
Generated /etc/fstab during stage-1:
tmpfs /mnt-root tmpfs mode=0755,
stage-1 also currently remounts all fileSystems as a fix for busybox not respecting mount options on bind (and rbind) mount points. This results in a unintended errors during stage-1 if a file system such as NFS is mounted which does allow remounting with all of the original options present (i.e some options can only be set during the initial mount).
Error during stage-1 mounting NFS share:
mount: mounting server.example.test:/nix/store on /mnt-root/nix/.ro-store failed: Invalid argument
Things done
Built and ran legacyPackages.x86_64-linux.nixosTests.early-mount-options.
Built on platform(s)
[] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin
For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
Description
The legacy stage-1 generates the
/etc/fstab
from fsInfo but incorrectly adds a trailing,
character to the mount options. While does not appear to have caused any issue yet we should trim the trailing,
to be safe.Generated
/etc/fstab
during stage-1:stage-1 also currently remounts all fileSystems as a fix for busybox not respecting mount options on bind (and rbind) mount points. This results in a unintended errors during stage-1 if a file system such as NFS is mounted which does allow remounting with all of the original options present (i.e some options can only be set during the initial mount).
Error during stage-1 mounting NFS share:
Things done
Built and ran
legacyPackages.x86_64-linux.nixosTests.early-mount-options
.nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)