Bug 64160 - 'clearpart --initlabel --drives sda' removes partitions on ALL drives
Summary: 'clearpart --initlabel --drives sda' removes partitions on ALL drives
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: anaconda
Version: 7.2
Hardware: i686
OS: Linux
high
high
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks: 67217 79578
TreeView+ depends on / blocked
 
Reported: 2002-04-26 21:35 UTC by Michael J. Carter
Modified: 2005-10-31 22:00 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-01-15 19:45:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Michael J. Carter 2002-04-26 21:35:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020313

Description of problem:
The 'clearpart --initlabel --drives sda' command in the kickstart file (see
additional information) clears the paritions on /dev/sdb as well
as /dev/sda.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. do a kickstart install using the attached kickstart file
2.
3.
	

Actual Results:  Parition table on /dev/sdb is gone.

Expected Results:  Partition table on /dev/sdb shouldn't get touched.

Additional info:

# L A N G U A G E   S P E C I F I C A T I O N (Required for upgrade)
lang en_US
langsupport --default en_US en_US

# N E T W O R K   C O N F I G U R A T I O N
network --bootproto dhcp

# I N S T A L L A T I O N   M E T H O D (Required for upgrade)
nfs --server kitchenaid-g0 --dir
/vol/vol2/home/mirrors/ftp.redhat.com/redhat/linux/7.2/en/os/i386

# D E V I C E   S P E C I F I C A T I O N  (Required for upgrade)
#N/A

# K E Y M A P   S P E C I F I C A T I O N (Required for upgrade)
keyboard us

# D E V I C E   C O N T R O L L E R S   -   N O P R O B E
#noprobe
#N/A

# D E V I C E   C O N T R O L L E R S  -  --C O N T I N U E
#device --continue
#N/A

# P A R T I T I O N   S P E C I F I C A T I O N
zerombr yes
clearpart --initlabel --drives sda
part swap --size 2047 --badblocks --ondisk hda
part /boot --size 32 --badblocks --ondisk hda --fstype ext2
part / --size 4098 --badblocks --ondisk hda --fstype ext2
part /data0 --size 1 --grow --badblocks --ondisk hda --fstype ext2

# I N S T A L L / U P G R A D E   S P E C I F I C A T I O N (Required for upgrade)
install

# M O U S E   S P E C I F I C A T I O N
mouse generic3ps/2 

# T I M E Z O N E   S P E C I F I C A T I O N
timezone --utc US/Mountain

# X   W I N D O W   S Y S T E M   S P E C I F I C A T I O N
xconfig --startxonboot
text

# R O O T   P A S S W O R D
rootpw --iscrypted <omitted>

# A U T H E N T I C A T I O N    C O N F I G U R A T I O N
auth --enablenis --nisdomain <omitted>

# B O O T   L O A D E R   C O N F I G U R A T I O N (Required for upgrade)
bootloader --md5pass=<omitted>

# P A C K A G E   S P E C I F I C A T I O N
%packages
@ Everything   

# P O S T - I N S T A L L A T I O N   C O M M A N D S
%post

Comment 1 Jeremy Katz 2002-05-03 17:47:55 UTC
This is because initlabel wasn't ever really made to work with the drives
feature as drives came second.

Comment 2 Jeremy Katz 2002-08-02 07:41:27 UTC
Fixed in CVS

Comment 3 Jay Turner 2002-09-05 00:53:48 UTC
Jeremy, I did a bit of testing with this today (re0903.2) and both drives had
their partition tables cleared even though the kickstart file said to only clear
the partition table on sda.

Comment 4 Jeremy Katz 2002-11-01 17:54:45 UTC
Oops, I drilled all of the support into the lower levels of the code and then
forgot to commit the change to the caller to take advantage of it.  Fixed in CVS

Comment 5 Michael Fulbright 2002-12-20 17:38:25 UTC
Time tracking values updated

Comment 6 Mike McLean 2003-01-23 21:20:34 UTC
fix verified in Phoebe public beta 2

Comment 8 Pancrazio `ezio' de Mauro 2004-01-15 14:34:22 UTC
Reopened because the bug is still there on Red Hat Enterprise Linux
2.1 Update 3.

As a workaround, you can create a %pre script using fdisk to achieve
the same effect of --initlabel. clearpart --drives=sda --all works as
intended.

Here's a sample %pre script:

%pre
mkdir /tmp/pre
mknod /tmp/pre/hdb b 3 64
fdisk /tmp/pre/hdb <<_EOF_
o
w
_EOF_
rm /tmp/pre/hdb
rmdir /tmp/pre



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