'Unrecognised disc label' - when using parted with qemu images

Solution 1:

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

Solution 2:

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

Tags:

Linux

Qemu

Parted