Merge pull request #6477 from ts468/stage-1-2
Enhance stage-1/2 scripts for better dealing with squashfs
This commit is contained in:
commit
24c10d0612
|
@ -218,6 +218,9 @@ checkFS() {
|
||||||
# Don't check resilient COWs as they validate the fs structures at mount time
|
# Don't check resilient COWs as they validate the fs structures at mount time
|
||||||
if [ "$fsType" = btrfs -o "$fsType" = zfs ]; then return 0; fi
|
if [ "$fsType" = btrfs -o "$fsType" = zfs ]; then return 0; fi
|
||||||
|
|
||||||
|
# Skip fsck for inherently readonly filesystems.
|
||||||
|
if [ "$fsType" = squashfs ]; then return 0; fi
|
||||||
|
|
||||||
# If we couldn't figure out the FS type, then skip fsck.
|
# If we couldn't figure out the FS type, then skip fsck.
|
||||||
if [ "$fsType" = auto ]; then
|
if [ "$fsType" = auto ]; then
|
||||||
echo 'cannot check filesystem with type "auto"!'
|
echo 'cannot check filesystem with type "auto"!'
|
||||||
|
|
|
@ -50,8 +50,10 @@ echo "booting system configuration $systemConfig" > /dev/kmsg
|
||||||
# Make /nix/store a read-only bind mount to enforce immutability of
|
# Make /nix/store a read-only bind mount to enforce immutability of
|
||||||
# the Nix store. Note that we can't use "chown root:nixbld" here
|
# the Nix store. Note that we can't use "chown root:nixbld" here
|
||||||
# because users/groups might not exist yet.
|
# because users/groups might not exist yet.
|
||||||
chown 0:30000 /nix/store
|
# Silence chown/chmod to fail gracefully on a readonly filesystem
|
||||||
chmod 1775 /nix/store
|
# like squashfs.
|
||||||
|
chown -f 0:30000 /nix/store
|
||||||
|
chmod -f 1775 /nix/store
|
||||||
if [ -n "@readOnlyStore@" ]; then
|
if [ -n "@readOnlyStore@" ]; then
|
||||||
if ! readonly-mountpoint /nix/store; then
|
if ! readonly-mountpoint /nix/store; then
|
||||||
mount --bind /nix/store /nix/store
|
mount --bind /nix/store /nix/store
|
||||||
|
|
Loading…
Reference in New Issue