Red Hat Bugzilla – Bug 224681
"parted --script <dev> mklabel msdos" no longer works
Last modified: 2007-11-30 17:07:41 EST
Description of problem:
I use "parted --script <dev> mklabel msdos" and also
"parted --script <dev> mkpart 0 -1" in scripts,
but they have recently started failing - I think since RHEL5 rcs6
but it may go back to earlier snapshots; I believe it worked in
the beta2 from last October.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Go into parted and change the label of some device to e.g. "loop", then quit.
2.At a shell prompt, say: parted --script <dev> mklabel msdos
# parted --script /dev/sdb mklabel msdos
Warning: The existing disk label on /dev/sdb will be destroyed and all data on
this disk will be lost. Do you want to continue?
and the label does *not* change.
I expect the label of the disk to be set to "msdos". In fact, I expect
no warning since the --script option is documented in the man page as
never prompt the user.
Checked latest RHEL 5.1 test builds and the --script option is now working as
expected (i.e., it won't prompt you).
I used your two test commands:
parted --script <dev> mklabel msdos
parted --script <dev> mkpart 0 -1
The mklabel one works fine, but the mkpart one is actually invalid. It lacks
the partition type. Also, you can't specify -1 as the ending point. So I used:
parted --script <dev> mkpart primary 0 1
And that worked.
Closing as nextrelease since this will be fixed in RHEL 5.1.
How do you specify that the partition is to take up the whole disk?
That's what I used the -1 for: if I cannot use that, is there
Also, do you have a version number for the package that I should
get to try it out?