copy files from CD to hard-drive
Florin Andrei
florin at andrei.myip.org
Sat Mar 26 20:44:27 UTC 2005
On Fri, 2005-03-25 at 08:54 -0500, Brian Long wrote:
> On Fri, 2005-03-25 at 03:00, Florin Andrei wrote:
> > I created a custom DVD installer, that also has a kickstart file. On the
> > custom DVD i also put some files that i want to copy to the installed
> > system after kickstart finishes up its job.
> >
> > The problem is, i can't seem to find a way to do that.
>
> %post --nochroot
>
> copy files from /mnt/cdrom/foo to /mnt/sysimage/foo
>
> %post
>
> run all your postinstall routines
Hm, even when placing the non-chrooted %post before the chrooted one i
still get error 256.
The problem seems to be that, at %post time, the installer CD/DVD is
already unmounted AND the directory /mnt/source has disappeared.
The solution was to do this:
%post --nochroot
mkdir -p /mnt/source
mount -o ro /tmp/cdrom /mnt/source
cp -a /mnt/source/foo /mnt/sysimage/bar
umount /tmp/cdrom
%post
blah
All this (mount/umount, mkdir) should be mentioned in the kickstart
HOWTO, it's not at all intuitive.
--
Florin Andrei
http://florin.myip.org/
More information about the Kickstart-list
mailing list