Red Hat Bugzilla – Bug 47872
clearpart --all doesn't always work
Last modified: 2007-04-18 12:34:33 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.
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.
Steps to Reproduce:
1. Screw up the boot sector
2. Reboot and try to do a kickstart with clearpart --all
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
echo -e "d\n4\nd\n3\nd\n2\nd\n1\nw\n" | fdisk /dev/hda
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.
for more information about zerombr.
I am using "zerombr yes" as well, eg:
Red Hat 7.0 and earlier worked fine, this is a new change with 7.1.
Jeremy check this against our current tree please.
This works fine in our current tree.