Bug 506663

Summary: at FC11 install with kickstart the %post --nochroot parameter is ignored
Product: [Fedora] Fedora Reporter: stef <stephane.tranchemer>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: glennbaptista, rmaximo, vanmeeuwen+fedora
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-07 23:07:36 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:
Attachments:
Description Flags
a ks.cfg showing the problem none

Description stef 2009-06-18 08:30:36 UTC
Description of problem:
When installing FC11 with a kickstart file containing procedure in postinstall, the '%post --nochroot' section is considered as '%post'

It is chrooted even if explicitly asked not to

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

Fedoca Core 11 (final)

How reproducible:

Always

Steps to Reproduce:
1.make a kickstart installation with commands in '%post --nochroot' and '%post'
2.compare the results and the mount points in the two different postinstall
3.
  
Actual results:
'%post --nochroot' does not keep the newly installed system as mounted in /mnt/sysimage and the installation source (from NFS in my case) in /mnt/source, it is chrooted in the newly installed system

Expected results:
'%post --nochroot' allow to keep the newly installed system as mounted in /mnt/sysimage and the installation source (from NFS in my case) in /mnt/source and to script operations accordingly

Additional info:

Comment 1 Chris Lumens 2009-07-02 14:16:20 UTC
A quick test here with the following:

%post
touch /tmp/CHROOTED
%end

%post --nochroot
touch /tmp/NOCHROOT
%end

shows that it's acting as it should.  Can you please rephrase what you're seeing and what you're expecting?

Comment 2 glenn 2009-07-02 22:55:18 UTC
The following fragment of code does not copy the directory from the installation DVD, even though it did in previous versions.

%post --nochroot
#!/bin/sh

# We need to copy files from the cdrom
mkdir /mnt/sysimage/tempdir
mkdir /mnt/cdrom
mount -t iso9660 /tmp/cdrom /mnt/cdrom

cp -R /mnt/cdrom/Gateman /mnt/sysimage/tempdir

%end

Comment 3 Chris Lumens 2009-07-28 12:28:03 UTC
The problem is that /tmp/cdrom no longer exists.  The device nodes are now all in /dev where they should have been the whole time.  Due to a separate problem, /dev/cdrom most likely does not exist though.  If you try mounting /dev/sr0, this should probably work just as you want.

Comment 4 stef 2009-07-28 12:37:55 UTC
Created attachment 355404 [details]
a ks.cfg showing the problem

Here's the ks.cfg we were using until FC8 (with little cosmetics)

The post install part was running fine until now, we then spotted this --nochroot being ignored during the FC11 adapting tests.

Comment 5 stef 2009-07-28 12:38:31 UTC
Reopening the bug since not answering the right question

Comment 6 Chris Lumens 2009-07-28 12:52:30 UTC
I don't have time to debug everyone's kickstart files.  What is happening with your file that leads you to believe it's a --nochroot issue?  I've already tested and found that it does appear to be chrooting vs. not appropriately depending on the flags (see comment #1).

Comment 7 stef 2009-07-28 13:02:16 UTC
Well, as you can see we are calling certains customizations that are on the server in the tree structure of the DVD image (a directory called 'installer')

during the postinstall --chroot process, the installed (unfinished) Linux is mounted in /mnt/sysimage and the DVD image in /mnt/source

during the postinstall chrooted process the installed (unfinished) Linux is mounted in / (formerly in /mnt/sysimage).

Our test shows that the postinstall --chroot process does the same than the postinstall chrooted process therefore our scripts doesn't work and the install does not go as expected.

Comment 8 stef 2009-07-28 13:22:13 UTC
(In reply to comment #7)
> Well, as you can see we are calling certains customizations that are on the
> server in the tree structure of the DVD image (a directory called 'installer')
> 
> during the postinstall --chroot process, the installed (unfinished) Linux is
> mounted in /mnt/sysimage and the DVD image in /mnt/source
> 
> during the postinstall chrooted process the installed (unfinished) Linux is
> mounted in / (formerly in /mnt/sysimage).
> 
> Our test shows that the postinstall --chroot process does the same than the
> postinstall chrooted process therefore our scripts doesn't work and the install
> does not go as expected.  

OOops, of course I mean the postinstall --nochroot, there's no --chroot

Comment 9 Chris Lumens 2009-10-07 23:07:36 UTC
I've already tested and shown that the actual --nochroot/--chroot parameter works.  What it looks like to me is that your real complaint is what's mounted and where in these two scriplets.  Of course, you have control in your scripts and are free to mount what you want to whichever mount points you need it, though I advise you to make sure you unmount things later.