If you have a SCSI drive, this isn't an issue because SCSI drives "hide" cylinder, head and sector because they are addressed by logical sector number. "Cylinder 1024" is reportedly equivalent to approximately 8 GB.
Unless you know for certain you have a SSCII drive, you probably have an IDE (ATA) drive. If you have an ancient EDSI drive (heaven forbid, our prayers are with you), this will probably work for it too.
IDE drives are usually addressed by cylinder, head and sector. To to determine the C/H/S address equivalent to a given megabyte (or gigabyte) value, it is necessary to know the C/H/S configuration of your drive and also the sector size.
If you don't know your IDE drive's physical configuration ("geometry"), you can use Linux to find out. For your IDE drive, enter the command:
[tt][color FF0000]hdparm -g /dev/hda[/color][/tt]
to find out. Or, you can get the drive to tell you all about itself with:
[tt][color FF0000]hdparm -i /dev/hda[/color][/tt]
Of course, if you have more than one hard disk drive, you will need to substitute the appropriate Linux device name. The values returned are: total number of cylinders/total number of heads/sectors per track, and total number of sectors on the drive. The -i option also tells you the total bytes per track and the sector size, amongst other information, unless it is an older drive that doesn't support self-identification.
To find the (mega)byte equivalent of a a particular cylinder number on your drive:
bytes = (bytes per track * number of heads * cylinder number)
For megabytes, divide by 1048576 (1024 * 1024). For gigabytes, divide by 1024 again.
NOTE: If hdparm -i reports LBA=yes, your IDE drive uses linear block addressing, so the C/H/S and sector size information it returns may be nonsense. My Western Digital IDE drive reports that it has 16 heads, 63 sectors per track, 600 bytes per track and 57600 bytes per track, which is equal to neither 600 * 63 nor 640 * 63 (40 CRC bytes per sector for this drive). Also, using the formula shown above, cylinder 1024 would be equivalent to either 900 MB or 590.2 MB, depending on which C/H/S figures you choose to use for this drive. This system is configured with 2 GB in the first, non-Linux partition, but LILO happily boots Linux because the drive uses LBA and "cylinder 1024" is equivalent to something greater than 2.1 GB.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.