Page 1 of 1

Logical Sectors of HDD

Posted: Fri Jul 11, 2008 12:14 am
by Omega
If I have the logical sector where a file is located on Hard Disk (0x8335438-0x8335447), is it possible using that range to jump to that area and manipulate the data within those sectors or do I need more information first? thanks

Re: Logical Sectors of HDD

Posted: Fri Jul 11, 2008 5:50 am
by Adek336
A quick look at my ata code confirms that the drive index and the sector number is just enough.

Re: Logical Sectors of HDD

Posted: Fri Jul 11, 2008 9:40 am
by Omega
I am sorry, I guess I should just admit I am clueless about the HDD right now. If you think I should just do my own research then say so, but is the logical sector the exact sector or just a virtual one? I studied it a little last night but the material I found was incomplete or lacking in detail. I just want to know if the logical sector can be used to find the placement of a file on HDD without needing to convert to something else. thanks

Re: Logical Sectors of HDD

Posted: Fri Jul 11, 2008 10:38 am
by Adek336
Feel free to ask 8) However, I don't know much about LBA either.

Re: Logical Sectors of HDD

Posted: Fri Jul 11, 2008 11:44 am
by Omega
Its cool, I'll post back once I find out more. thanks

Re: Logical Sectors of HDD

Posted: Fri Jul 11, 2008 11:53 am
by bewing
The problem is that the term "logical sector" does not have any meaning outside of some particular program that gave you that number. If what you have is an LBA value, that would equate to what you seem to be calling an "absolute sector". If the term "logical sector" means "the sector offset from the beginning of the partition" -- then no, it is best to also know the LBA value of the beginning of the partition. That number can be found in the partition table of the drive, on LBA 0. The number you really need is the LBA. Some programs will, however, work on the basis of a "logical disk" with a "logical sector number" -- and if you are lucky, their definitions of those things will agree with yours. (Those programs work by adding the partition's LBA to the "logical sector number", themselves.)

If you want to find/modify the sectors manually, then you need to use a disk editing tool. You will find many suggestions around here -- I like Norton Diskedit, myself.

Re: Logical Sectors of HDD

Posted: Fri Jul 11, 2008 12:24 pm
by Omega
Hi. Thanks a lot for that explanation. I had a feeling that I needed the physical sector. I was looking at the NTFS META Files last night using nfi and it gives you the logical sector. I wonder if there is a way to translate that address to the physical sector in Windows, any ideas? Also, I started work on my HDD driver and I have my NTFS struct, so i am just about ready to begin experimenting with read access and I was wondering if anyone knows anything about reading the META files on NTFS so that I can locate a file on disk by name. thanks

EDIT: OK, I think I have this down. I just finished writing my HDD driver with LBA, I have my NTFS struct and I hope to fill it soon to prove I am reading the HDD which is NTFS formatted. Then I will experiment with reading and hopefully before too long I will have this reading NTFS. Wish me luck! My 100th post will be my success story. :)