You may be referring to the boot sector and the master boot record which are
file system independent sectors on disk, which have 0x55, 0xaa at offset 510
and 511 into the sector (even if the sectors are bigger, which they rarely
are).
After that MS publish the spec for FAT filing systems, but I think that NTFS
is still secret, although no doubt available under some sort of NDA. (If
anyone knows of a full public spec for this, please share).
You can experiment from user mode, as raw disk access is permissible under
windows (need to run as admin in Vista). AFAIR you don’t get to see the
master boot record as when you open a “disk” for raw access the first sector
you see is the boot sector for that partition.
This opens disk D: for raw access:
char _devicename = “\\.\D:”;
hSimDisk = CreateFile(_devicename,GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
This causes Windows to dismount the drive from its filing system, so you are
on your own until you close it.
You can now reverse engineer away and it is especially easy to zap the disk,
often in ways that Windows can’t repair, so expect to reformat it frequently
after you write to it!
M.
>>>>----- Original Message -----
From: xxxxx@gmail.com
To: Windows System Software Devs Interest List
Sent: Wednesday, January 07, 2009 7:46 AM
Subject: RE:[ntdev] Writing data to sector - Points to consider
As far as I know this is related to NTFS for sanity checking. If I remember
correctly, these last two bytes are called as Magic Number (or something
like that) All sectors in a cluster have the same magic number and thus
helps in ensuring that this cluster is corrupted or not. I don’t see
anything like this in FAT.
>Thanks Deepak, It helps.
@James
>Thanks for ur inputs.
Why do you want to do this?
>In short It is more like a experiment at analysis level, which will
>decide our future approach to change a FAT DIRENT information. not
>included this information initially to reduce the length of post.
Aditya
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer