Bug 214677 - On RHEL5 install using hard drive, filesystem with isos not unmounted before %post in ks.cfg executes
On RHEL5 install using hard drive, filesystem with isos not unmounted before ...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda (Show other bugs)
5.0
x86_64 Linux
medium Severity urgent
: ---
: ---
Assigned To: Chris Lumens
:
Depends On:
Blocks: 200812
  Show dependency treegraph
 
Reported: 2006-11-08 15:39 EST by Jose De la Rosa
Modified: 2009-06-19 05:50 EDT (History)
2 users (show)

See Also:
Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-12-21 14:23:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jose De la Rosa 2006-11-08 15:39:25 EST
Description of problem:

During install of RHEL5 x86_64 from disk, the ext2 filesystem where the isos 
are copied to is not unmounted before the %post section of ks.cfg is executed.

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

Kernel 2.6.18-1.2739.el5

How reproducible:

Perform RHEL5 install from disk, where RHEL5 isos are copied to an ext2 
filesystem on a disk. In this case, the isos are copied to /dev/sda2.

Steps to Reproduce:
1. Start RHEL5 x86_64 install process, install from hard drive. In my case, 
the isos are on /dev/sda2.
2. Continue through install process and stop right before you start installing 
the rpms.
3. Change to one of the virtual consoles (Alt-F2) and on the command shell, 
type "df -k" to verify that /tmp/sda2 is mounted read-only.
4. Open the kickstart file (/tmp/ks.cfg) that is created and add code in the %
post section to pause the installation process. A nice infinite loop will do:

while [ -e /tmp/pause]; do
    sleep 10
done

5. Switch back to the main console and start the rpm installation process. Go 
back to the other virtual console and create /tmp/pause:

$ touch /mnt/sysimage/tmp/pause

6. Wait for the rpm install to finish and let it go into %post. Once there, 
type "df -k".
  
Actual results:

Filesystem on /tmp/sda2 is not unmounted before %post section of ks.cfg 
executes.

Expected results:

Filesystem on /tmp/sda2 should not be mounted when %post section of ks.cfg 
executes.

Additional info:

The anaconda process that performs the install is:

/usr/bin/python /usr/bin/anaconda -m hd://sda2.ext2// --graphical --selinux --
kickstart /tmp/ks.cfg --lang en_US --keymap us

I did not test x86, but I'm assuming the problem is there too.

The reason why this is a problem for us is because we reclaim the partition 
where the isos are located. In order to do that, the partition must not be 
mounted. We can work around this issue by adding some umount commands to our 
kickstart file, but in RHEL4 we do not run into this problem.
Comment 1 Jose De la Rosa 2006-11-10 16:24:55 EST
Another Dell group has reported same problem, they have a workaround, which 
has still not worked for me. This is a sev 1 for us because this potentially 
breaks the RHEL 5 re-install process for customers. RHEL 4 does not have this 
behavior, no workaround is needed there.

The workaround code for the other group is:

# makes /tmp/sda2 rw (originally mounted ro)
mount -w -o remount /tmp/isodir/
# commit to disk
sync;sync;sync
# lazy unmount. Unmount when filesystem is not busy anymore.
umount -l /tmp/isodir/
# commit again
sync;sync;sync

Our LVM commands (pvcreate, vgextend, lvcreate) in %post to add /dev/sda2 to 
the LVM pool fail.

Root cause of problem: /tmp/sda2 should not be mounted when %post section in 
ks.cfg executes. This is the case in RHEL4, but for some reason in RHEL5 it's 
not.
Comment 2 Chris Lumens 2006-11-10 17:13:58 EST
Committed a fix to the rhel5 branch.  This will be in the next build of anaconda.
Comment 3 Amit Bhutani 2006-11-15 09:26:43 EST
beta2-candidate of RHEL5 made available to RH has anaconda-11.1.2.16-1. Do we
know if the fix went into this version of anaconda ?
Comment 4 Amit Bhutani 2006-11-16 09:35:08 EST
Chris- What version of Anaconda can we expect to see the fix in ?
Beta2-Candidate handed to us a couple of days ago is still broken.
Comment 5 Chris Lumens 2006-11-16 10:13:20 EST
It will be in 11.1.2.17-1.
Comment 6 Amit Bhutani 2006-11-16 10:33:49 EST
Ah, that would explain why beta2-candidate is failing. It has version
11.1.2-16.1. Would 11.1.2.17-1 be in the official Beta2 build ?
Comment 7 Samuel Benjamin 2006-11-16 13:26:29 EST
Setting Beta blocker and ACK flage for 5.0.
Comment 8 Samuel Benjamin 2006-11-16 13:27:07 EST
Setting Beta blocker and ACK flags for 5.0.
Comment 10 Jose De la Rosa 2006-12-21 12:42:07 EST
Fix verified using RHEL 5 Release Candidate Snapshot 3 (kernel-2.6.18-
1.2839.el5) x86. Have not verified x86_64 because of bug #218123, but fix 
should be arch agnostic.
Comment 11 Amit Bhutani 2006-12-21 14:00:20 EST
Changing status to VERIFIED based on comment #10 from Jose. RH- Please close.
Comment 12 Bryan Schneiders 2007-12-28 17:13:03 EST
This change affects installations from CDROM media.  Now it is nearly impossible
to access files from the installation media with %post commands.  Modified CD
images that previously only required a few added files, a mkisofs and a cdrecord
now need a custom built anaconda as well to undo this.

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