-
Vangelis Koukis authored
snf-image already supports online resizing of NTFS; it creates an appopriate DISKPART script inside the target NTFS and assumes it will be called by SYSPREP via a pre-existing <RunSynchronousCommand> entry in the unattend.xml answer file. This is generally the safest option, since it uses native Windows code, but has two drawbacks: a) It is only supported by Windows Vista and later, b) It is possible the Image will fail before SYSPREP has a chance to run the DISKPART script, because it does not have enough free space. Extend snf-image to also support offline resize of NTFS via ntfsresize, before the Image is booted. This works with all Windows versions and ensures the Image is resized to the right size even before booting. To be on the safe side, offline NTFS resize is not the default: The user must set the OFFLINE_NTFSRESIZE property explicitly. Running ntfsresize leaves the filesystem dirty, i.e., a CHKDSK is performed during the next boot. The user may set the OFFLINE_NTFSRESIZE_NOCHECK property to skip this.
88406207