Re: Problem with copying file from install CD to harddrive in %post

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

 



Pat wrote:
I would like to copy a file from the install CD to the
harddrive. The file is located in the / directory of
the install disc. (I extracted and reburned the image
so it would contain my custom files on the install
disc.)
BTW, the cdrom I'm using to install the OS is the
second cd drive in the system so it's location is at
/dev/hdb. Here's the section from my kickstart
config's %post which deals with copying the file:

/bin/mkdir -p /mnt/cdrom
/bin/mount /dev/hdb /mnt/cdrom
/bin/cp /mnt/cdrom/custom.tar.gz /root

After the install, that file is not found in my /root
directory or any directory on the harddrive for that
matter. The rest of the installation followed the
instructions from my kickstart file correctly except
for this.

BTW, if I manually do those commands above after the
installation (login as root, etc), the file does copy
over correctly.

Any clues on what I'm doing wrong? Thanks!


I'm not sure, but I suspect there might be issues related to the major/minor
device numbers being wrong in the chroot'd environment.  Maybe.

In any case, you could try:

%post --nochroot
cp /mnt/source/xyzzy /mnt/sysimage/foo/bar/

instead.

-Philip


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux