Provided by: util-linux_2.27.1-6ubuntu3_amd64 bug


       fdisk - manipulate disk partition table


       fdisk [options] device

       fdisk -l [device...]


       fdisk  is  a  dialog-driven program for creation and manipulation of partition tables.  It
       understands GPT, MBR, Sun, SGI and BSD partition tables.

       Block devices can be divided into one or  more  logical  disks  called  partitions.   This
       division  is  recorded in the partition table, usually found in sector 0 of the disk.  (In

       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.

       Note that partx(8) provides a rich interface for scripts to print disk layouts,  fdisk  is
       mostly  designed  for  humans.   Backward  compatibility  in  the  output  of fdisk is not
       guaranteed.  The input (the commands) should always be backward compatible.


       -b, --sector-size sectorsize
              Specify the sector size of the disk.  Valid values are 512, 1024, 2048,  and  4096.
              (Recent  kernels  know  the sector size.  Use this option only on old kernels or to

       -B, --protect-boot
              Don't erase the begin of the first disk sector when create a new disk  label.  This
              feature is supported for GPT and MBR.

       -c, --compatibility[=mode]
              For backward compatibility, it is possible to  use  the  option  without  the  mode
              argument  -- then the default is used.  Note that the optional mode argument cannot

       -h, --help
              Display a help text and exit.

       -L, --color[=when]
              the current built-in default see --help output. See also the COLORS section.

       -l, --list
              are given, those mentioned in /proc/partitions (if that file exists) are used.

       -o, --output list

              +list (e.g. -o +UUID).

       -s, --getsz
              Print the size in 512-byte sectors of each given  block  device.   This  option  is
              DEPRECATED in favour of blockdev(1).

       -t, --type type
              Enable  support  only for disklabels of the specified type, and disable support for
              all other types.

       -u, --units[=unit]
              use the option without the unit argument -- then the default is  used.   Note  that
              correct form is for example '-u=cylinders'.

       -C, --cylinders number
              to do so.

       -H, --heads number

       -S, --sectors number

       -V, --version
              Display version information and exit.



       documentation (the Documentation/devices.txt file).


       The "last sector" dialog accepts partition size specified  by  number  of  sectors  or  by
       +<size>{K,B,M,G,...} notation.

       If  the size is prefixed by  '+' then it is interpreted as relative to the partition first
       sector. In this case the size is expected in bytes and the number may be followed  by  the
       YiB. The "iB" is optional, e.g. "K" has the same meaning as "KiB".

       The  relative  sizes  are  always  aligned  according   to   device   I/O   limits.    The
       +<size>{K,B,M,G,...} notation is recommended.

       For  backward  compatibility fdisk also accepts the suffixes KB=1000, MB=1000*1000, and so
       on for GB, TB, PB, EB, ZB and YB. These 10^N suffixes are deprecated.


       fdisk allows to read (by 'I' command)  sfdisk  compatible  script  files.  The  script  is
       applied  to  in-memory  partition  table,  and then it is possible to modify the partition
       table before you write it to the device.

       And vice-versa it is possible to write the current in-memory disk  layout  to  the  script
       file by command 'O'.

       The  script  files  are  compatible  between  cfdisk,  sfdisk,  fdisk and another libfdisk
       applications. For more details see sfdisk(8).


       GPT (GUID Partition Table)
              GPT is modern standard for the layout of the  partition  table.   GPT  uses  64-bit
              logical block addresses, checksums, UUIDs and names for partitions and an unlimited
              number of partitions (although the number of partitions is  usually  restricted  to
              128 in many partitioning tools).

              Note  that  the  first  sector  is  still  reserved for a protective MBR in the GPT
              specification.  It prevents MBR-only partitioning tools  from  mis-recognizing  and
              overwriting GPT disks.

              GPT  is  always a better choice than MBR, especially on modern hardware with a UEFI
              boot loader.

       DOS-type (MBR)
              A DOS-type partition table can describe an  unlimited  number  of  partitions.   In
              numbers 1-4.  Logical partitions are numbered starting from 5.

              uses both, Linux never uses C/H/S.  The C/H/S addressing is deprecated and  may  be
              unsupported in some later fdisk version.

              Please,  read  the  DOS-mode  section if you want DOS-compatible partitions.  fdisk
              does not care about cylinder boundaries by default.

              A BSD/Sun disklabel can describe 8 partitions, the  third  of  which  should  be  a
              disklabel.  Note that a BSD label is usually nested within a DOS partition.

              An  IRIX/SGI  disklabel can describe 16 partitions, the eleventh of which should be
              volume header.  Also do not change its type or make some filesystem  on  it,  since

       A sync() and an ioctl(BLKRRPART) (rereading the partition table from disk)  are  performed
       before exiting when the partition table has been updated.

DOS mode and DOS 6.x WARNING

       Note  that  all  this is deprecated. You don't have to care about things like geometry and
       cylinders on modern operating systems. If you really want DOS-compatible partitioning then
       you  have  to  enable DOS mode and cylinder units by using the '-c=dos -u=cylinders' fdisk
       command-line options.


       The  bottom  line is that if you use fdisk or cfdisk to change the size of a DOS partition
       table entry, then you must also use dd(1) to zero the first 512 bytes  of  that  partition
       before  using DOS FORMAT to format the partition.  For example, if you were using fdisk to

       fdisk usually obtains the disk  geometry  automatically.   This  is  not  necessarily  the
       geometry,  certainly  not  something   that   can   be   described   in   the   simplistic
       partition table.

       is required for good cooperation with other systems.

       Whenever a partition table is printed out in DOS mode, a consistency check is performed on
       (except for the first partition).

       have OS/2 on your machine.

       with the Linux fdisk or Linux cfdisk programs.


       Implicit coloring can be disabled by an empty file /etc/terminal-colors.d/fdisk.disable.

       See terminal-colors.d(5) for more details about colorization  configuration.  The  logical
       color names supported by fdisk are:

       header The header of the output tables.

              The help section titles.

       warn   The warning messages.

              The welcome message.


       Karel Zak ⟨⟩
       Davidlohr Bueso ⟨⟩

       The original version was written by Andries E. Brouwer, A. V. Le Blanc and others.


              enables fdisk debug output.

              enables libfdisk debug output.

              enables libblkid debug output.

              enables libsmartcols debug output.


       cfdisk(8), sfdisk(8), mkfs(8), partx(8)

