Hi All,
I am presently working on a hard disk project.
The first sector of hard disk is called as MBR(Master boot Record).
Using ATA protocol,READ SECTOR command i am able to read the MBR data.
In second to Fifth sector i am getting Zero data in every sector.It is FAT32 partitioned hard disk.
I have a question in mind.
Whether in every hard disk the data sector starts from fifth sector?
If anybody is having related documents ,please provide the link to me.
AND
What is the between physical and logical address in case of hard disk?
Regards,
Ravi
Data Sectors of hard disks
-
- Posts: 13
- Joined: Mon Apr 14, 2008 2:32 am
- Location: Pune,India
You must read the partition table in the MBR. There is plenty of documentation on partition tables with a quick search. The will not always start at the 5th sector, my partitioning software uses the first sector for the MBR, and the very next sector starts the first partition. I don't leave gaps between them, but some software does, and some try to align on even track boundaries (although, most current hard disks use LBA rather than CHS, so this i useless to even try anymore). But, basically, you must read the MBR, then read the partition table to find where each partition starts, it's pretty simple really.
Ready4Dis is correct. But further: fat32 formatted disks will almost always have sectors 2 through 63 set to 0.
It's easiest to describe using LBA values (assuming a typical FAT32 disk formatted by DOS/Windows).
LBA 0 = MBR
LBA 1 to 62 blank (set to 0 usually -- unused)
LBA 63 = first sector of first partition = bootsector
LBA 64 to 70 or so = extended DOS/Windows bootsector data
LBA 71 to 125 blank (set to 0 usually -- unused)
LBA 126 first FAT table
Many sectors later: second FAT table
Same number of sectors later again: root directory and data area.
Or something like that. I'm going by memory.
I'm not sure how much documentation is available. Search google or wikipedia or Micrososft for the fat32 specification, maybe. Or get a copy of Norton Diskedit, and let it tell you the locations of all the FAT32 stuff on your disk.
It's easiest to describe using LBA values (assuming a typical FAT32 disk formatted by DOS/Windows).
LBA 0 = MBR
LBA 1 to 62 blank (set to 0 usually -- unused)
LBA 63 = first sector of first partition = bootsector
LBA 64 to 70 or so = extended DOS/Windows bootsector data
LBA 71 to 125 blank (set to 0 usually -- unused)
LBA 126 first FAT table
Many sectors later: second FAT table
Same number of sectors later again: root directory and data area.
Or something like that. I'm going by memory.
I'm not sure how much documentation is available. Search google or wikipedia or Micrososft for the fat32 specification, maybe. Or get a copy of Norton Diskedit, and let it tell you the locations of all the FAT32 stuff on your disk.