GParted errors on MBR Disk, Claims it's GPT. (It's mistaken, but why?)

9,185

Chances are the disk used to be a GUID Partition Table (GPT) disk. Such disks have partitioning data from sectors 0-33 (typically) and also in the last 33 sectors of the disk. If a GPT disk is repartitioned by a GPT-unaware utility, that utility is likely to replace just sector 0 (the MBR), leaving most of the GPT data intact. Technically, the disk is then an MBR disk; however, some partitioning tools, including many Linux tools that are based on libparted (including GParted) become confused by this. They may show the disk as being completely blank or show the old GPT partitions rather than the new MBR partitions. This is a bug in libparted, but it's triggered by some inconsistent data on the disk.

The solution is to wipe the old GPT data. This can be done various ways, but the simplest is probably to use FixParts, which is designed for this and some other partition table repair tasks. Alternatively, you could use dd to wipe sector 1 (numbered from 0) and the final sector on the disk; that's where the GPT signatures that are confusing libparted reside.

Sorry I didn't get here sooner, Mehrdad. My guess is that when you rewrote the partition table you also wiped out the boot loader in the MBR. Re-installing your boot loader should fix that problem. It's possible that you wrote the wrong partition table, though, which would be harder to fix.

Share:
9,185

Related videos on Youtube

user541686
Author by

user541686

Updated on September 18, 2022

Comments

  • user541686
    user541686 over 1 year

    It's very tempting for me to go on a rant here about GParted and Linux, but I'll do my best to avoid it. :)

    Question:

    Why does GParted claim that my disk is corrupted and GPT, whereas the Disk Utility thinks everything is fine?

    My only partition on the disk (NTFS) has Windows 7 x64 on it, and has absolutely no problems -- I never had any problems with it, and I ran CheckDisk to make sure.

    Why is GParted behaving this way?

    (I was going to post this on AskUbuntu, but since GParted isn't really limited to Ubuntu, I posted it here. I'm using Ubuntu 11.04 x64's boot disc.)

    Screenshot

    • Admin
      Admin almost 13 years
      Try running TestDisk.
    • Admin
      Admin almost 13 years
      @Hello71: And do what?
    • Admin
      Admin almost 13 years
      @Mehrdad: Rewrite the partition table?
    • Admin
      Admin almost 13 years
      @Hello71: O___O What makes you think the problem is with the partition table and not GParted? Like I said, the Ubuntu disk utility says it's fine, and Windows boots just fine and Disk Management also works fine.
    • Admin
      Admin almost 13 years
      @Hello71: Thanks for the advice... I rewrote the partition table, and now I get INT18: BOOT FAILURE on boot. Was that what was supposed to happen? x__x
    • Admin
      Admin almost 13 years
      @Mehrdad: Er, did you ensure that the partition table was actually correct?
    • Admin
      Admin almost 13 years
      @Hello71: Yeah, it was correct in terms of the locations on the disk, but I think the problem was because it was an extended partition. I turned it into primary and now it gets recognized, but I'm still getting the same error in GParted as before...
    • Admin
      Admin almost 13 years
      @Mehrdad: What version are you running?
    • Admin
      Admin almost 13 years
      @Hello71: I used the latest version of TestDisk, and the GParted that comes with Ubuntu 11.04 x64.
  • user541686
    user541686 almost 13 years
    Lol, sorry? For what?! That's excellent information you have there, I appreciate the answer! :) I'll take a look at it when I get the chance. (It was just a virtual machine, don't worry... my data isn't at risk. :P)
  • Rod Smith
    Rod Smith almost 13 years
    From your later comments it sounded as if you'd already replaced the partition table, possibly rendering my information moot. If you're still having the problem, though, then it's still relevant....
  • Lorenzo Von Matterhorn
    Lorenzo Von Matterhorn about 11 years
    please do not use links as answers. it is encouraged to post all the relevant information here and use links as reference. if the link gets broken, so does your whole answer.
  • mmrs151
    mmrs151 about 11 years
    @Znau, can you upvote me now as I have given the answer.
  • Lorenzo Von Matterhorn
    Lorenzo Von Matterhorn about 11 years
    i didn't downvote you in the first place. also, upvotes are not to be asked for.
  • Marco C.
    Marco C. about 8 years
    It works! I was having the same problem and using gdisk I removed the GPT and then I used gparted to manage partitions.