Re: Blocks verses Bytes,Mbytes etc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 2003.04.30 02:13, Harry Putnam a écrit?:
Something I've wondered each time I fire up fdisk for some reason:

Is there an even handed way to convert BLOCKS into Bytes?

A typical fdisk readout:

Disk /dev/hda: 255 heads, 63 sectors, 2434 cylinders

Units = cylinders of 16065 * 512 bytes

     Device Boot    Start       End    Blocks   Id  System
  /dev/hda1   *         1       513   4120641    7  HPFS/NTFS
  /dev/hda2           514      2434  15430432+   f  Win95 Ext'd (LBA)
  /dev/hda5           514       705   1542208+  83  Linux
  /dev/hda6           706      1215   4096543+  83  Linux
  /dev/hda7          1216      1432   1743021   83  Linux
  /dev/hda8          1433      1503    570276   83  Linux
  /dev/hda9          1504      1535    257008+  83  Linux
  /dev/hda10         1536      1552    136521   82  Linux swap
  /dev/hda11         1553      2203   5229126   83  Linux
  /dev/hda12         2204      2434   1855476    b  Win95 FAT32

255*63=16065: each track is divided in 63 sectors, each one of 512 bytes. There are 128 "layers" (Ican't remember the correct name) each one, except one, with two sides. That makes 255 sides readable/writable by 255 magnetic heads. A cylinder is thus made of 255 tracks, each one of 63 sectors of half a kilobyte, which makes 16065*512 bytes. There are 2434 cylinders (2434 tracks on each of the 255 sides), thus 16065*512*2434=20020331520 bytes. The disks manufacturers count 1000 bytes in a kB, 1000 kB in a MB (and 1024 bytes in a KiB -kibibyte- , 1024 KiB in a MiB -mebibyte- see http://physics.nist.gov/cuu/Units/),so your disk is 20 GB. Your first partition is roughly 512 or 513 cylinders (go to expert mode in fdisk to know) which means 4120641 kB (4120641*1000 bytes): a block is 1000 bytes! Ouf I don't know the word for french "ouf" -:))!






[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux