From c24e91732598f088acdb49129002fa437ec33192 Mon Sep 17 00:00:00 2001 From: Victor Shlein Date: Tue, 19 Jun 2018 01:25:00 +0300 Subject: [PATCH] nixos/stage-1: added F2FS resizing F2FS is used on Raspberry Pi-like devices to enhance SD card performance. Allowing F2FS resizing would help in automatic deploying of SD card images without a Linux box to resize the file system offline. --- nixos/modules/system/boot/stage-1-init.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index de8451bbe31b..227ab4500025 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -336,6 +336,10 @@ mountFS() { echo "resizing $device..." e2fsck -fp "$device" resize2fs "$device" + else [ "$fsType" = f2fs ]; then + echo "resizing $device..." + fsck.f2fs -fp "$device" + resize.f2fs "$device" fi ;; esac