Kickstart frustrations take 3, copying files from the source CD

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Sat Jun 14 20:23:56 UTC 2008


Fraser Campbell wrote:
> On Saturday 14 June 2008 07:20:51 Madison Kelly wrote:
> 
>>> I think nochroot option to post will help but I haven't tried yet ... you
>>> should be able to chroot within your post script for things that need it.
>> As I understand, the '--nochroot' option changes where the destination
>> files are. The real location of the root directory is '/mnt/sysimage',
>> but when under the chroot environment that %post runs under, it looks
>> like it's actually on '/', so install scripts and what not find files
>> where they expect them to be.
>>
>> My problem is figuring out how to get files off the DVD during the %post
>> section.
> 
> This is what I was thinking ...
> 
> Put your post script on the CD along with the rest of the content you want to 
> copy.  Something like this (sorry I'm hazy on the paths):
> 
>   %post --nochroot
>     cp /mnt/sysimage/whole_bunch_of_files.tar.gz /mnt/target/tmp
>     cp /mnt/sysimage/post.sh /mnt/target/tmp
> 
>    # Chroot into /mnt/sysimage and run post install script
>     chroot /mnt/sysimage /tmp/post.sh
> 
> This way post.sh will run with / set to your real disk and you will find 
> whole_bunch_of_files.tar.gz under your real /tmp from where you can do 
> anything you like.
> 

The problem is getting the files off the DVD in the first place.

While the install is running, I can go to the shell and see the 
directory in '/mnt/source/foo', but when I try to copy from there in 
%post, it's gone. 'chroot' doesn't effect this, does it?

Madi
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list