RE: how to copy file at post?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks, I caught my mistake after I set out this email to the list :(  Thanks a million for the help

Dwc

From: Thomas Baumann [mailto:tom@xxxxxxx] 
Sent: Wednesday, August 06, 2003 1:34 AM
To: Chan, Dominic
Cc: anaconda-devel-list@xxxxxxxxxx
Subject: RE: how to copy file at post?

You missed that /dev/cdrom does not exist.
If you look at /tmp you find nodes for cdrom,
that's why I told you in my ks.cfg (a few messages before)
to perform a 
mkdir -p /mnt/yoursource
mount /tmp/cdrom /mnt/yoursource
cp /mnt/yoursource/yourfile /mnt/sysimage/tmp/yourfile
umount /tmp/cdrom

The same is for your fd0.
You have to create a node for fd0  (mknod /tmp/fd0 2 0)
and then you can mount wahtever you want.

Thomas.

Zitat von "Chan, Dominic" <DWC@xxxxxxxxxxxx>:

> I think I am going about this all wrong.  It looks like the CD doesn't get
> eject by anaconda until the %post section is complete finish.  However, it
> may dismount the CD before %post begin.  Here is a copy of my %post section. 
> I try to mount the CD from both chroot and non-chroot environment with not
> success (but the floppy mount fine!)  What am I miss?
> 
> %post
> /usr/sbin/useradd test
> chfn -f 'Test User' test
> /usr/sbin/usermod -p '$1$þAìÑ0Üòq$nUstYoiwgaCXoQxre7cI1.' test
> cd /mnt
> mkdir cdrom2
> mount /dev/cdrom /mnt/cdrom2
> cp /mnt/cdrom2/ks.cfg /mnt/sysimage/root/
> umount /dev/cdrom2
> 
> %post --nochroot
> cd /mnt
> mkdir floppy
> mkdir cdrom
> mount /dev/fd0 /mnt/floppy
> mount /dev/cdrom /mnt/source
> cp /mnt/floppy/splash.lss /mnt/sysimage/root/
> cp /mnt/source/EULA /mnt/sysimage/root/
> 
> Here is the one of the console output
> * Running kickstart %post scripts(s)
> Changing finger information for test.
> Finger information changed
> Mount: special device /dev/cdrom does not exist
> Cp: cannot stat '/mnt/cdrom2/ks.cfg': no such file or directory
> Umount: /dev/cdrom2: not found
> * WARNING - Error code 256 encountered running a kickstart %pre%post script
> mount: Mounting /dev/cdrom on /mnt/source failed: No such file or directory
> cp: cannot stat '/mnt'source/EULA': So such file or directory
> * WARNING - Error code 256 encountered running a kickstart %pre%post script
> * All kickstart %post scripts(s) have been run
> * moving (1) to step methodcomplete
> * ejecting CD
> * moving (1) to step complete
> 
>  dwc
> 
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
> 
> 


-- 
Thomas Baumann // Postfach 110115 // D-64216 Darmstadt // <tom@xxxxxxx>




[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux