grub4dos
grub4dos copied to clipboard
Cannot write to small NTFS files on large partitions
I thought this was fixed (issue #12)???
The test file must be freshly made so it only uses $MFT for data to see the error.
no problem. You download it again and try again.
In addition, virtual machines can't really write.
Where is new download?
I tested in VM and on real system. Same problem.
Can you reproduce it?
Partition 1 SIZE=123087.514MiB Type: 07 NTFS\exFAT
START POS = CYL:0 HD:32 SEC:33 END POS = CYL:1023 HD:254 SEC:63
START (LBA) = 2,048 (00000800) SIZE (LBA) = 252,083,229 (0F067C1D) [End=252,085,276]
BPB TYPE=NTFS 000B Bytes Per Sector = 512 (0200h) 000D Sectors Per Cluster = 8 (08h) 0015 Media Descriptor = 248 (F8h) HDD 0020 Total Log. Sectors (big) = 0 (00000000h) 0028 Total Sectors on HDD = 000000000F067C1Ch 0030 Log. Cluster no. for $MFT file = 0000000000003C66h 0038 Log. Cluster no. for $MFTMirr file = 0000000000005589h 0040 Clusters per MFT Record = 246 (F6h) 0044 Clusters per Index Buffer = 117 (75h) 0048 Volume ID Serial No. = 1EB2B426B2B40475h
This is a large 512GB drive which has probably had partitions resized.
Works OK on larger files.
BPB TYPE=NTFS 000B Bytes Per Sector = 512 (0200h) 000D Sectors Per Cluster = 8 (08h) 0015 Media Descriptor = 248 (F8h) HDD 0020 Total Log. Sectors (big) = 0 (00000000h) 0028 Total Sectors on HDD = 000000000F067C1Ch 0030 Log. Cluster no. for $MFT file = 0000000000003C66h 0038 Log. Cluster no. for $MFTMirr file = 0000000000005589h 0040 Clusters per MFT Record = 246 (F6h) 0044 Clusters per Index Buffer = 117 (75h) 0048 Volume ID Serial No. = 1EB2B426B2B40475h
Works OK on smaller drive So problem to do with the NTFS partition size?
BPB TYPE=NTFS 000B Bytes Per Sector = 512 (0200h) 000D Sectors Per Cluster = 8 (08h) 0015 Media Descriptor = 248 (F8h) HDD 0020 Total Log. Sectors (big) = 0 (00000000h) 0028 Total Sectors on HDD = 000000000733B7C0h 0030 Log. Cluster no. for $MFT file = 00000000000C0000h 0038 Log. Cluster no. for $MFTMirr file = 0000000000000002h 0040 Clusters per MFT Record = 246 (F6h) 0044 Clusters per Index Buffer = 152 (98h) 0048 Volume ID Serial No. = C442273E42273498h
Partition 1 SIZE=58998.969MiB Type: 07 NTFS\exFAT ACTIVE START POS = CYL:0 HD:32 SEC:33 END POS = CYL:1023 HD:254 SEC:63 START (LBA) = 2,048 (00000800) SIZE (LBA) = 120,829,889 (0733B7C1) [End=120,831,936]
Here is blocklist results for different sizes of file on the large 512GB drive 58GB partition
If file is over 680 bytes then data is written to new cluster, not resident $MFT record.
Note $mft in two parts!!! blocklist address for file 680.txt does not look correct ???
This is the original note: Limitations:
- Don't support >1K MFT record size, >4K INDEX record size
- Don't support encrypted file
- Don't support >4K non-resident attribute list and $BITMAP
Now "MFT record size"is up to 948K! Now "INDEX record size"is up to 608K! Some are still normal, Can't expect too much .
Of course, there are still some problems with grub4dos support for NTFS.
OK. I didn't see that limitation. Why is no error reported? Not even if debug 3 or debug msg=3 is used? It would be useful to tell user that write failed.
For completeness, please could you outline the limitations for all supported filesystems? e.g. writes to exFAT, writes to ext2/3/4, etc? It would be useful to be aware of the limitations.
I have a simple ntfs code: https://github.com/tpunix/GRNB/blob/master/fs_ntfs.c