Bug 735398
Summary: | parted -s mklabel should not prompt the user for input | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | J.H.M. Dassen (Ray) <rdassen> |
Component: | parted | Assignee: | Brian Lane <bcl> |
Status: | CLOSED NOTABUG | QA Contact: | Release Test Team <release-test-team-automation> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 6.1 | CC: | rbinkhor |
Target Milestone: | rc | Keywords: | FutureFeature, Triaged |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-10-12 21:18:32 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
J.H.M. Dassen (Ray)
2011-09-02 15:02:19 UTC
I don't think that implementing a full --force feature is a good idea. But for this specific case parted really shouldn't be prompting since you are telling it to make a new label anyway. So I'd propose fixing the prompt instead of making wide changes to parted 1.8.x Also, shouldn't this be against RHEL5? RHEL6 uses parted 2.1 The problem here is that -s mklabel shouldn't be prompting the user. We don't need a --force, but do need to fix whatever is causing it to output the prompt. I have successfully reproduced most of the described symptoms -- except that when passing -s to parted it does not expect a response to the prompt and it completes it successfully. The problem is caused by tools, like fdisk, that do not understand GPT. If you have a GPT labeled disk and use something other than parted to make a msdos label it may leave the GPT backup partition table at the end of the disk. On subsequent operations parted sees this and prompts for user input. I have tested this on RHEL5 and 6 and as long as -s is passed to parted it will successfully create the new label. I don't think it is safe to suppress the exception text, there may be cases where this output is useful. If it causes problems with tools then the output of parted should be redirected and the return code checked. In the original report the output of 'parted: invalid token: gpt' indicates that -s was not passed and parted is attempting to use the cmdline input to answer the exception prompt. Also note that parted removes the backup GPT partition table when used to create a msdos label. |