Red Hat Bugzilla – Bug 59530
clearpart kickstart directive is broken
Last modified: 2007-04-18 12:40:10 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2)
Description of problem:
The clearpart kickstart directive only does things if --all or --linux is
specified. Essentially, the --drives flag has no effect. This makes it
impossible to leave a drive untouched with a kickstart install, whilst still
repartitioning another drive.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Make a kickstart configuration that uses clearpart --drives <foo>.
2. An install vs. that config will not clear any partitions (and will fail if
one attempts to specify new partitions for the drive that one wishes to
3. Make a kickstart configuration that uses clearpart --all --drives <foo>.
4. An install vs. that config will clear all partitions on all drives.
Actual Results: Specified in the steps above...
Expected Results: In the first case, it should just clear the partition tables
on the specified drives. The second case is the only way to complete an
installation, but it can cause data loss (though it can be recovered by applying
an identical partition table to the affected drives).
The lines in the anaconda source where --all and --linux are the only options
effected can be found in autopart.py, line 765:
if type == CLEARPART_TYPE_LINUX:
linuxOnly = 1
elif type == CLEARPART_TYPE_ALL:
linuxOnly = 0
elif type == CLEARPART_TYPE_NONE:
raise ValueError, "Invalid clear part type in doClearPartAction"
See the second elif clause, where the function returns if one of --all or
--linux was not specified. The code probably needs adjustment elsewhere. I'd
submit a patch, but I am not familiar with Python.
You have to specify both --all/--linux and a --drives specifier. The drives
specifier is what the --all or --linux apply to (so that you can just remove the
Linux partitions from a drive if you were so inclined).
Also, if you're specifying multiple drives, you'll need the updates.img released
It *is* a bug. If --all is specified, it's still zapping the partition tables
on the other drives.
Or rather, the following is still zapping the partition tables on hdh, even
though only hdg is specified:
clearpart --all --drives hdg
Are you using the update disk?
Created attachment 45639 [details]
Kickstart Configuration, with sensitive parts deleted and no %post
It still doesn't work, even with the update disk.
I've attached the relevant parts of the kickstart configuration that I'm using
on the host.
This is working for me (with the change that I have to s/hdg/hda/ throughout
since my boxes have hda and hdb, but there's no special casing of that sort)
here. You booted with 'linux updates' and used the 20020117 update image?
Closing due to inactivity, please reopen if you contine to have problems.
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.