Bug 296761 - Disk partitioning fails with kickstart and existing Windows partitions
Summary: Disk partitioning fails with kickstart and existing Windows partitions
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: anaconda
Version: 4.5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: David Lehman
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-19 18:26 UTC by Ray Van Dolson
Modified: 2018-10-19 21:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-25 19:35:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Error message seen in anaconda (126.46 KB, image/png)
2007-09-19 18:27 UTC, Ray Van Dolson
no flags Details
Disk layout on example system. (12.61 KB, image/png)
2007-09-19 18:27 UTC, Ray Van Dolson
no flags Details
ESRI Kickstart file for RHEL4 (3.82 KB, text/plain)
2007-09-19 22:51 UTC, Ray Van Dolson
no flags Details
Support script for KS config. (914 bytes, text/plain)
2007-09-19 22:52 UTC, Ray Van Dolson
no flags Details
updates for RHEL4-U5 (250.00 KB, application/octet-stream)
2007-09-21 00:24 UTC, David Lehman
no flags Details
unsupported/unofficial RHEL-4.6 updates (1000.00 KB, application/octet-stream)
2008-02-25 19:47 UTC, David Lehman
no flags Details
Obviously unofficial fix that we are using for RHEL 4.7 here at ESRI. (1000.00 KB, application/octet-stream)
2008-08-14 23:31 UTC, Ray Van Dolson
no flags Details

Description Ray Van Dolson 2007-09-19 18:26:56 UTC
Description of problem:


Version-Release number of selected component (if applicable):
anaconda included with RHEL4 Update 5 and earlier (likely RHEL5 as well)


How reproducible:
Every time

Steps to Reproduce:
1. Set up new system with one or multiple disks with Windows XP already
installed on the system either occupying all or part of all available disk space.
2. Boot RHEL4 installation using kickstart using the 'autopart' keyword to
automatically set up a partition layout.
3. Once anaconda reaches the partitioning portion of the setup, observe a
partition error where the only option is to click OK to reboot.
  
Actual results:
System must be rebooted.  Partition table must be cleared out by hand for
Kickstart to work or a non-kickstart install must be done at which point you can
work around the pre-existing Windows partitions just fine from the partitioning
tool in Anaconda.

Expected results:
Anaconda should deal with existing Windows partitions better and/or allow the
user to modify via the partition tool instead of only being given the option to
reboot.

Additional info:
This pops up often in situations where we want to provision a dual booted system
with both XP and RHEL.  XP is installed first and then we attempt to do a
kickstart install for the RHEL portion allowing the installer to override
options as necessary.  As long as the XP partitions are on the system though, a
kickstart install results in the error described above.

Comment 1 Ray Van Dolson 2007-09-19 18:27:30 UTC
Created attachment 199921 [details]
Error message seen in anaconda

Comment 2 Ray Van Dolson 2007-09-19 18:27:45 UTC
Created attachment 199931 [details]
Disk layout on example system.

Comment 3 Ray Van Dolson 2007-09-19 18:29:15 UTC
Should note that this also happens when we have an existing system with Windows
XP on it where we want to overwrite everything with RHEL4.  Using kickstart +
autopart (not using clearpart --all).

There should be an alternate option for user intervention other than having to
reboot.

Comment 4 David Lehman 2007-09-19 22:07:46 UTC
re: comment #3, If you want to clear the existing partitions from kickstart, you
will need to use clearpart. That is what it's there for.

Basically kickstart is for unattended installs, which means you have to know
what you want to do before you start it up. If you don't know what you're going
to do (eg: whether or not you're going to clear the disks), you should use
interactive installation.

If you want to do interactive partitioning in a kickstart install, you can leave
out the partitioning section completely. You will be presented with the
partitioning screens as if you were doing an interactive install.

Another option is to use %pre scripting and %include to dynammically generate
your partitioning specs based on the initial state of the disk(s).

Comment 5 Ray Van Dolson 2007-09-19 22:14:51 UTC
Alright, so I should probably just remove the 'autopart' line from our KS
scripts.  It would be nice to be able to continue to use autopart for scenarios
in which the machine is indeed empty/fresh, and also be able to use the same
kickstart script for when there is already an OS installed.  I guess this could
be achieved with some scripting as you suggest.

At the very least an option here other than to reboot the system (perhaps drop
back to manual partition mode?) would do the trick.  Any reason why this
couldn't be done?  Would it impact negatively unattended installs?

Comment 6 Ray Van Dolson 2007-09-19 22:23:20 UTC
Even if I remove autopart from my Kickstart configuration, I still get the above
error.

Relevant portions of kickstart config:

#autopart
bootloader --location=mbr --append="rhgb quiet"
#clearpart --all

This behavior doesn't seem right?

Comment 7 David Lehman 2007-09-19 22:38:08 UTC
It works for me. (I *just* tried it with RHEL4-U5.)

Perhaps there are other relevant lines in your ks.cfg?

Comment 8 Ray Van Dolson 2007-09-19 22:50:20 UTC
Hmm... same results for me after double checking everythign.  I will attach my
Kickstart file.

Note that this is on a system with a disk containing only one partition that
fills up the entire disk -- so there is no free space at all on it.  I will try
on another system with existing Windows partitions but some unallocated space as
well.

Appreciate your responses on this.

Comment 9 Ray Van Dolson 2007-09-19 22:51:26 UTC
Created attachment 200261 [details]
ESRI Kickstart file for RHEL4

Comment 10 Ray Van Dolson 2007-09-19 22:52:16 UTC
Created attachment 200271 [details]
Support script for KS config.

Comment 11 David Lehman 2007-09-19 23:31:32 UTC
If you don't put any partitioning statements in ks.cfg (it appears to be the
case) it should not be attempting to partition before you run through the
partitioning screens.

