You need the ntfsresize
utility from the ntfs-3g
package, which can resize NTFS file system. However, be sure to backup the partition before you make any changes to it, since sometimes Windows have other ideas of what the resized partition should look like.
The backup can be conveniently performed with the ntfsclone
utility (same package), since that saves only the file system (that is the file contents and metadata) and not the whole partition:
ntfsclone -s -o windows-partitinon.img /dev/sdXY
If you are tight on disk space and/or have plenty of time, compressing the image is a good idea:
ntfsclone -s -o - /dev/sdXY | xz -v -9 > windows-partitinon.img.xz
Beware that for moderately full Windows system partition (not much user data), say ~40GB, it can take several hours, depending on the compression level). On the other hand you can as well get to about 40-30% of the uncompressed size.
Apart from that, remember to backup your partition layout to be able to perform full restore. If you are using MBR partition table without any logical partitions, all you need is the MBR of the affected device:
dd if=/dev/sdX bs=512 count=1 of=mbr.sav
If logical partitinos are present, at least save the textual description, e.g.:
fdisk -l -u s /dev/sdX > partitions.sav
For GPT you can use gdisk
, which has the ability to save GPT data into a file and then load it back.
Then you can run ntfsresize
in write mode. It will likely tell you to reboot to Windows (probably several times), to make sure the changes are registered by the OS.
Only after all this is done, you can resize the partition(s). parted
is probably as good as any other partitioning program that understands the partitioning scheme used on that hard drive.