I have a disk partition image created using the dd command:
dd if=/dev/nvme1n1p2 of=/mnt/backup/windows.img
Now I want to reduce the amount of space it takes up, since there are not really that many files in this partition. But the following error occurs while running ntfsresize /mnt/backup/windows.img -if:
ntfsresize v2021.8.22 (libntfs-3g) Device name : /mnt/backup/windows.img NTFS volume version: 3.1 Cluster size : 4096 bytes Current volume size: 446161129984 bytes (446162 MB) Current device size: 446161131520 bytes (446162 MB) Checking filesystem consistency ... 100.00 percent completed Accounting clusters ... Cluster accounting failed at 1703 (0x6a7): extra cluster in $Bitmap Cluster accounting failed at 1775 (0x6ef): extra cluster in $Bitmap Cluster accounting failed at 1781 (0x6f5): extra cluster in $Bitmap Cluster accounting failed at 1782 (0x6f6): extra cluster in $Bitmap Cluster accounting failed at 1788 (0x6fc): extra cluster in $Bitmap Cluster accounting failed at 1789 (0x6fd): extra cluster in $Bitmap Cluster accounting failed at 1790 (0x6fe): extra cluster in $Bitmap Cluster accounting failed at 1801 (0x709): extra cluster in $Bitmap Cluster accounting failed at 1802 (0x70a): extra cluster in $Bitmap Cluster accounting failed at 1803 (0x70b): extra cluster in $Bitmap ERROR: $Bitmap size is smaller than expected (13615758 != 6615504)
I don't really have enough disk space to make it a real partition
How should I fix it?
I tried to fix it with ntfsfix but it doesn't work
ntfsfix /mnt/backup/windows.img Mounting volume... OK Processing of $MFT and $MFTMirr completed successfully. Checking the alternate boot sector... OK NTFS volume version is 3.1. NTFS partition /mnt/backup/windows.img was processed successfully.
When I try to mount it to windows to fix it using chkdsk, I don't find a way to mount it to windows