If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#21
|
|||
|
|||
Hard Drive Geometry 101
Al wrote:
Al wrote: Franc Zabkar wrote: LBA = (C x 255 x 63) + (H x 63) + (S - 1) and test data: Al wrote: Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63 Current partition structu Partition Start End Size in sectors 1 * Linux 0 1 1 121600 254 63 1953520002 thus start LBA: LBA = (0 x 255 x 63) + (1 x 63) + (1 - 1) = 0 + 63 + 0 = 63 and end LBA: LBA = (121600 x 255 x 63) + (254 x 63) + (63 - 1) = 1953504000 + 16002 + 62 = 1953520064 I also noitce that LBAe-LBAs (1953520064-63) = 1953520001 which is one number off the correct size in sectors for the partition. Why one number wrong? Usual maths, its always end-start+1 |
#22
|
|||
|
|||
Hard Drive Geometry 101
Al wrote
Franc Zabkar wrote LBA = (C x 255 x 63) + (H x 63) + (S - 1) and test data: Al wrote: Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63 Current partition structu Partition Start End Size in sectors 1 * Linux 0 1 1 121600 254 63 1953520002 thus start LBA: LBA = (0 x 255 x 63) + (1 x 63) + (1 - 1) = 0 + 63 + 0 = 63 and end LBA: LBA = (121600 x 255 x 63) + (254 x 63) + (63 - 1) = 1953504000 + 16002 + 62 = 1953520064 1) Are the units of LBA blocks? Nope, sectors. And if so, does (LBAe - LBAs) * 512 = partition size? Yes. But thats sectors, not blocks. 2) Should the C and H values in the calculation be 64 and 121601 (because the numbering starts at 0?) It doesnt with heads and cylinders, only with sectors. One of the commands I am dealing with is MOUNT and with the offset switch. Plenty of sites tell you to multiply the start (Cylinders) by 512 to get the offset value. Therefore what unit is the offset value in? |
#23
|
|||
|
|||
Hard Drive Geometry 101
On Fri, 20 Nov 2009 00:07:24 -0800 (PST), Al put
finger to keyboard and composed: 1) Are the units of LBA blocks? And if so, does (LBAe - LBAs) * 512 = partition size? LBA = Logical Block Address For a typical hard drive, 1 LBA = 1 sector = 512 bytes. Partion size = (LBAe - LBAs + 1) * 512 For example, a partition consisting of two sectors, LBA 10 and LBA 11, has a size of (11 - 10 + 1) * 512. 2) Should the C and H values in the calculation be 64 and 121601 (because the numbering starts at 0?) Each cylinder has 255 heads (aka tracks), and each track has 63 sectors. The very first sector is LBA 0 or CHS 0/0/1. We haven't completed a full cylinder, nor a full track, so C=0 and H=0. LBAs are assigned sequentially. Start at the first sector of the first track under the first head, and then go around the track. This gives you 63 sectors. Switch to the first track under the second head and count the next 63 sectors. Then repeat this process until you go around the first track under the 255th head. Now you have completed one full cylinder. Return to the first head and go around the second track. Keep switching heads until you complete the second cylinder and then begin on the third cylinder. Etc, etc ... One of the commands I am dealing with is MOUNT and with the offset switch. Plenty of sites tell you to multiply the start (Cylinders) by 512 to get the offset value. Therefore what unit is the offset value in? Sorry, that makes no sense to me. Perhaps a Linux user could help you? - Franc Zabkar -- Please remove one 'i' from my address when replying by email. |
#24
|
|||
|
|||
Hard Drive Geometry 101
On Nov 21, 2:27*pm, Franc Zabkar wrote:
On Fri, 20 Nov 2009 00:07:24 -0800 (PST), Al put finger to keyboard and composed: 1) Are the units of LBA blocks? And if so, does (LBAe - LBAs) * 512 = partition size? LBA = Logical Block Address For a typical hard drive, 1 LBA = 1 sector = 512 bytes. Partion size = (LBAe - LBAs + 1) * 512 Ok that makes good sense. Does it follow that 1 LBA = 1 block = 512 bytes? For example, a partition consisting of two sectors, LBA 10 and LBA 11, has a size of (11 - 10 + 1) * 512. 2) Should the C and H values in the calculation be 64 and 121601 (because the numbering starts at 0?) I think I confused myself there - S numbering starts at 1. (and CH at 0). The 63 is a S. Each cylinder has 255 heads (aka tracks), and each track has 63 sectors. The very first sector is LBA 0 or CHS 0/0/1. We haven't completed a full cylinder, nor a full track, so C=0 and H=0. LBAs are assigned sequentially. Start at the first sector of the first track under the first head, and then go around the track. This gives you 63 sectors. Switch to the first track under the second head and count the next 63 sectors. Then repeat this process until you go around the first track under the 255th head. Now you have completed one full cylinder. Return to the first head and go around the second track. Keep switching heads until you complete the second cylinder and then begin on the third cylinder. Etc, etc ... One of the commands I am dealing with is MOUNT and with the offset switch. Plenty of sites tell you to multiply the start (Cylinders) by 512 to get the offset value. Therefore what unit is the offset value in? Sorry, that makes no sense to me. Perhaps a Linux user could help you? FWIW This guy shows how simple it is. He multiples the C start by 512 to get the offset value. http://darkdust.net/writings/diskima...ngthediskimage I am picking that you can multiple the C * 512 to get the offset in bytes? -Al |
#25
|
|||
|
|||
Hard Drive Geometry 101
Al wrote
Franc Zabkar wrote Al wrote 1) Are the units of LBA blocks? And if so, does (LBAe - LBAs) * 512 = partition size? LBA = Logical Block Address For a typical hard drive, 1 LBA = 1 sector = 512 bytes. Partion size = (LBAe - LBAs + 1) * 512 Ok that makes good sense. Does it follow that 1 LBA = 1 block = 512 bytes? Like he said FOR A TYPICAL HARD DRIVE. For example, a partition consisting of two sectors, LBA 10 and LBA 11, has a size of (11 - 10 + 1) * 512. 2) Should the C and H values in the calculation be 64 and 121601 (because the numbering starts at 0?) I think I confused myself there - S numbering starts at 1. (and CH at 0). The 63 is a S. Each cylinder has 255 heads (aka tracks), and each track has 63 sectors. The very first sector is LBA 0 or CHS 0/0/1. We haven't completed a full cylinder, nor a full track, so C=0 and H=0. LBAs are assigned sequentially. Start at the first sector of the first track under the first head, and then go around the track. This gives you 63 sectors. Switch to the first track under the second head and count the next 63 sectors. Then repeat this process until you go around the first track under the 255th head. Now you have completed one full cylinder. Return to the first head and go around the second track. Keep switching heads until you complete the second cylinder and then begin on the third cylinder. Etc, etc ... One of the commands I am dealing with is MOUNT and with the offset switch. Plenty of sites tell you to multiply the start (Cylinders) by 512 to get the offset value. Therefore what unit is the offset value in? Sorry, that makes no sense to me. Perhaps a Linux user could help you? FWIW This guy shows how simple it is. He multiples the C start by 512 to get the offset value. http://darkdust.net/writings/diskima...ngthediskimage I am picking that you can multiple the C * 512 to get the offset in bytes? -Al |
#26
|
|||
|
|||
Hard Drive Geometry 101
On Fri, 20 Nov 2009 23:54:21 -0800 (PST), Al put
finger to keyboard and composed: On Nov 21, 2:27*pm, Franc Zabkar wrote: On Fri, 20 Nov 2009 00:07:24 -0800 (PST), Al put finger to keyboard and composed: 1) Are the units of LBA blocks? And if so, does (LBAe - LBAs) * 512 = partition size? LBA = Logical Block Address For a typical hard drive, 1 LBA = 1 sector = 512 bytes. Partion size = (LBAe - LBAs + 1) * 512 Ok that makes good sense. Does it follow that 1 LBA = 1 block = 512 bytes? All the hard drives you are likely to encounter have block sizes equal to the sector size, ie 512 bytes (= 256 words). However, the ATA-8 specification allows for other sizes. See words 106 and 117-118 of the Identify Device data block, as described in the following document. Working Draft AT Attachment 8 - ATA/ATAPI Command Set (ATA8-ACS): http://www.t13.org/Documents/Uploade...a-ATA8-ACS.pdf FWIW This guy shows how simple it is. He multiples the C start by 512 to get the offset value. http://darkdust.net/writings/diskima...ngthediskimage I am picking that you can multiple the C * 512 to get the offset in bytes? -Al The author of that tutorial is multiplying the start LBA by 512 to get the offset in bytes into the disc image. - Franc Zabkar -- Please remove one 'i' from my address when replying by email. |
#27
|
|||
|
|||
Hard Drive Geometry 101
"Rod Speed" wrote in message
... You're welcome. You're useless. |
#28
|
|||
|
|||
Hard Drive Geometry 101
Some gutless ****wit brown chav child that cant even manage its
own lines, or anything else at all either, desperately cowering behind Bilky Brown wrote just the puerile **** that you'd expect from a desperately cowering gutless ****wit brown chav child. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Different translations of HDD geometry :-( | Geir Holmavatn | Storage (alternative) | 6 | May 6th 06 01:31 AM |
Geometry Instancing | Jamie_Manic | Ati Videocards | 1 | June 19th 05 02:50 PM |
Sudden change of drive geometry | Debian User | Storage (alternative) | 1 | March 23rd 05 07:40 PM |
wd600bb drive geometry | Ben Fitzgerald | Storage (alternative) | 5 | December 9th 03 09:14 PM |
Lost CMOS drive geometry settings.... | Bob Howell | Storage (alternative) | 1 | July 3rd 03 08:32 AM |