Bug 116291 - CD unmounts and dev removed before post install script finishes
Summary: CD unmounts and dev removed before post install script finishes
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-19 19:38 UTC by Micah Quinn
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-02-19 21:09:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Micah Quinn 2004-02-19 19:38:13 UTC
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 21:09:46 UTC
This has to be done to allow for sane CD ejecting.

Comment 2 Micah Quinn 2004-02-19 21:25:28 UTC
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 20:05:40 UTC
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.