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

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


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

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:

%pre
# 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
http://www.redhat.com/support/manuals/RHL-7.1-Manual/customization-guide/s1-kickstart2-options.html
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.