Bug 146054

Summary: clearpart should delete ext3 (and other) meta data from existing partitions
Product: [Fedora] Fedora Reporter: Dax Kelson <dkelson>
Component: anacondaAssignee: Chris Lumens <clumens>
Status: CLOSED RAWHIDE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-22 03:21:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150224    

Description Dax Kelson 2005-01-24 23:10:12 UTC
Description of problem:

In a classroom or lab environment when multiple installs are being
performed on a machine, anaconda and clearpart don't clear enough.

In a FC3 test lab, we are seeing freshly kickstarted machines having
ext3 labels such as "/boot1", "/var/1", and "/usr1".

The kickstart lines we are using are as follows:

clearpart --all --initlabel
part /boot --fstype ext3 --ondisk=hda --size 100
part /     --fstype ext3 --ondisk=hda --size 2060
part swap --ondisk=hda --size 512
part /usr --fstype ext3 --ondisk=hda --size 7925
part /tmp --fstype ext3 --ondisk=hda --size 300
part /var --fstype ext3 --ondisk=hda --size 500

In a related issue, when we create software RAID or LVM using the
exact same commands on the fresh install as were used during the
previous install we get a bunch of complaints from the raidtools/mdadm
and lvm tools about "existing" volumes, etc.

This is very common in a classroom environment.

Proposal:

Either by default, or with an additional switch to clearpart have it
zero out (dd if=/dev/zero ...) the first one megabyte of each
pre-existing partition before it blows away the table and creates a
new table.

Thanks for your consideration.

Comment 1 Jeremy Katz 2005-02-02 03:33:45 UTC
Maybe we should try to use parted's clobber stuff...

Comment 2 Dax Kelson 2005-02-02 16:27:07 UTC
I don't have any insight on the way it should be implemented properly.

Here is our current workaround:

%pre
for i in `(fdisk -l /dev/hda ; fdisk -l /dev/sda) | grep -v Ext | egrep
'^/dev/.da[0-9]*' | sed 's/ .*//' | sort -r`; do dd if=/dev/zero of=$i count=1
bs=1M; done

Comment 3 Sitsofe Wheeler 2005-02-06 00:08:21 UTC
This sounds similar to bug #145732 ...

Comment 4 Chris Lumens 2005-06-24 19:25:03 UTC
clobber doesn't look all that helpful.  I'll look into implementing our own
stuff in anaconda for wiping out labels and other identifying filesystem
information.

Comment 5 Jeremy Katz 2006-09-22 03:21:34 UTC
We have clobbering now