Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
hi everyone
i'm presently researching on command "fdisk".
and i'm not able to understand that
what does "Units = cylinders of 16065 * 512 = 8225280 bytes" means
i searched a lot on google but didn't got any result.
please help for the given difficulties under
first "Units = cylinders of 16065 * 512 = 8225280 bytes".
second "Disk identifier: 0xecd5ecd5"
third "how to calculate the number of blocks"
finally "why in blocks + is given.. for example 51199123+ why this + sign is given"
please help the command is given under
[root@localhost singh]# fdisk -l
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xecd5ecd5
Device Boot Start End Blocks Id System
/dev/sda1 * 1 6374 51199123+ 7 HPFS/NTFS
/dev/sda2 6375 38912 261361485 f W95 Ext'd (LBA)
/dev/sda5 6375 16573 81923436 7 HPFS/NTFS
/dev/sda6 16574 26772 81923436 7 HPFS/NTFS
/dev/sda7 26773 36971 81923436 7 HPFS/NTFS
/dev/sda8 36972 38912 15591051 83 Linux
Last edited by kaushalsingh; 10-31-2009 at 03:36 AM.
i understood "disk identifier" and "how to calculate number of blocks"
but "Units = cylinders of 16065 * 512 = 8225280 bytes" means
and "why in blocks + is given.. for example 51199123+ why this + sign is given"
It means it is the last one. There are two ways of recording your fdisk imprint, either by size or cylinder id. The plus sign generally means it is an extended partition.
It means it is the last one. There are two ways of recording your fdisk imprint, either by size or cylinder id. The plus sign generally means it is an extended partition.
Fred.
It means WHAT is the last one?---I can't tell what you are referring to.
I believe my answer on the + sign was correct, but it certainly does not mean an extended partition.
It means WHAT is the last one?---I can't tell what you are referring to.
I believe my answer on the + sign was correct, but it certainly does not mean an extended partition.
In my laptop i installed Fedora 11 and by pressing the command "fdisk -l" i see that the "+" sign is present in front of extended partition and also in "primary partition"..
I'm not able to understand please make it more clear..
I just need a proper reply.
And in "unit =cylinders of 16065 * 512" , why 16065 is given ..I saw it don't depend on the size of hard disk . In 40gb hard disk also the number 16065 is given. So i want to exactly know why 16065 number is given and how it is calculated . I calculated all the other quantities only this quantity is left so please help .
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8a258a25
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 514048+ 83 Linux
/dev/sda2 65 1976 15358140 83 Linux
/dev/sda3 1977 2486 4096575 82 Linux swap / Solaris
/dev/sda4 2487 19457 136319557+ 5 Extended
/dev/sda5 2487 3761 10241406 83 Linux
/dev/sda6 3762 4977 9767488+ 83 Linux
/dev/sda7 4978 19457 116310568+ 83 Linux
You'll note that there are 4 partition with a "+"
Start with the second one: 1912 cylinders * 8225280 / 1024 = 15358140 blocks.
To rationalize the first one, we need to recognize that there are 63 sectors (32256 bytes) that are not used for partitions.
So (64 cylinders * 8225280 )-32256)/1024 = 514048.5 (there's the reason for the first "+" sign)
To reconcile the logical partitions note that each one has a 63 sector dead space at the front--just as the whole disk does.
As for the 16065, I think you will find that this can be changed. Look at the references already given and at the man page for fdisk.
I know this thread is pretty old, but I feel like it is still partially unanswered...
Units = cylinders of 16065 * 512 = 8225280 bytes
What your missing here is that 16065 is the number of SECTORS for each cylinder. Each sector is 512 bytes. Thus, each cylinder is 16065 * 512 = 8225280 bytes. These units are used in the partition table that follows. That is, the boundaries (i.e. Start/End) of each partition are given in cylinders.
As for the '+' that is a little more complicated. fdisk assumes a block size of 1024. So, to get the number of blocks per cylinder divide the unit size by 1024. This gives the number of blocks per cylinder as 8225280 / 1024 = 8032.5. If multiply this by the number of cylinders for each partition you can see where fdisk had to round-up the number of cylinders for some of the partitions (i.e. the ones with '+'). This is because the cylinder is the defined unit here, and can only be expressed in integers.
To understand why there are fractional values in some of these calculations you need to first understand how modern drives operate. I believe most newer drives simply report their sizes in total number of sectors. The number heads and the number of cylinders are derived by fdisk from the number of sectors. fdisk does this because partition tables are still defined using CHS addressing. Partition tables are still defined this way because BIOSs still expect them to be this way.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.