Remove GPT - Default back to MBR

  • I keep receiving this error:

    Warning!! Unsupported GPT (GUID Partition Table) detected. Use GNU Parted

    I want to go back to the normal MBR. I found some advice here and did:

    parted /dev/sda
    mklabel msdos

    But when I get to the mklabel option it spits out a warning that I will lose all data on /dev/sda. Is there a way to get the normal MBR back without formatting the disk?

    What is your reason for wanting to switch? What is the real problem you are trying to solve?

    If you are formatting the drive, try this: (sorry don't have reputation to put in an answer!)

  • goldilocks

    goldilocks Correct answer

    8 years ago

    That link you posted looks like a very ugly hack type solution.

    However, according to the man page, gdisk, which is used to convert MBR -> GPT, also has an option in the "recovery & transformation" menu (press r to get that) to convert GPT -> MBR; the g key will:

    Convert GPT into MBR and exit. This option converts as many partitions as possible into MBR form, destroys the GPT data structures, saves the new MBR, and exits. Use this option if you've tried GPT and find that MBR works better for you. Note that this function generates up to four primary MBR partitions or three primary partitions and as many logical partitions as can be generated. Each logical partition requires at least one unallocated block immediately before its first block.

    I'd try that first.

    Easily yes, but it is still risky.

    @jordanm: I haven't done this myself (which is why I admit "google implies"), but since gdisk apparently has an explicit means, why do you believe it is risky? The gdisk man page for the `r`->`g` option does not have any caveats at all...

    It'd improve this answer if you were to inline the required gdisk step into your answer. Especially with how short the step is. Never know when the link may go dead, leaving the answer useless.

    @derobert : Yeah, the original was more of a comment. I've used stuff from the `gdisk` man page instead.

    To fully erase you should ZAP in gdisk

    This worked fine for me, without any data loss (though I have good backups). However, I didn't like its choice of logical vs primary. This was probably related to this comment from the authors: "you need to have at least one free (unallocated) sector immediately preceding every to-be-logical partition"(

    I ran `gdisk` and the `g` option wasn't even available. Although I saw it in the manual. That said this answer is probably incomplete.

    @TomášZato you need to press `r` first to get to the `recovery and transformation options (experts only)` submenu

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM