fdisk: DOS/GPT

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

fdisk: DOS/GPT

Pavel Volkov
Noticed something strange about fdisk output.

EXAMPLE 1.
We see nothing out of place here. It displays a warning.

[rondo:rondo]$ sudo fdisk -l /dev/sda
Password:
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sda: 64.0 GB, 64023257088 bytes, 125045424 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1         2048        69631     33M  EFI System
 2        69632       415743    169M  Microsoft basic
 3       415744     31873023     15G  Microsoft basic
 4     31873024    125042687   44,4G  Microsoft basic

EXAMPLE 2.
It says disk label is 'dos', not 'gpt' anymore. What is the GPT "system" of sdb1 then? And there's no warning now.

[rondo:rondo]$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes, 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

EXAMPLE 3.
I use parted now instead of fdisk. It says both sda and sdb have GPT labels.

Model: ATA M4-CT064M4SSD2 (scsi)
Disk /dev/sda: 64,0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  35,7MB  34,6MB  fat32              boot
 2      35,7MB  213MB   177MB   ext4
 3      213MB   16,3GB  16,1GB  ext4
 4      16,3GB  64,0GB  47,7GB


Model: ATA ST3000VX000-9YW1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  3001GB  3001GB                     lvm


BOTTOM LINE.

Is fdisk lying to me?
Reply | Threaded
Open this post in threaded view
|

Re: fdisk: DOS/GPT

Kerin Millar-2
On 24/07/2013 12:25, Pavel Volkov wrote:
> Is fdisk lying to me?

It would appear so. If you are fond of fdisk, I'd suggest using gdisk as
an alternative for managing disks using GPT. At least, until such time
as the support in fdisk can be considered mature.

--Kerin