Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 47872 - clearpart --all doesn't always work
clearpart --all doesn't always work
Product: Red Hat Linux
Classification: Retired
Component: anaconda (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2001-07-08 13:45 EDT by Dax Kelson
Modified: 2007-04-18 12:34 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-07-27 16:21:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dax Kelson 2001-07-08 13:45:26 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2+) Gecko/20010706

Description of problem:
You would expect clearpart --all to work regardless of the current
contents/condition of the boot sector.

It doesn't.

For example:

cat /var/log/messages > /dev/hda; sync; reboot -f -n
dd if=/dev/urandom of=/dev/hda bs=4086 count=50; sync; reboot -f -n

Will make it so a clearpart --all will not work correctly.

How reproducible:

Steps to Reproduce:
1. Screw up the boot sector
2. Reboot and try to do a kickstart with clearpart --all


Additional info:

Here is my workaround in my kickstart.ks:

# Fix complaining anaconda about foobared partition table
# you would think that "clearpart --all" would take care
# of it, but it doesn't, so here is the workaround
mknod /dev/hda
echo -e "d\n4\nd\n3\nd\n2\nd\n1\nw\n" | fdisk /dev/hda
Comment 1 Brent Fox 2001-07-10 11:58:30 EDT
Right.  clearpart --all only affects the partitions on the disk...not the master
boot record.  I think what you are looking for is the 'zerombr yes' tag.  This
should reinitialize the boot record.

Refer to
for more information about zerombr.
Comment 2 Dax Kelson 2001-07-10 12:24:13 EDT
I am using "zerombr yes" as well, eg:

zerombr yes
clearpart --all

Red Hat 7.0 and earlier worked fine, this is a new change with 7.1.
Comment 3 Michael Fulbright 2001-07-27 16:21:21 EDT
Jeremy check this against our current tree please.
Comment 4 Jeremy Katz 2001-07-31 18:01:16 EDT
This works fine in our current tree.

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