Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fdisk warning about GPT after changing label to msdos
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mjs
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2007
Posts: 91
Location: Dallas, TX.

PostPosted: Thu Jun 05, 2008 10:20 pm    Post subject: fdisk warning about GPT after changing label to msdos Reply with quote

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?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9890
Location: almost Mile High in the USA

PostPosted: Thu Jun 05, 2008 11:10 pm    Post subject: Reply with quote

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.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
mjs
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2007
Posts: 91
Location: Dallas, TX.

PostPosted: Thu Jun 05, 2008 11:25 pm    Post subject: Reply with quote

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"
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 311

PostPosted: Fri Jun 06, 2008 6:59 am    Post subject: Reply with quote

GPT store meta data at first & last few sectors. You should zero the last 34 sectors too.
Back to top
View user's profile Send private message
mjs
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2007
Posts: 91
Location: Dallas, TX.

PostPosted: Fri Jun 06, 2008 2:42 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
mjs
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2007
Posts: 91
Location: Dallas, TX.

PostPosted: Fri Jun 06, 2008 3:57 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9890
Location: almost Mile High in the USA

PostPosted: Fri Jun 06, 2008 8:24 pm    Post subject: Reply with quote

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...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
mjs
Tux's lil' helper
Tux's lil' helper


Joined: 07 Mar 2007
Posts: 91
Location: Dallas, TX.

PostPosted: Fri Jun 06, 2008 8:34 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
j.hendrix
n00b
n00b


Joined: 18 Jan 2006
Posts: 9
Location: Eindhoven, the Netherlands

PostPosted: Thu Jul 17, 2008 11:37 am    Post subject: Reply with quote

Use:

Code:
 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:

Code:
 dd bs=1k count=1 if=/dev/zero /dev/sdjm

finally rescan partitions with:

Code:
 partprobe


Hope this helps,

JP
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum