0

Having a hard time finding the answer to this.

The beginning sector for standard user data on a HDD (sata, scsi, or ide) is always the same.

First question: Which sector is it?

Second question: What is the comparable sector on a SSD?

closed as unclear what you're asking by kinokijuf, Journeyman Geek Sep 20 '14 at 14:41

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    It entirely depends on the size of a given sector. Of course for the most part this type of thing is also handled by the filesystem. – Ramhound Aug 18 '14 at 18:00
4

The beginning (logical) sector for any disk is #0. The next one is #1, and then #2, and so on and so forth. That's about all that is certain. Everything else is either software dependent (the contents of that first sector depend upon the disk partitioning scheme and the purpose of the disk, and have nothing to do with the underlying disk technology), or hardware dependent (the physical sectors that the logical sectors map to may be on a spinning platter, may be in a NAND chip (SSD), or even may be something that exists over a network or over the Internet, but this has no bearing on software trying to use the disk, other than perhaps latency of disk access).

When you're talking about sectors and SSD/HDD, the entire concept of a "file" doesn't even exist (it's created by the software that runs on top of the drive. The drive itself doesn't know what a file is, where it starts, or where it ends).


To give an extremely simplified overview:

A modern "drive" merely has to do three things:

  • Put data into a given logical sector
  • Read data from a given logical sector
  • Count the total number of logical sectors that the drive supports

In theory, anything that can respond to those two commands could be made into a disk drive. The rest of the computer does not care at all how the data is stored, only that it is stored. I could write the data down on lines of paper and type it back in when the system requested it, for all the system cares.

A drive consists of two parts: The disk controller, and the storage medium

  • The storage medium is where the data is physically stored. These are the magnetic bits on a spinning harddrive, the pits or burns on a CD or DVD disk, or the NAND flash chips on an SSD.
  • The disk controller is a chip on the drive, which is responsible for organizing data on the storage medium, putting the data on the medium, and retrieving it from the storage medium - the rest of the computer is not involved with this at all.

Disk Controller

A Typical* X86 system will ask the boot disk for the contents of the first logical sector, and attempt to execute it as code to start booting up the system. It doesn't care if it's the first sector on the 4th head of the 3rd cylinder, or if it's the 3rd track on a DVD, or the 15th NAND flash chip in an SSD.

(* I say typical because it's entirely possible to have a system that boots up from a different logical sector, it just requires a custom bootloader)

When the OS tries to read a file, it'll look up the location in the filesystem metadata (which is usually not a FAT/table these days, rather a tree instead), and then it'll request the logical sectors from the drive which correspond to that file ("I need sectors 200-400!"). It's entirely up to the disk controller to translate those logical sectors to physical sectors on the storage medium and retrieve the data.

  • Bare with me, I'm a newB. The MBR containing the MPT on a standard HDD and SSD will always be CHS 0,0,1 LBA 0... When the O.S. needs to save a file, it checks the FAT or other organizing process for the first available sector to store the data, does that mean it chooses the sector closest to the read/write head? And when it comes to the SSD, I understand its either series or parallel transistors...is it also random which ones are charged? Thanks – user359052 Aug 18 '14 at 18:33
  • @user359052 I believe the whole concept of CHS is outdated and no longer really in use (as in, DOS-era outdated); The filesystem driver/OS has no clue where the heads are (if there are even heads, in the case of an SSD), it just sees a linear stream of logical sectors. The only thing that knows about the actual heads, if they exist, is the disk controller chip that is mounted to the disk drive itself. Also, new drives are usually GPT partitioned and not MBR partitioned. – Darth Android Aug 18 '14 at 18:47
  • @user359052 See my edits – Darth Android Aug 18 '14 at 19:09
  • I guess I should have gave some background. I'm taking a basic forensic class (win XP and previous) and the question is "the beginning sector for a file on a SCSI, IDE, or SATA drive is always the same. Is that true for SSD? if not, why not? So I assume that means the MBR is the beginning file, located on sector 0. SSD are devised in sectors too, so I assume, YES the MBR would be located on Sector 0? Again, please excuse any ignorance on my end. – user359052 Aug 18 '14 at 19:10
  • 2
    @user359052 That... is a horrible question that doesn't make sense if it's coming from teaching material; Shame on whomever wrote the teaching material for that class. The answer I would give to that is "SSDs are typically SATA drives, so that would be true for SSDs". Anything else is getting into technicalities that would require far more information that was provided to give any sort of answer that could be called accurate. IDE SSDs and SCSI SSDs do exist, but they are either for enterprise servers or niche caches that you will rarely, if ever see in practice. – Darth Android Aug 18 '14 at 19:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.