Red Hat Bugzilla – Bug 191381
CDrom media unmounted before %post script gets run
Last modified: 2007-11-30 17:11:32 EST
Description of problem:
If you try to access /mnt/source in a %post script when installing from CDrom,
the media will already have been unmounted by the time %post is run... leading
Version-Release number of selected component (if applicable):
Put "mount" with no args in the %post script.
Steps to Reproduce:
1. Build a CD installer disk with "mount" in the %post script.
The output will not show /mnt/source being mounted.
It should be mounted until the system is ready to reboot.
Created attachment 129091 [details]
Patch to defer releasing filesystem (or filesystem image)
Still not clear to me why unmountCD() needs to be present in all methods, or
why there is so much duplication of functionality between filesDone (for the CD
install method, at least) and unmountCD().
Perhaps unmountCD() should be a private method of the CD installer that gets
called from the subclassed version of filesDone()?
Anyway, this patch simply calls filesDone() a lot later in the install process,
after postInstall() has been invoked.
Committed that fix and we'll see how well it works in the next anaconda build.
The duplication is due to how the repo stuff works between anacond and yum -
should be changing quite a bit before FC6. Note that you're only going to have
the last CD available here, so this is probably only most useful for NFS or DVD