Bug 506663 - at FC11 install with kickstart the %post --nochroot parameter is ignored
at FC11 install with kickstart the %post --nochroot parameter is ignored
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-18 04:30 EDT by stef
Modified: 2009-10-07 19:07 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-10-07 19:07:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
a ks.cfg showing the problem (6.99 KB, text/plain)
2009-07-28 08:37 EDT, stef
no flags Details

  None (edit)
Description stef 2009-06-18 04:30:36 EDT
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 10:16:20 EDT
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 18:55:18 EDT
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 08:28:03 EDT
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 08:37:55 EDT
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 08:38:31 EDT
Reopening the bug since not answering the right question
Comment 6 Chris Lumens 2009-07-28 08:52:30 EDT
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 09:02:16 EDT
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 09:22:13 EDT
(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 19:07:36 EDT
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.

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