I am trying to work out what I may be doing wrong but so far, I have not been able to see my mistake (if indeed there is one)
I have been putting together some scripts to show the layout of a disk at this point just the disk, partition, and volume information. This has been done with PowerShell’s:
Get-Disk
Get-PhysicalDisk
Get-CimInstance ClassName win32_diskdrive
Using the various bits of information to put together the output shown in the information below.
What I am finding it difficult to see is with the information returned from the various items above why the arithmetic does not seem to work with the information returned.
For example:
Sectors Per Track: [63] * Total Tracks: [2040]
Total Sectors: [128520]
But when you look at the partition information:
MBR:
Start: [0 (0.00)] End: [512 (512.00)] Size: [512.00]
Start Sector: End Sector: [1]
Partition 1:
Offset: [512 (512.00)] End: [65863680] Size: [65863168 (62.81MB)]
Start Sector: [1] End Sector: [128640]
The end sector is: 128640
but the total number of sectors is: 12850
I can’t see why there is a difference and why when I multiply the numbers together I cannot
make the figures agree.
Any insight into what I am missing would be helpful.
The disk is just a 64MB generic USB stick but the same applies to anything else I have looked at.
Disk6 : Name: [Generic USB Flash Drive] Serial Number: Firmware Version: [%z!Y]
Partition Style: [MBR] Provisioning Type: [Fixed] Bus Type: [USB]
Media Type: [Removable Media]
Size: [65863680 (62.81MB)] Physical Sector Size: [512]
GUID: UniqueID: [{b8caaa6b-1316-d4d8-32e8-ef7dafc9f638}]
Physical Location: [Integrated : Adapter 0 : Port 0] Media Type: [Unspecified]
Serial Number:
Bytes/Sector: [512] Sectors Per Track: [63] Total Tracks: [2040]
Tracks/Cylinder: [255] Total Heads: [255] Total Cylinders: [8] Total Sectors: [128520]
MBR : Start: [0 (0.00)] End: [512 (512.00)] Size: [512.00]
: Start Sector: End Sector: [1]
Part:[1] : Type: [XINT13] Status: [Online]
Offset: [512 (512.00)] End: [65863680] Size: [65863168 (62.81MB)]
Start Sector: [1] End Sector: [128640]
Access Path(s): [E:, \?\Volume{f198a608-aa52-11ea-8987-00019510a995}]
Vol:[1] : Drive Letter: [E] FileSystem: [FAT] FileSystem Label: [INITDISK 16] Drive Type: [Removable]
Health: [Healthy] Status: [OK]
Size: [62.55MB] Free Space: [62.42MB] Allocation Size: [1024]