summary refs log tree commit diff
path: root/nixos/modules/system/boot/stage-1-init.sh
diff options
context:
space:
mode:
authorJosef Kemetmueller <josef.kemetmueller@gmail.com>2017-06-27 22:09:05 +0200
committerJosef Kemetmueller <josef.kemetmueller@gmail.com>2017-06-27 22:13:51 +0200
commit899e2b5748e7c2ea0a4f5c2dde74b15f15fe7e69 (patch)
treee50d6fb2b593e9fc47ad9a866700e2d373c1ec9f /nixos/modules/system/boot/stage-1-init.sh
parent7116da8018e9015220c19fc8e3702f02834c6aeb (diff)
downloadnixpkgs-899e2b5748e7c2ea0a4f5c2dde74b15f15fe7e69.tar
nixpkgs-899e2b5748e7c2ea0a4f5c2dde74b15f15fe7e69.tar.gz
nixpkgs-899e2b5748e7c2ea0a4f5c2dde74b15f15fe7e69.tar.bz2
nixpkgs-899e2b5748e7c2ea0a4f5c2dde74b15f15fe7e69.tar.lz
nixpkgs-899e2b5748e7c2ea0a4f5c2dde74b15f15fe7e69.tar.xz
nixpkgs-899e2b5748e7c2ea0a4f5c2dde74b15f15fe7e69.tar.zst
nixpkgs-899e2b5748e7c2ea0a4f5c2dde74b15f15fe7e69.zip
Force check the filesystem before resizing
The message buffer of the kernel lists
> Please run 'e2fsck -f /dev/disk/by-label/nixos' first.
as the output of the command `resize2fs "$device"`.
This fixes NixOS/nixpkgs#26910.
Diffstat (limited to 'nixos/modules/system/boot/stage-1-init.sh')
-rw-r--r--nixos/modules/system/boot/stage-1-init.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh
index 9a125dcb0ae..1f4ab3eae07 100644
--- a/nixos/modules/system/boot/stage-1-init.sh
+++ b/nixos/modules/system/boot/stage-1-init.sh
@@ -301,6 +301,7 @@ mountFS() {
         *x-nixos.autoresize*)
             if [ "$fsType" = ext2 -o "$fsType" = ext3 -o "$fsType" = ext4 ]; then
                 echo "resizing $device..."
+                e2fsck -fp "$device"
                 resize2fs "$device"
             fi
             ;;