Bug 47872 - clearpart --all doesn't always work
Summary: clearpart --all doesn't always work
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: anaconda
Version: 7.1
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2001-07-08 17:45 UTC by Dax Kelson
Modified: 2007-04-18 16:34 UTC (History)
0 users

Clone Of:
Last Closed: 2001-07-27 20:21:26 UTC

Attachments (Terms of Use)

Description Dax Kelson 2001-07-08 17:45:26 UTC
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 15:58:30 UTC
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 16:24:13 UTC
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 20:21:21 UTC
Jeremy check this against our current tree please.

Comment 4 Jeremy Katz 2001-07-31 22:01:16 UTC
This works fine in our current tree.

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