Wait -- are you getting the error before or after going through the partitioning
screens?

Comment 12 Ray Van Dolson 2007-09-19 23:42:25 UTC
I get the error before going through the partitioning screens.  Right after
clicking Next on the initial welcome screen in fact.

I understand you can't fix something you can't reproduce. :) I will try this on
another machine tomorrow as well.

Comment 13 David Lehman 2007-09-20 16:53:18 UTC
It turns out that adding "interactive" introduces the failure for me as well. I
don't suppose you can remove that from your ks.cfg?

Comment 14 Ray Van Dolson 2007-09-20 17:02:51 UTC
Interesting.  I can remove it for testing purposes, but part of our goal here is
for Kickstart to provide the "defaults" but allow the installer to override as
necessary as they move through the process -- and to still automatically run
post-install setup scripts.

So for "live", no, interactive is important.... any thoughts on why
"interactive" is triggering this?

Comment 15 Ray Van Dolson 2007-09-20 17:34:36 UTC
I can also confirm that the error does not occur once I remove "interactive"
from my Kickstart configuration.

Comment 16 David Lehman 2007-09-20 23:41:56 UTC
After a quick look at the code, it appears that this is not an issue in RHEL5. I
don't know how useful that is to you, but I thought it worth mentioning.

If you like, I can provide you with an updates.img (you put it in RedHat/base/
in your installation tree) that might alleviate the problem. Note that this
would not be an official or supported fix. If you would like to get an official,
supported fix you should go through Red Hat Support.

Comment 17 Ray Van Dolson 2007-09-21 00:01:29 UTC
Sure, I'll give the .img file a try.  If that does indeed do the trick I'll open
a request with support and mention this bug.

We're seeing more RHEL5 showing up here, but RHEL4 won't be going away anytime
soon either.  Would be nice to see a "fix" for both Update 4 and Update 5, but
an Update 5 and later fix would be good enough.

Thanks again for your assistance.

Comment 18 David Lehman 2007-09-21 00:24:41 UTC
Created attachment 201561 [details]
updates for RHEL4-U5

This is completely untested, unsupported, and unofficial.

It is supposed to prevent attempts to autopartition interactive kickstart
installs that have no partition specs in kickstart config.

Rename to updates.img, put it in RedHat/base/ in your RHEL4-U5 tree and it
should get picked up and used. Please let me know how it goes.

Comment 19 Ray Van Dolson 2007-09-21 16:49:17 UTC
This appears to work fine for our needs.  Allows us to choose manual partition
and at least continue the install.

If someone does select Automatic Partition using free space however, the same
error still does pop up and the only option is to reboot the system.  Any way to
make it fail a little more gracefully here?  An option to go back would be nice.

I will open a support request for an "official" fix.

Thanks!

Comment 20 Ray Van Dolson 2007-11-28 22:44:14 UTC
Dave a couple questions:

1. Your fix above will not work with 64-bit RHEL4U5 correct?
2. Is this fix in place in RHEL4U6?

Comment 21 David Lehman 2007-12-04 19:06:37 UTC
The fix should work for 32-bit or 64-bit installs.

This is not fixed in RHEL4.6.

Comment 22 Ray Van Dolson 2008-02-08 22:23:55 UTC
Would it be possible to get an updates.img for this that works with RHEL 4.6?  I
broke open the updates.img and tried merging in the changes from kickstart.py to
the kickstart.py in RHEL 4.6 but didn't seem to do the trick.

Comment 24 RHEL Program Management 2008-02-25 19:35:12 UTC
Product Management has reviewed and declined this request.  You may appeal this
decision by reopening this request. 

Comment 25 David Lehman 2008-02-25 19:47:33 UTC
Created attachment 295831 [details]
unsupported/unofficial RHEL-4.6 updates

This is untested but functionally identical to the 4.5 updates that worked.

Comment 27 Ray Van Dolson 2008-08-14 23:31:15 UTC
Created attachment 314361 [details]
Obviously unofficial fix that we are using for RHEL 4.7 here at ESRI.

Don't blame me if it doesn't work for you! :-)


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