l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
January 6: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2003 May 14 07:36

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Calculating partition sizes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Calculating partition sizes



Quite quite interesting.  I was having problem because, for foolish
reasons, I was trying to store a 4 gig partition into a 1 gig partition.
Silly, silly me.  Anyway, I wanted to know how to figure out the partition
sizes anyway for a while so I figured I'd figure out this size-calculating
puzzle once and for all.

I don't wanna post my partition information since I don't want it to be
archived forever by the Internet for all the world to review, but here's
the relevant info from cfdisk:

   Total disk size: 80026361856
   Heads: 240
   Sectors per track: 63
   Cylinders: 10337

   Sum of cylinder counts of all partitions: 10337
   Sum of sector counts of all partitions: 156295440

And I'm thinking, okay - so if the MBR is supposed to take up 1 whole
cylinder, but that doesn't add up since all the partitions take up the
entire 10337 cylinders of the HDD.  Perhaps CFDISK isn't giving all the
information?

Something else interesting is that total disk size / cylinders yields a
non-integer (80026361856 / 10337 = 7741739.5623).  Perhaps the number of
bytes per cylinder is different for each cylinder, which is quite
possible, though I wonder if physical geometry means anything to software
anymore these days.

Anyway, assuming 512 bytes per sector, I should be getting 156295440 * 512
= 80023265280, but that's different than what CFDISK says the total size
of the disk is.

So anybody know what's going on?  This is a non-issue for me at the
moment but I'm still curious.

Thanks!

-Mark


On Tue, 13 May 2003, Mike Simons wrote:

> On Tue, May 13, 2003 at 04:32:22PM -0700, Micah J. Cowan wrote:
> > On Tue, May 13, 2003 at 03:49:29PM -0700, Mark K. Kim wrote:
> > > I'm trying to calculate the exact size of each partition (so I can dd it).
> >
> > I could be wrong, but can't you just dd 'em without specifying the
> > size? won't e.g. /dev/hda2 EOF when it reaches the end of the 3rd
> > partition?
>
> Micah,
>
>   Yes, you can just dd the partition... and it will stop with EOF.
> However, it will stop at the last block of hda2 not at the end of hda3.
>
>   I imagine Mark is trying to make sure he has enough space someplace.
>
> --
> GPG key: http://simons-clan.com/~msimons/gpg/msimons.asc
> Fingerprint: 524D A726 77CB 62C9 4D56  8109 E10C 249F B7FA ACBE
>

-- 
Mark K. Kim
http://www.cbreak.org/
PGP key available upon request.


_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.