Bug 64160 - 'clearpart --initlabel --drives sda' removes partitions on ALL drives
'clearpart --initlabel --drives sda' removes partitions on ALL drives
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: anaconda (Show other bugs)
7.2
i686 Linux
high Severity high
: ---
: ---
Assigned To: Jeremy Katz
Mike McLean
:
Depends On:
Blocks: 67217 79578
  Show dependency treegraph
 
Reported: 2002-04-26 17:35 EDT by Michael J. Carter
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-15 14:45:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Michael J. Carter 2002-04-26 17:35:43 EDT
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 13:47:55 EDT
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 03:41:27 EDT
Fixed in CVS
Comment 3 Jay Turner 2002-09-04 20:53:48 EDT
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 12:54:45 EST
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 12:38:25 EST
Time tracking values updated
Comment 6 Mike McLean 2003-01-23 16:20:34 EST
fix verified in Phoebe public beta 2
Comment 8 Pancrazio `ezio' de Mauro 2004-01-15 09:34:22 EST
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.