mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
nixos/stage-1: follow mount options
For fileSystems needed for boot which are bind mounts, busybox tend to ignore mount options, so we remount right afterwards
This commit is contained in:
parent
eedee8f9e0
commit
b25259e021
|
@ -410,6 +410,11 @@ mountFS() {
|
|||
n=$((n + 1))
|
||||
done
|
||||
|
||||
# For bind mounts, busybox has a tendency to ignore options, which can be a
|
||||
# security issue (e.g. "nosuid"). Remounting the partition seems to fix the
|
||||
# issue.
|
||||
mount "/mnt-root$mountPoint" -o "remount,$optionsPrefixed"
|
||||
|
||||
[ "$mountPoint" == "/" ] &&
|
||||
[ -f "/mnt-root/etc/NIXOS_LUSTRATE" ] &&
|
||||
lustrateRoot "/mnt-root"
|
||||
|
|
Loading…
Reference in a new issue