Chances are your disk originally contained a GUID Partition Table (GPT), but you created a new Master Boot Record (MBR) partition table over that with a tool that doesn't understand GPT. Because GPT takes up more space than MBR, this means that there's leftover GPT data, and parted
is becoming confused because of that.
If this analysis is correct, then the easiest solution is to run FixParts on the disk. FixParts will offer to remove the leftover GPT data, and thereafter you should be able to use the disk normally. (You don't need to do anything else in FixParts; just tell it to remove the GPT data when it asks you about this and then exit.)
There is a caveat, though: It's also possible that you had a GPT disk but that something accidentally wrote an MBR partition table to the disk. In this case, you probably want to recover the GPT, not wipe it out! If this is the case, the solution is to run gdisk
on the disk. It will detect the problem and ask if you want to use the GPT or MBR data. Tell it to use the GPT data, check that it's correct by typing p
and comparing the output to whatever you believe to be correct, and then type w
to save the changes.
Both FixParts (fixparts
) and gdisk
are part of the gdisk
package in Ubuntu. It's usually not installed by default, so you may have to install it by typing sudo apt-get install gdisk
.
Test this:
You switch to a text console via Alt + F2.
Try to create a partition start GNU parted as follows:
sudo -i
parted /dev/sda
Output:
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)
Creates a new GPT disklabel i.e. partition table:
mklabel gpt
Sample outputs:
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
Next, set the default unit to TB, enter:
unit TB
To create a 2TB partition size, enter:
mkpart primary 0.00TB 2.00TB
To print the current partitions, enter:
print
Sample outputs:
Model: ATA ST33000651AS (scsi)
Disk /dev/sda: 2.00TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 0.00TB 2.00TB 2.00TB ext4 primary
Quit and save the changes, enter:
quit
Use the mkfs.ext4 command to format the file system, enter:
mkfs.ext4 /dev/sda1
Best Answer
I've seen a similar problem on my disk when I had a leftover partition from my windows 7 system. Went back to windows 7, and took all the partitions off using disk manager.
Also, make sure the disk is not "dynamic" in disk manager.
After that, I was able to do a clean install of ubuntu 12.1o :)
In case you don't have a system running windows 7, you can boot with a windows 7 dvd and run setup. Choose "advanced" when you get to choosing partition for the installation, and erase all partitions there.