Comment 8 for bug 110138

Revision history for this message
Theodore Ts'o (tytso) wrote :

OK, I've looked at this some more, and I think I can guess what happened.

The NTFS superblock is located in the boot sector (the first 512-byte sector on the disk). Code to zap the bootsector has been in mke2fs for a long time (since at least 2000, and probably earlier). However, in 2002 we added code to avoid zapping the bootsector if it looked like a BSD disk label, since that cause problems. I'm guessing that you had a partifion which previously had contained NTFS, or which at any rate had the NTFS signature at offset 3 from the beginning of the boot sector, but which also looked like BSD disk label, so mke2fs avoided clearing out the boot sector. This allowed blkid to misidentify the filesystem.

The enclosed patches, which will be in e2fsprogs 1.40, tries harder to validate that the partition really is NTFS, and sets the NTFS UUID and Label information. It still can get fooled, since the MFT is located near the middle of the disk, so it won't necessarily get zapped by mke2fs.

I will also probably change mke2fs so that it will be more aggressive about zapping the boot sector if it contains an NTFS signature.