I have an internal SATA hard drive which is 4TB. When installing Debian Wheezy, the installer saw it as a 2.2TB drive. I was told to use GNU parted to set up GPT on the partition I wanted, so I set up the initial partitions as follows:
/ - 50GB
swap - 10GB
/raid - 2.14TB ext4 (this is the partition in question)

Running fdisk -l lists the following partitions:
/dev/sda1 (boot)
/dev/sda2 (swap)
/dev/sda3 (presumably the partition for /raid)

I ran parted /dev/sda3 followed by mklabel gpt. The second command gave me an error which read something along the lines of:
"Error: Partition(s) 1, 2, 3, .... , 64 on /dev/sda3 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes."

The above message is produced whenever I execute mkpart as well. Furthermore, when executing mkpart, I can't seem to specify a size beyond 2.14TB, even if I specify End to be 100%.

So, to sum up: What do I need to do to get my 4TB - 50GB (for /) - 10GB (for swap) = 3.94TB (roughly)?

My kernel version is: 3.2.0-4-686-pae

  • Try cfdisk instead of fdisk. Jul 31 '13 at 6:52
  • Follow the advice you reported from parted: You should reboot now before making further changes. Also, cfdisk won't help; both cfdisk and fdisk are tools for managing the old Master Boot Record (MBR) partitioning system, whereas you need to use the new GUID Partition Table (GPT) system. To use GPT, you need to use either something based on libparted (parted, GParted, etc.), or something in the GPT fdisk family (gdisk, cgdisk, or sgdisk).
    – Rod Smith
    Jul 31 '13 at 15:34

GPT is a partition table for the whole disk, not for a single partition in MBR partition table. So using parted you can do:

parted /dev/sda
mklabel gpt
mkpart ...
mkpart ...
mkpart ...
  • Since I only have a single disk, does that mean all my data gets wiped out by running parted on it? If that's the case then let me get this right. The sequence of steps to switch from MBR to GPT for a single disk setup is: install the OS, run parted (which will wipe out the OS), install OS again. Is that correct?
    – Ash
    Aug 1 '13 at 1:34
  • Update: Ran gdisk which merged all three partitions (sda1, sda2, sda3) into one (sda1) and claimed it to be GPT. Now I can no longer boot and the system stops at the message: "PXE-E53: No boot filename received"
    – Ash
    Aug 5 '13 at 5:08
  • My system is 32 bit. Is it even possible to use UEFI? According to the Debian Wheezy release notes, UEFI is supported for 64 bit systems. It doesn't say anything about 32 bit systems.
    – Ash
    Aug 5 '13 at 6:10

I know this is an old thread, but still important. In answer to your single disk question. You should boot off of a live cd to run parted. This should allow you to convert the MBR to GPT on the unmounted single disk. Parted does not necessarily wipe out the data on the drive unless you use something like mkfs or change the limits to exclude where the OS is. Some examples can be found at http://www.thegeekstuff.com/2011/09/parted-command-examples/ Once you have converted the MBR to GPT, you will have to add the partition information. Read about mklabel and rescue at http://www.gnu.org/software/parted/manual/parted.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.