LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-31-2009, 02:24 AM   #1
kaushalsingh
LQ Newbie
 
Registered: Oct 2009
Posts: 24

Rep: Reputation: 15
what all means in fdisk -l


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 02:36 AM.
 
Old 10-31-2009, 03:37 AM   #2
vijay_babu1981
Member
 
Registered: Nov 2004
Location: india
Distribution: fedora 10
Posts: 82

Rep: Reputation: 19
Go through this link http://en.wikipedia.org/wiki/Cylinder-head-sector
to know about physical addressing of hard disk.

Disk identifier is a number assigned to hard disk, like a mac address of your LAN.
 
Old 10-31-2009, 05:52 AM   #3
kaushalsingh
LQ Newbie
 
Registered: Oct 2009
Posts: 24

Original Poster
Rep: Reputation: 15
thanx for replying so soon

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"

thanx in advance
please reply soon
 
Old 10-31-2009, 12:18 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by kaushalsingh View Post
please reply soon
As I stated in your other thread: Don't do that. Here at LQ, patience works wonders.....

Have you looked up the definitions of cylinders, blocks, sectors, etc.?

In the default listing format (what you have), the partition boundaries are expressed in cylinders, and size is in 1024K blocks.

"+" means that the partition is larger than the number of block stated. If you work out the number of sectors, then it should become clear.
 
Old 11-01-2009, 01:08 PM   #5
kaushalsingh
LQ Newbie
 
Registered: Oct 2009
Posts: 24

Original Poster
Rep: Reputation: 15
i understood all my answers except one
"Units = cylinders of 16065 * 512 = 8225280 bytes"
what does 16065 in "cylinder of 16065" means
 
Old 11-01-2009, 04:47 PM   #6
soleil24
Member
 
Registered: Aug 2005
Location: Wellington NZ
Distribution: SuSE 11.2, Fedora 12
Posts: 49

Rep: Reputation: 18
16065 - it's a number, 1 more than 16064, 16063 more than 2

or do you not understand what "cylinders" are? in which case see pixellany's answer
 
Old 11-01-2009, 07:38 PM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Your fdisk output says you have cylinders defined as 16065 sectors at 512 bytes/sector = 8225280 bytes/cylinder.

Did you look up the definitions as I suggested?
 
Old 11-02-2009, 07:51 AM   #8
Fred Caro
Member
 
Registered: May 2007
Posts: 999

Rep: Reputation: 166Reputation: 166
cyl

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.
 
Old 11-02-2009, 08:03 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by Fred Caro View Post
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.
 
Old 11-02-2009, 02:38 PM   #10
kaushalsingh
LQ Newbie
 
Registered: Oct 2009
Posts: 24

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pixellany View Post
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 .

thank you.
 
Old 11-02-2009, 03:17 PM   #11
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,252

Rep: Reputation: 205Reputation: 205Reputation: 205
Assuming you understand the terms: cylinders, heads, sectors, tracks and blocks that disk:

Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
has:

19457 * 255 * 63 * 512 = 160039272960 bytes

The number 16065 represents 255 heads * 63 sectors per track.

Tip: single cylinder is a set of tracks that lie one above other (the number of such tracks is equal to the number of heads).

If you don't understand the terms mentioned in the first sentence it is high time to read this.
 
Old 11-02-2009, 03:49 PM   #12
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Here is my fdisk -l:
Code:
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.
 
Old 11-02-2009, 03:56 PM   #13
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
PS: some of this is historical legacy and you may never get a totally satisfying answer.
 
Old 11-03-2009, 01:20 AM   #14
kaushalsingh
LQ Newbie
 
Registered: Oct 2009
Posts: 24

Original Poster
Rep: Reputation: 15
Wink

Quote:
Originally Posted by pixellany View Post
PS: some of this is historical legacy and you may never get a totally satisfying answer.
thanx
for the reply this reply was really effective . Now all my doughts of the command "fdisk -l" is clear.

thanx again
 
Old 10-13-2011, 03:00 PM   #15
nathanschopf
LQ Newbie
 
Registered: Oct 2011
Posts: 1

Rep: Reputation: Disabled
Units = cylinders of 16065 * 512 = 8225280 bytes

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.
 
  


Reply

Tags
fdisk


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing fdisk with gnu fdisk in busybox? Alkisx Slackware 5 10-23-2009 11:51 AM
weird fdisk problem (Fdisk unable to see winxp partitions) khidot Slackware - Installation 5 04-07-2007 09:26 PM
Do know what this means? as400 Solaris / OpenSolaris 1 04-04-2007 02:57 PM
Anybody know what this means ?? raffigee Linux - Newbie 9 02-17-2006 11:33 PM
Can someone please tell me what this means... :) xbill311x Linux - Newbie 7 05-11-2005 06:37 AM


All times are GMT -5. The time now is 08:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration