LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 05-28-2009, 10:09 PM   #1
rbdavis
LQ Newbie
 
Registered: Nov 2004
Posts: 4
Thanked: 1
can't get rid of GPT disk label


[Log in to get rid of this advertisement]
I have a machine with a 3Ware 9650 RAID card controlling one small disk functioning as a standalone disk holding my Linux installation (/, /boot, etc.)
and several other disks which are aggregated into a RAID-5 volume. The system vendor configured the latter with a GPT disk label. The total RAID size is under 2 Tb so GPT is really not required, and I would prefer maintaining it with fdisk just because that's what I'm used to. fdisk complains that the disk device (/dev/sdb) has a GPT label, however.

The vendor told me to wipe the beginning of the disk with dd and that would clear the GPT. It did not. I found documentation stating that a duplicate label was also stored at the end of the disk, so I also tried wiping that to no avail. These steps did, however, clear the partition table of entries and I can use fdisk to add new partitions, then use mke2fs to build a filesystem which looks OK. However, even after all this, whenever I use fdisk it still complains about the old GPT hanging around although that does not appear to otherwise impede fdisk's ability to manipulate the disk label. How the heck can I get rid of this GPT stuff, or does it not matter at all that it's still hanging around? The one thing I do not want obviously is to have my users fill this filesystem with data and then have it get ultimately corrupted because fdisk and GPT are fighting with each other.

I also tried parted's own 'mklabel msdos' command, hoping that would get rid of the GPT and just leave me with an old-style label, but that did not clear the GPT either.

Any advice on how to clean this mess up, or believable assurance that it does not actually matter?

Thanks!

Roger Davis
Univ. of Hawaii
rbdavis is offline  
Tag This Post
Reply With Quote
Old 05-29-2009, 04:36 AM   #2
contusion
Member
 
Registered: Mar 2005
Posts: 301
Thanked: 6
Just make a new MSDOS partition table with fdisk and make a filesystem with mkfs.
contusion is offline     Reply With Quote
Old 05-29-2009, 11:32 AM   #3
rbdavis
LQ Newbie
 
Registered: Nov 2004
Posts: 4
Thanked: 1

Original Poster
can't get rid of GPT disk label

>Just make a new MSDOS partition table with fdisk and make a filesystem with mkfs.

Thanks, contusion, but that does not work. (I assume you mean fdisk's 'o' command.) Well, it works in the sense that the new label is built and the disk otherwise functions as expected, but I continue to get the error message about a pre-existing GPT whenever I run fdisk.
rbdavis is offline     Reply With Quote
Old 05-29-2009, 11:47 AM   #4
mostlyharmless
Member
 
Registered: Jan 2008
Distribution: Slackware 12.1
Posts: 818
Thanked: 44
Certainly it'd be overkill and take a while on a 2 TB disk, but you could use dd on the whole disk since it sounds like you missed part of the GPT label with dd. gparted can deal with GPT disks, so perhaps you could use it to restore it, then delete the GPT label and replace it with the "traditional" PC partition table.

Last edited by mostlyharmless; 05-29-2009 at 11:49 AM..
mostlyharmless is offline     Reply With Quote
Old 05-29-2009, 03:27 PM   #5
dv502
Member
 
Registered: Sep 2006
Location: New York City
Distribution: Arch Linux
Posts: 506
Thanked: 12
First suggestion.

Since you have a raid card, most likely it will have its own bios. Have you checked it's bios to see anything related to hard drive setups? Maybe there's an option to overwrite the disklabel.

Second suggestion.
Have you tried deleting the partitions and creating new ones or changing the ID of the partition?

A few years ago, I had a unused freebsd partition. I formatted it as an ext3 partition. I soon realized I was having issues with the partition. I type fdisk -l to check the layout. To my surprised, the partition ID said freebsd. That was strange. I formatted the partition as an ext3.

So, I had a freebsd label with an ext3 file system. After a while of goggling, I saw a post that said to change the partition ID using fdisk. It said, run fdisk, then type the letter p to display entries. Then type t for partition type, select the partition you want to change, type L for listings and then type the ID code. Type p again to see if the changes were made. If satisfied, type w to write the new table.

This procedure has worked and my partition ID said linux.

Anyway, I hope this will help. Just a suggestion to try since it worked for me in the past.

- Cheers

Last edited by dv502; 05-29-2009 at 04:00 PM..
dv502 is online now     Reply With Quote
Old 05-30-2009, 09:40 PM   #6
rbdavis
LQ Newbie
 
Registered: Nov 2004
Posts: 4
Thanked: 1

Original Poster
Thanks to all for their suggestions, the problem is solved. The vendor who sold me the system and created the unwanted GPT was able to ultimately figure it out.

There really are GPTs at both the beginning and end of the disk, it is insufficient to clear only the first one. The following pair of dd commands ultimately worked. I had actually already tried something similar but the dd command I used for the end of the disk was somewhat different and failed to work for reasons unknown. These commands worked:

# dd if=/dev/zero of=/dev/sdb bs=512 count=2
# dd if=/dev/zero of=/dev/sdb bs=512 seek=2929629465

(/dev/sdb has 182361 cylinders of 16065 512b sectors each for a total of 2929629465 sectors.)

Thanks again to everyone!

Roger Davis
rbdavis is offline  
Tag This Post
Reply With Quote
Thanked by:

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help!!! Unable to convert GPT disk!!! kramer2718 Linux - Software 2 03-14-2009 10:44 PM
gpt label in parted, partitions look OK. GrUB not booting 64bit OS on 8th primary digital8doug Linux - Newbie 1 12-31-2008 03:20 PM
Huge piles of disk with LVM and/or RAID - GPT/GUID?? petcherd Slackware 2 12-18-2007 05:50 PM
How to change the label of a disk dtournas Red Hat 0 08-17-2004 09:02 AM
Disk label strangeness? MadCactus Linux - General 2 08-13-2003 01:24 PM


All times are GMT -5. The time now is 12:51 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration