Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Linux from scratch LiveCD running on qemu vm. I'm using this command to create a hda disc for qemu:

qemu-img.exe create -f qcow2  base-linux.img 5G

Then I run my vm:

qemu.exe -m 1024 -boot d -cdrom lfslivecd-x86-6.3-r2145.iso -hda base-linux.img

After booting I try this command:

parted /dev/hda unit GB mkpartfs primary ext3 0 5

And it gives me the 'unrecoginised disc label error'.

I'm using parted 1.9.0 and have no ideas as to how to fix it.

share|improve this question
up vote 9 down vote accepted

You probably need to make a label on the disk first.

Try just running parted manually:

parted /dev/hda
unit GB
mklabel msdos
mkpartfs primary ext3 0 5
share|improve this answer
James's answer was nearly what I needed, however since 2 years have passed and large partitions are the norm, msdos did not work for a 4TB partition. In case anyone needs this for large partitions, use a different argument for mklabel, such as gpt (guid partition table) (mklabel gpt) – Ryan Sorensen Feb 10 '12 at 3:06

If you want to do what @James recommended via the cli you can do the following:

$ parted /dev/sde --script -- mklabel msdos
$ parted /dev/sde --script -- mkpart primary 0 -1

This was of course on a smaller HDD (1TB) so as was mentioned in the comments, anything over 2TB will require a different label, and yes you should be using GPT for that.

$ parted /dev/sde --script -- mklabel gpt
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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