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:
This has to be done to allow for sane CD ejecting.
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.
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