GPT problem with 12.3

Hi again,
I have updated one of my computers to 12.3 and when I use “mount” or "fdisk"commands i get this message:

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

I have noted that it only affects one of the partitions /srv

Here is the info

ApacheServer:~ # mount -l
devtmpfs on /dev type devtmpfs (rw,relatime,size=4070612k,nr_inodes=1017653,mode=755)
tmpfs on /dev/shm type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
/dev/sda3 on / type ext4 (rw,relatime,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,relatime,mode=755)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sdb2 on /media/Data type ext4 (rw,relatime,data=ordered)
/dev/sdb1 on /media/Backup type ext4 (rw,relatime,data=ordered)
/dev/sda2 on /boot/efi type vfat (rw,relatime,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/sda4 on /srv type ext4 (rw,relatime,data=ordered)
/dev/sda5 on /home type ext4 (rw,relatime,data=ordered)
gvfsd-fuse on /run/user/0/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
gvfsd-fuse on /var/run/user/0/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
ApacheServer:~ # 


ApacheServer:~ # fdisk -l

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


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0xffbf90e6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     4208639     2103296   82  Linux swap / Solaris
/dev/sda2   *     4208640    46153727    20972544   83  Linux
/dev/sda3   *    46153728    88100863    20973568   83  Linux
/dev/sda4               1           1           0+  ee  GPT

Partition table entries are not in disk order

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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: 0x3964203a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   629147647   314572800   83  Linux
/dev/sdb2       629147648   976773167   173812760   83  Linux

Thank you,for your help

You should not get that with “mount” and I don’t see it in your output.

Try:


# gdisk -l /dev/sda

That should list the partition table for that disk.

It isn’t clear whether “/dev/sda” is GPT partitioned with some hybrid partitions, or it is MBR partitioned with some left over GPT indicators from a previous partitioning.

It looks as if you have a UEFI system. And, in that case, you should use GPT partitioning. Just remember to use “gdisk” rather than “fdisk” on that drive.

Apart from that, it is not clear that you have an actual problem, other than using the wrong command.

When you run “gdisk” on “/dev/sda”, it might report some errors. If so, post the output here.

Thank you nricket
Here is the output of gdisk

ApacheServer:~ # gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): C074EC05-9F3A-11E0-B140-7071BC9423BE
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 1341130093 sectors (639.5 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         4208639   2.0 GiB     0700  primary
   2         4208640        46153727   20.0 GiB    EF00  primary
   3        46153728        88100863   20.0 GiB    EF00  primary
   4        88100864       507541503   200.0 GiB   0700  primary
   5       507541504       612397055   50.0 GiB    0700  primary

I think you are right, there are no errors here, This line concerned me “/dev/sda4 1 1 0+ ee GPT”
Does this mean i have nothing to worry about
Your help is appreciated

Doing a hybrid install can be a problem depending on your BIOS and your overall knowledge You really should install all OS’s in the same mode and that should be EFI on a new EFI BIOS machine. You can install All OS’s in MBR mode but mixing modes is a recipe for trouble and confusion. Sometimes it works sometimes it does not. There seems to be a lot of variation in the quality of different EFI BIOS.

Now that you apparently have a hybrid install it can be vary difficult to fix it because you have both MBR and GPT partition tables and that confuses a lot of tools.

IMO I’d back any imprtant data I had then do a total wipe of the disk with DD to zero out all tables then reinstall both OS’s in EFI mode. Note you must boot the install media in EFI mode which may mean telling the BIOS to boot it EFI. Then you would have a clean install of both OS’s with no odd tables laying about.

On 2014-09-14 03:56, Subzero01 wrote:

> Does this mean i have nothing to worry about

Nope. You do have a problem.

You have both a GPT table and an MBR table, and they do not match.
I don’t know how to solve that, except by backup, complete format,
restore. Maybe someone knows.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

That’s not a problem. That’s sometimes call the “protective MBR”. It is flagged to indicate that GPT partitioning is really being used.

Does this mean i have nothing to worry about

It looks okay. The partition type code (the “code” column in the “gdisk” output is wrong, but most software doesn’t look at that. You could change that in “gdisk” if you wanted, but it isn’t causing problems so maybe use the maxim “if it ain’t broke, don’t fix it.”

You do not appear to have an EFI partition, so I assume that you are using BIOS compatibility mode.

You have two of the MBR partitions flagged as active, but apparently that is not causing a problem.

Normally, I would agree with this … but, here, I agree with gogalthorp and Carlos.

You have two of the MBR partitions flagged as active, but apparently that is not causing a problem.

… as nrickert says, you have 2 active flags, though they (so far) do not seem to be causing a problem. This problem you had better fix ASAP before you do run into unanticipated headaches.

It’s not easy to fix. Those flags are in the MBR, not it the GPT table, so “gdisk” won’t touch them. And “fdisk” won’t touch a GPT partitioned disk.

I don’t know if it exists on 12.3, but “sfdisk” looks as if it would ignore the GPT table and work only on the MBR.

Or one could copy the MBR to a file (with the “dd” command, use a hex editor to fix the active flags, then copy it back.

But I think it is best left alone.

The code that complains about multiple active flags is the code that is inside the MBR. Probably, this install put opensuse code there with the “Write generic code to MBR” option of the bootloader install. And it looks as if that version of boot code doesn’t care if there are two partitions with active flags.

There’s a recently reported bug on this problem:

Bug 896369 - Installation left two GPT partitions with legacy-boot flag set

On 2014-09-14 05:06, nrickert wrote:
>
> Subzero01;2664445 Wrote:
>> I think you are right, there are no errors here, This line concerned me
>> “/dev/sda4 1 1 0+ ee GPT”
> That’s not a problem. That’s sometimes call the “protective MBR”. It
> is flagged to indicate that GPT partitioning is really being used.

It is a huge problem, because that ‘ee’ partition should use the whole
disk, and be the sole partition. The idea is that traditional partition
software that is not aware of the existence of the GPT partition table
(table, not entry) bails out, for two reasons: because there is not free
space, and because the (single) entry is labeled “ee GPT”.

That’s why it is called “protective”. To protect. It did not.

Some partition software, or a human controlling it, ignored the fences
and went ahead, creating classical 3 partition entries and ignoring the
existing GPT table (with 5 entries), a thing that can create havoc. You
can only have one land registrar, not two competing ones.

You might, knowing the situation and the risks, do use both tables (an
hybrid), but they have to absolutely match. And they don’t.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Yes, that’s the standard. But this disk uses hybrid partitioning. The “gdisk” command can be used to setup hybrid partitioning. Properly behaving software should recognize the disk as GPT, and ignore the MBR. Older legacy software will not know about GPT, so will only use the MBR. Hybrid partitioning allows both to function.

Some partition software, or a human controlling it, ignored the fences
and went ahead, creating classical 3 partition entries and ignoring the
existing GPT table (with 5 entries), a thing that can create havoc.

I doubt that. It is far more likely that the hybrid partitioning was deliberately setup using software that knows about both forms of partitioning. For example, “gdisk” can do that. And “gdisk” did seem to recognize this as valid hybrid partitioning.

You might, knowing the situation and the risks, do use both tables (an
hybrid), but they have to absolutely match. And they don’t.

No, they do not need to absolutely match.

Individual partitions, listed in both tables, need to match with respect to the allocated sectors. But partitions need not be in both tables. The protective partition should, if possible, include all unassigned space.

Using “gdisk”, you would partition normally and create GPT partitions. Then to hybridize, you tell it which of those partitions are to be also included in the MBR.

If you install a large disk in an older computer, you will probably need to do this. The GPT partitioning makes better use of the disk, and avoids the limits imposed by traditional partitioning. But the BIOS cannot boot it.

In order to boot, you either need to put your own boot code in the MBR (install grub2 in the MBR, for example). Or you need hybrid partitioning, with the bootable partition listed in the MBR partition table so that traditional MBR code can boot it.

Apart from the “two active flags” problem, this looks like pretty good hybrid partitioning.

On 2014-09-14 18:16, nrickert wrote:
>
> robin_listas;2664484 Wrote:

> Apart from the “two active flags” problem, this looks like pretty good
> hybrid partitioning.

I don’t know… I understand what you say, but I don’t like that setup
at all. I don’t trust it an inch. Or a centimeter, rather.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I partly agree. I do think it best to avoid hybrid partitioning.

I have used GPT with an older computer (on an external drive). But I installed grub2 into the MBR, so that I did not need hybrid partitioning. Grub2 does know how to read a GPT partition setup, and can boot your system. So whether the BIOS knows about GPT becomes irrelevant.

My advice with GPT and legacy booting, would be to put grub2 in the MBR. This does require that a special BIOS Boot partition be created, typically in the otherwise unused space from sectors 34-2047.

Hmm, I have also installed to a GPT disk, and set the system to boot from “/boot”. But, in that case, I did not expect it to be directly bootable. I only wanted to make sure that “grub.cfg” was created and updated as needed. I then access that with a “configfile” command from another grub2.

Thank you, everyone for your input, this makes interesting reading and i have learnt something. Can’t i just delete that partition. Alternatively, use it and see what happens

Up to you of course but the setup may introduce some interesting behavior :open_mouth:

Don’t be surprised if things go south on you.