Olivier BONHOMME wrote:
Kiyoaki Matsugae a écrit :
Olivier,
/tmp/cdrom is not in the chrooted environment ( e.g.
/mnt/sysimage/tmp/cdrom )
so you must run your post install script in a non chrooted environment
Kiyo
Hello,
Thank you for your answer.
The problem is that I am not in the chrooted environment.
Here is an extract for my ks.cfg
%post --nochroot
{
# Post installation script
# Copy distribution disc
mkdir -p /mnt/cdrom
mount /tmp/cdrom /mnt/cdrom
Then if I open a shell from the anaconda installer and go to the /tmp
directory, I have not the cdrom block device
Here is mine, it works.
%post --nochroot
rpm --root /mnt/sysimage --import /tmp/isomedia/RPM-GPG-KEY-fedora
rpm --root /mnt/sysimage --import /tmp/isomedia/RPM-GPG-KEY-fedora-extras
Notice the name of the mountpoint ...
The way I found out how it was mounting stuff was to put in a df on a
test run, ie:
%post --nochroot
env > /mnt/sysimage/tmp/stuff.out
df -h >> /mnt/sysimage/tmp/stuff.out
Then at the end of the install I could examine the file, or wait and
review it upon first boot.
Its possible that a CDROM based install has a different moint point,
this example is from an installable USB key method that I am using for a
production method at work.
My requirements (currently) are to automate installs for devices with no
network and no CDROM device.
But the above method for discovering what anaconda is doing: environment
variables, and moint points, works and is useful for alot of things.
Good luck!