I have a backup system file, I would like to shrink a ntfs partition inside the system file in order to copy it into a new smaller disk.
I mounter the ntfs partition with losetup and used
ntfsresize in order to shrink the filesystem.
BUT, by unmounting and watching the disk with
gdisk, the partition is still the same size.
I read somewhere, I need to shrink the partition too. I thought it was same... Then I would like to know how I could get the final sector of the filesystem in order to resize the partition at the same size.
It is a little bit weird for me because we shrink the ntfs filesystem and then remove the partition and create a new one with a smaller size, I don't understand how it is possible to not loose data.