Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Installing Linux

What is the (Mega)Byte equivalent of Cylinder 1024? by Octalman
Posted: 6 Jun 00

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:

    hdparm -g /dev/hda

to find out.  Or, you can get the drive to tell you all about itself with:

    hdparm -i /dev/hda

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.

Back to Linux (server) FAQ Index
Back to Linux (server) Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close