Oh, there may be a problem...
On my N905C the boot sector copy is not sector 6, but sector 3. Doing some more testing this seems to be unique to busybox mkfs.vfat, dosfstools mkfs.vfat sticks to 6 no matter what. Seriously - what the heck?!
My mod blindly assumes sector 6. So for filesystems where it's in sector 3, it ends up blindly writing into sector 6 anyway. It does check if it's still mountable afterwards and reverts if that isn't the case, but depending what the filesystem driver does when it encounters corrupt data the device might also crash [didn't do so for me, but...].
Guess I'll have to teach it to read the correct sector value from the FAT32 header. What's the point of a backup sector, if you need the original sector to tell you where the backup sector is?
I only noticed the problem while trying to write a Windows app that performs the same change, and I checked for presence of FAT32 header there so it won't patch your NTFS disks... only for the N905C the FAT32 backup header just wasn't there...
|