Bug 116291 - CD unmounts and dev removed before post install script finishes
CD unmounts and dev removed before post install script finishes
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-19 14:38 EST by Micah Quinn
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-02-19 16:09:46 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 Micah Quinn 2004-02-19 14:38:13 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031016

Description of problem:
I'm migrating some kickstart files over to Fedora and realized that
anaconda does things a bit differently with regard to post install
script.  The problem is that it umount's the cdrom drive before
running the post install script.  This makes access to any custom
files on the cd impossible unless the script remounts the drive.  The
problem (which was not present in RH8.0) with remounting the drive is
the device "/tmp/cdrom" is removed from the file system.

Coincidentally this does not happen if the install type is NFS.  NFS
installs seem to stay mounted through the post install script.

I've written a little shell script to mount the CD again, but in my
opinion, anaconda should not remove the device.  (Honestly I don't
think it should umount the drive until after the post install script)

Here's my workaround for anyone struggling with the same issue:

# Determine CD ROM device and re-create the mount
cdrom=`cat /proc/sys/dev/cdrom/info | grep "drive name:" | sed '/drive
name:\W*/s'`
echo "CD ROM device is $cdrom; making dev link..."
ln -s /tmp/cdrom /dev/$cdrom

mount /tmp/cdrom /mnt/source


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

How reproducible:
Always

Steps to Reproduce:
1.  Create a ks.cfg (kickstart) file with a post install script that
attempts to copy some file off the cdrom
2.  Attempt to install using the ks.cfg
3.  Examine the install.log on the newly installed computer and you
will notice errors trying to copy from "/mnt/source"
    

Actual Results:  Error:  No such file while copying

Expected Results:  Successful copy/untar/rpm install/etc.

Additional info:
Comment 1 Jeremy Katz 2004-02-19 16:09:46 EST
This has to be done to allow for sane CD ejecting.
Comment 2 Micah Quinn 2004-02-19 16:25:28 EST
The unmounting of the CD has to be done for sane ejecting, but does
the removal of the device file have to be done as well?  The problem
for anyone that wants to include extra files in the distro CD and
install them in the post installation script is that they have no way
of mounting the CD (simply, i.e. without my mentioned script) to get
the files off.

Just out of curiousity, what do you mean "sane" CD ejecting?  Surely
you don't have to remove "/tmp/cdrom" to be able to eject the CD? Why
not umount the CD, but leave the device file for us to re-mount if we
want to in post install?  If the CD doesn't eject becuase of something
we do in the post install script, so be it.
Comment 3 Micah Quinn 2004-02-20 15:05:40 EST
I'm forever getting sym link order wrong.  The script should be:

# Determine CD ROM device and re-create the mount
cdrom=`cat /proc/sys/dev/cdrom/info | grep "drive name:" | sed '/drive
name:\W*/s'`
echo "CD ROM device is $cdrom; making dev link..."
ln -s /dev/$cdrom /tmp/cdrom

mount /tmp/cdrom /mnt/source

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