View previous topic :: View next topic |
Author |
Message |
mjs Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 07 Mar 2007 Posts: 91 Location: Dallas, TX.
|
Posted: Thu Jun 05, 2008 10:20 pm Post subject: fdisk warning about GPT after changing label to msdos |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
eccerr0r Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 01 Jul 2004 Posts: 9890 Location: almost Mile High in the USA
|
Posted: Thu Jun 05, 2008 11:10 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mjs Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 07 Mar 2007 Posts: 91 Location: Dallas, TX.
|
Posted: Thu Jun 05, 2008 11:25 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
s4e8 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 29 Jul 2006 Posts: 311
|
Posted: Fri Jun 06, 2008 6:59 am Post subject: |
|
|
GPT store meta data at first & last few sectors. You should zero the last 34 sectors too. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mjs Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 07 Mar 2007 Posts: 91 Location: Dallas, TX.
|
Posted: Fri Jun 06, 2008 2:42 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mjs Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 07 Mar 2007 Posts: 91 Location: Dallas, TX.
|
Posted: Fri Jun 06, 2008 3:57 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
eccerr0r Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 01 Jul 2004 Posts: 9890 Location: almost Mile High in the USA
|
Posted: Fri Jun 06, 2008 8:24 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mjs Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 07 Mar 2007 Posts: 91 Location: Dallas, TX.
|
Posted: Fri Jun 06, 2008 8:34 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
j.hendrix n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/212249102043ce8fe350bcf.jpg)
Joined: 18 Jan 2006 Posts: 9 Location: Eindhoven, the Netherlands
|
Posted: Thu Jul 17, 2008 11:37 am Post subject: |
|
|
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:
Hope this helps,
JP |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|