You are not logged in.

#1 2014-07-25 03:43:03

ryansturmer
Member
Registered: 2012-03-26
Posts: 14

cfdisk vs fdisk : different behavior

Greetings!

I am attempting to construct a dos partition table in fdisk (automating it from the console) and I've run aground of an interesting behavior.

When I load up fdisk, and create a partition table (by issuing an 'o' command to create a new table, and then adding partitions to it one at a time) - The default first sector for the first paritition is 2048, which leaves about 1MB of free space at the beginning of my drive.  This isn't apparent in FDISK, but after writing the table to disk, if I load the partition table up in cfdisk, I see approx 1MB of "Free Space" before my first primary parition.

If I obliterate the partition table, and create it from scratch in CFDISK, telling it to put the paritions at the "beginning" of the available free space, I get no such offset, and a partition table that appears to be distinct from the one created by fdisk.

My question is, what gives?  Why does fdisk give different behavior?

-R

Offline

#2 2014-07-25 03:50:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: cfdisk vs fdisk : different behavior

man fdisk wrote:

All partitioning is driven by device I/O limits (the topology) by default.  fdisk is able to optimize the disk layout for a 4K-sector size  and  use an  alignment  offset  on modern devices for MBR and GPT.  It is always a good idea to follow fdisk's defaults as the default values (e.g. first and last partition sectors) and partition sizes specified by the +<size>{M,G,...} notation are always aligned according to the device properties.

man cfdisk wrote:

Note that cfdisk does not align partitions to block-device I/O limits.  This functionality is provided by fdisk(8).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2014-07-25 10:55:26

ryansturmer
Member
Registered: 2012-03-26
Posts: 14

Re: cfdisk vs fdisk : different behavior

Hah!  RTFM!  Thanks smile

-R

Offline

#4 2014-07-25 11:16:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: cfdisk vs fdisk : different behavior

Your welcome - if that's sufficient, please remember to mark the thread as solved by editting the inital post.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB