# fdisk warning about GPT after changing label to msdos

## mjs

I've got a 500G SATA drive that used to be part of a 5TB hardware array.  The array is gone, but I'm reusing the individual drives.

If I type 'fdisk -l' it reports "WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted."

I used parted to change the label to msdos, but fdisk continues to see the GPT table.

It doesn't seem to be causing any problem, I can still use fdisk or parted to create the partitions and put on a file system.

Why after changing the label to msdos does fdisk still report the warning?  Is this anything to worry about before I start actaully using the drive?

----------

## eccerr0r

GPT is a totally new partition table method that uses a fake traditional MBR/PC-type partition table entry to help prevent accidental partition destruction.  There's a bunch of metadata that goes along with the GPT that's not visible by non-GPT capable tools, all these tools see is a huge GPT partition that eats the whole disk (and there should be only ONE partition.  Any more than ONE partition than the GPT partition is a violation of the standard.

All you really need to do is to use fdisk and delete the GPT partitioning and create a regular partition table entry.  You could also just zero out the first few sectors of the hard drive and create a new MBR/traditional partition table.

----------

## mjs

I've tried creating a new partition using fdisk and it creates it, but it still warns about GPT.  There is only one partition.  I also tried the 'o' option "create a new empty DOS partition table"  Still warns.  Tried this too "dd if=/dev/zero of=/dev/sda bs=512 count=1"

----------

## s4e8

GPT store meta data at first & last few sectors. You should zero the last 34 sectors too.

----------

## mjs

What a pain.  Seems there would be some utility to just wipe the partitions and all associated metadata.

I'm not that familiar with writing zeros, how can I determine which are the last few sectors on the drive?

----------

## mjs

Well, I attached it to my mac and used disk utility to change the partition scheme to MBR and formatted.  Now the warning is gone.  Interestingly enough, once I did that and put it back into my Gentoo box, a partition was then visible on the drive which never showed up before.  I was able to use fdisk to delete it and put a standard partition in place.

I guess it's a fix, but I'd still like to find a simpler quick way to do it without having to attach to my mac.

----------

## eccerr0r

You could just wipe the disk with either copying /dev/zero or use badblocks in destructive mode to overwrite the whole disk.

I'll have to experiment with my GPT disks, didn't expect fdisk to look at the duplicate copy of GPT metadata...  Thought it was good enough to just wipe the boot sector and run fdisk on the disk...

----------

## mjs

I had started with the /dev/zero copy, but it's a 500G drive and I got impatient.  I've got 10 more of them I'll be experimenting with, all with the GPT label.

----------

## j.hendrix

Use:

```
 parted /dev/sdjm mklabel bsd
```

to change the GPT label to a standard BSD label. Then, if you also require to remove the BSD label use the well known trick:

```
 dd bs=1k count=1 if=/dev/zero /dev/sdjm
```

finally rescan partitions with:

```
 partprobe
```

Hope this helps,

JP

----------

