Bug 59530 - clearpart kickstart directive is broken
Summary: clearpart kickstart directive is broken
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: anaconda
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-02-09 19:22 UTC by Need Real Name
Modified: 2007-04-18 16:40 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-02-21 18:48:26 UTC
Embargoed:


Attachments (Terms of Use)
Kickstart Configuration, with sensitive parts deleted and no %post (748 bytes, text/plain)
2002-02-14 02:35 UTC, Need Real Name
no flags Details

Description Need Real Name 2002-02-09 19:22:53 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2)
Gecko/20010726 Netscape6/6.1

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):


How reproducible:
Always

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
repartition).
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).

Additional info:

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:
        return
    else:
        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.

Comment 1 Jeremy Katz 2002-02-11 17:07:03 UTC
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
(bug #54293)

Comment 2 Need Real Name 2002-02-11 18:11:30 UTC
It *is* a bug.  If --all is specified, it's still zapping the partition tables
on the other drives.

Comment 3 Need Real Name 2002-02-11 18:15:58 UTC
Or rather, the following is still zapping the partition tables on hdh, even
though only hdg is specified:

clearpart --all --drives hdg


Comment 4 Jeremy Katz 2002-02-11 19:45:32 UTC
Are you using the update disk?

Comment 5 Need Real Name 2002-02-14 02:35:14 UTC
Created attachment 45639 [details]
Kickstart Configuration, with sensitive parts deleted and no %post

Comment 6 Need Real Name 2002-02-14 02:36:24 UTC
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.

Comment 7 Jeremy Katz 2002-02-19 23:31:21 UTC
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?

Comment 8 Michael Fulbright 2002-04-10 18:20:48 UTC
Closing due to inactivity, please reopen if you contine to have problems.

Comment 9 Red Hat Bugzilla 2006-02-21 18:48:26 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


Note You need to log in before you can comment on or make changes to this bug.