6

I've just installed Ubuntu on a new SSD along with a HDD for data.

Strangely, when I divided partitions at install, 1MB of non-removable free space was reserved at the beginning of each disk. I ignored them however, because I thought they wouldn't be a problem.

ubuntu disk partition

But after install, when I sudo fdisk -l, I get the following warnings:

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 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 identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1   250069679   125034839+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 4000.8 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders, total 7814037168 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 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.

I have little knowledge on GPT/GUIDs, but I'm guessing that the warnings were caused because of the 1MBs at the installation stage.

So here are my questions:

  1. Can the warning be a potential problem, issue or difficulty in the future?
  2. Is there a smart & safe way to fix the warning?
e9t
  • 195

1 Answers1

9

The warning is not a problem.

It's only warning you that the fdisk tool doesn't work on disks using GPT for partitions. It only works on disks using the older MBR (DOS style) partitions .

However, as the warning says, parted (an alternative to fdisk) does work for disks using GPT partition types.

The warning is not related to the 1MB free space. That free space (which will in reality be slightly less than 1MB) is only there to ensure that the partitions line up on 1MB boundaries on the drive, which is generally a good idea for performance on newer drives like SSDs.

thomasrutter
  • 36,774
  • However fdisk about /dev/sdb says: Partition 1 does not start on physical sector boundary., so maybe reformatting that disk according to the 4096B physical size and I/O size would be suggested. – kos Jul 24 '15 at 06:24
  • 3
    No, you should ignore that. Don't pay attention to anything fdisk says about GPT drives; it does not support them and hence it does not understand them properly. That isn't an actual partition it's seeing, because it cannot actually see the partitions on a GPT drive. For actual information about partitions, use parted instead (or gparted, or whatever). – thomasrutter Jul 24 '15 at 06:32
  • Right; I actually also did the math: that 1MB in both disks is actually 1MiB (or fdisk would have complained about the first disk as well), and 1MiB is divisible by 4096, so it would be starting on the sector boundary even if the sector size would have actually been 4096B. – kos Jul 24 '15 at 06:42
  • So I should just use parted rather than fdisk. Thanks for the clear explanation! – e9t Jul 24 '15 at 07:51
  • You're right - starting on a sector boundary was always pretty important, and the 1MiB alignment does solve that over the old "63 sector" alignment. All this said, the reason you can't trust fdisk's warning about the start of the partition is is that the "partition" it found is not actually a partition because it doesn't understand GPT. I believe tools that can work with GPT drives will almost certainly ensure sector alignment even on 4096 byte sectors. – thomasrutter Jul 24 '15 at 10:57
  • 1
    To work with GPT disks in Linux, you must use something based on libparted (parted, GParted, the Ubuntu installer, etc.), something in the GPT fdisk project (gdisk, sgdisk, or cgdisk), or a recent version of fdisk. Ubuntu 14.04 doesn't ship with such a recent fdisk, but 15.04 does. I don't recall if 14.10 does. As to alignment, anything modern uses 2048-sector alignment by default, but very old GPT-aware tools (libparted or GPT fdisk) did not. Many tools enable you to switch to another alignment policy. – Rod Smith Jul 25 '15 at 01:24