Bug 1561930 - kickstart: "clearpart --list" does not work
Summary: kickstart: "clearpart --list" does not work
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda
Version: 7.4
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Jiri Konecny
QA Contact: Release Test Team
Sharon Moroney
Depends On:
Blocks: 1557360
TreeView+ depends on / blocked
Reported: 2018-03-29 08:28 UTC by Marcel Telka
Modified: 2018-10-30 07:54 UTC (History)
16 users (show)

Fixed In Version: anaconda-
Doc Type: Bug Fix
Doc Text:
The "clearpart" Kickstart command can now be used on disk partitions Previously, using the Kickstart command "clearpart --list=<part>" (where <part> is a partition on a disk) during installation worked for disks but not disk partitions. As a consequence, Anaconda stopped the installation with the message: Device <part> given in clearpart device list does not exist. This update removes the restriction and supports clearing on disk partitions.
Clone Of: 1410335
Last Closed: 2018-10-30 07:53:20 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:3035 0 None None None 2018-10-30 07:53:59 UTC

Description Marcel Telka 2018-03-29 08:28:18 UTC
+++ This bug was initially created as a clone of Bug #1410335 +++

Description of problem:

When I add "clearpart --list=sda1" to the ks file on a machine _with_ existing /dev/sda1 partition, the installer reports that the sda1 device does not exist and the installation stops.

Version-Release number of selected component (if applicable):

anaconda 25.20.8-1 (Fedora 25)

How reproducible:

Always with Fedora 25.
It works properly with Fedora 24.

Steps to Reproduce:
1. Add "clearpart --list=sda1" to a kickstart file
2. Make sure you have /dev/sda1 partition.
3. Try to install using the kickstart file.

Actual results:

Device "sda1" given in clearpart device list does not exist.

Pane in dead

Expected results:

The /dev/sda1 partition is removed and installation proceeds.

Additional info:

--- Additional comment from Matt McLean on 2017-02-03 21:51:46 EST ---

I am having the same issue, but with RHEL 7.3 on aarch64.

--- Additional comment from UoPNorthernTeam on 2017-09-07 05:53:31 EDT ---

Facing the exact same issue but with CentOS 7.3.

--- Additional comment from Samantha N. Bueno on 2017-09-07 06:18:11 EDT ---

Please try this using F26, and if the issue still persists, attach all logs to this bug as individual, text/plain attachments. They can be found in /tmp/ at install-time.

For those who have this same issue on RHEL/CentOS, please try it against 7.4 first. If the issue still persists, please open a new bug against the appropriate product. You can also reach out to your customer support representative and have them open a bug on your behalf. We track Fedora and RHEL/RHEL-related issues separately.

--- Additional comment from Fedora End Of Life on 2017-11-16 14:31:55 EST ---

This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

--- Additional comment from Fedora End Of Life on 2017-12-12 05:14:43 EST ---

Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

--- Additional comment from Marcel Telka on 2017-12-23 16:09 EST ---

--- Additional comment from Marcel Telka on 2017-12-23 16:09 EST ---

--- Additional comment from Marcel Telka on 2017-12-23 16:10 EST ---

--- Additional comment from Marcel Telka on 2017-12-23 16:10 EST ---

--- Additional comment from Marcel Telka on 2017-12-23 16:11:20 EST ---

The problem is still reproducible with recent Rawhide.

--- Additional comment from Marcel Telka on 2017-12-24 03:42:34 EST ---

From quick look at the sources I suspect the problem is here in pyanaconda/kickstart.py where disks_only should be probably set to False instead:

        # Do any glob expansion now, since we need to have the real list of
        # devices available before the execute methods run.
        devices = []
        for spec in self.devices:
            matched = device_matches(spec, disks_only=True)
            if matched:
                raise KickstartParseError(formatErrorMsg(self.lineno,
                        msg=_("Device \"%s\" given in clearpart device list does not exist.") % spec))

        self.devices = devices

--- Additional comment from Marcel Telka on 2017-12-26 06:58 EST ---

I tested this patch (with CentOS 7.4) and it solved the problem.

--- Additional comment from Marcel Telka on 2018-02-16 02:48:48 EST ---

Fixed in a pull request: https://github.com/rhinstaller/anaconda/pull/1334

--- Additional comment from Fedora End Of Life on 2018-02-20 10:22:47 EST ---

This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 2 Jiri Konecny 2018-04-20 10:37:27 UTC
PR: https://github.com/rhinstaller/anaconda/pull/1344

Comment 5 Alexander Todorov 2018-07-27 12:11:58 UTC
Verified with anaconda-, -0724.0 compose.

Comment 11 errata-xmlrpc 2018-10-30 07:53:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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