how many HDD cylinders = 1 megabyte?
hey everyone this is a general question.
I am using Fdisk to partition my drive so i can install slack 10.2. the units its giving me are in cylinders. I wanted to know how many cylinders equal 1 megabyte. Also in cfdisk how do i create an extended partition? |
Why do you want to use both fdisk and cfdisk?
I suggest sticking with cfdisk, and so does the manpage of fdisk ;). With cfdisk, to make an extended partition, just make a logical partition. Under linux, /dev/hdx[1-4] are primary partitions, and /dev/hdx[n>4] are logical partitions, which automatically reside in an extended partition. I think, if you use logical partitions you can't use /dev/hdx4, and are limited to three primary partitions. Using cfdisk, you just specify the partition size in bytes and don't worry about cylinders and all that stuff. To make a logical partition, just make a partition with number larger than (or equal to) 5. |
Actually fdisk allows you to set partition sizes in MB as well. When fdisk asks you for the ending cylinder, just type +XXXXM to set the size in MB.
|
Actually, it isn't MB if you say +.M It's disk-drive manufacturers' megabytes = 1 million bytes, not 1024x1024 bytes like everyone else in the world thinks. That way they get to rip you off a few billion bytes on a "40G" hard drive.
To answer the original question, when you do fdisk -l it tells you the size of your drive based on how it was configured. For example: Disk /dev/hda: 40.0 GB, 40000776920 bytes (see what I mean, this is NOT 40 GB!!!) 255 heads, 63 sectors/track, 4864 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes So your answer is 1M / 8225280 = number of cylinders per "manufacturer's megabyte" since each cylinder has 8225280 bytes. A better way, using the suggestions above is to remember that real megabytes are approx. equal to 1024 "manufacturer's megabytes." So you can just say +1024M for 1G, +2048M for 2G, etc. |
Quote:
Quote:
I don't know if all the cylinders have the same size (because the tracks which they consist of are different length). So I don't know if the size of cylinder could be counted. I guess that cylinders which are nearer the center of the hard disk circle are smaller than the outer ones. Maybe somebody could clarify this to me? |
Quote:
As for your description about the extended partition requirement for /dev/hdx4 is not correct! You can create an extended partition for any device assignment, be it for /dev/hdx1, /dev/hdx2, /devhdx3 or /dev/hdx4. If you make /dev/hdx3 the extended partition then the first logical will be /dev/hdx5. With space allocation for each desired logical up to the amount of the extended space. HTH! |
Cylinders don't stand for any particular size. Usually a drive can be set up with more than one cylinder, head and sector geometries.
|
Quote:
|
I have only noticed this because hdd architecture is rather interesting thing for me (I don't know much about it) so I have analyzed your post and saw some minor typos. I have revealed them that they wouldn't confuse the newbies. ;)
|
I'm glad somebody read it! In answer to your question, I think all cylinders and tracks contain the same number of bytes by definition. Otherwise nobody could plan allocation. I'm not sure how it works because as you mention, rotational speed is different on various parts of the platter. This is a very old problem (disks have been around for 40 years?) and I'm sure they have elegant solutions by now. Maybe the sectors have different sizes in different parts of the platter.
|
I think that sectors can't have different sizes otherwise you wouldn't know the way how to adress them.
Quote:
|
This explanation doesn't sound reasonable either- the geometry is included in the fdisk output. It shows the number of sectors/track as a fixed number!
|
It only show's that for compatibility with software purposes (make CHS addressing possible). Do you really think that my:
Code:
Disk /dev/sda: 120.0 GB, 120030944768 bytes |
All times are GMT -5. The time now is 11:23 PM. |