Find the answer to your Linux question:
Results 1 to 3 of 3
I usually use fdisk to create partitions, but I noticed that when I assign 256M to a partition as an example, the value is rounded to another value that might ...
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    3

    Question fdisk

    I usually use fdisk to create partitions, but I noticed that when I assign 256M to a partition as an example, the value is rounded to another value that might be 244M when checking the size of the created partition later using df -h for example..

    I know that thing might not be a big deal but I wish if some one could explain to me how can I use cylinders for example to assign exactly 256M to a partition (if that is possible).. I if some one could explain the heads, sectors/track, and cylinders output that we get when using fdisk..

  2. #2
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577
    When the drive is formatted and the filesystem is installed, it uses space on the drive. For example, I have a 8GB SD card with Fedora 10 installed on it. The output of fdisk gives this.
    Code:
    [root@localhost paul]# fdisk -l
    
    Disk /dev/sdb: 8017 MB, 8017412096 bytes
    186 heads, 43 sectors/track, 1957 cylinders
    Units = cylinders of 7998 * 512 = 4094976 bytes
    Disk identifier: 0x0000d996
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *           1        1957     7826021+  83  Linux
    But when I use df -h, this is what it says.
    Code:
    [root@localhost paul]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sdb1             7.4G  5.7G  1.4G  81% /
    As you see, it only identifies it as 7.4GB. Fdisk identifies it as 8017MB
    8017 / 1024 = 7.83
    7.83 - 7.4 = .43
    .43 x 1024 = 440
    So, 440MB are missing. I believe this is used in creating and formatting the partition.

    Oh, I almost forgot. The MBR uses a section of a drive too. It uses 512 bytes.
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

  3. #3
    Just Joined!
    Join Date
    Feb 2009
    Posts
    3

    Red face Thank you.. but...

    Well, totally agree with you.. But please let me re-phrase the question, I think that using +256M inside fdisk does not give the same result as if you entered the start and end cylinder.. If that is true then what I need is to know the relationship between the cylinders and size in Megabytes, or Gigabytes,etc..

    I also wonder if the cylinders count in fdisk is the real physical one or is it logical one and there is some knid of mapping that happens... If there is mapping then maybe the whole Heads, sectors, cylinders count of fdisk is logical!!!!?!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...