Install of rpm packages in %post - script

David Tegelaar dtegelaar at egenera.com
Mon Apr 19 18:23:47 UTC 2004


Yes the suggestion in another email
that a Windows char may be in the ks
file is a good one.  Also I think you
may need the "-t" option to mount:

mount -t iso9660 /tmp/cdrom /mnt/source

You could try writing the output to a log
so if you get a failure maybe you can look
at the log:

mount -t iso9660 /tmp/cdrom /mnt/source >>/tmp/mount.log 2>&1

-dave
-----Original Message-----
From: kickstart-list-bounces at redhat.com
[mailto:kickstart-list-bounces at redhat.com]On Behalf Of Martin Siddall
Sent: Monday, April 19, 2004 1:42 PM
To: Discussion list about Kickstart
Subject: Re: Install of rpm packages in %post - script


Cheers , but i've been there allready. I echoed ls /mnt and various other
directories in the %post part of the config and quite correctly as Marco has
said anaconda umounts the cdrom and for some reason the /mnt/source
disappears. I have also tried creating other directories with the same
problem so I thorgh screw mkdir and tried to mount the cdrom on an existing
directory..... still no joy.

The main problem is the anaconda program when it reports an error ... its
incomplete and intermingled with its own debugging lines so i can't see what
it's moaning about.

The only thing I can think of is that the ks.cfg file has some wierd
character in it or the shell which anaconda uses is broken.

I have include my ks.cfg for your perusal. Any other suggestions would be
greatly appreciated.


Martin

ks.cfg

zerombr yes
clearpart --all --drives=hda
part /boot --fstype ext3 --size=100 --ondisk=hda
part / --fstype ext3 --size=1024 --grow --ondisk=hda
part swap --size=128 --grow --maxsize=256 --ondisk=hda
install
cdrom
lang en_US.UTF-8
langsupport --default en_GB.UTF-8 en_GB.UTF-8
keyboard uk
mouse genericwheelps/2 --device psaux
rootpw --iscrypted $1$PRwZ191B$qq1HZQJpK5gfpPhJw/967/
firewall --disabled
authconfig --enableshadow --enablemd5
timezone Europe/London
bootloader --location=mbr

%packages
@ network-server
@ web-server
@ dialup
@ sql-server
@ system-tools
@ british-support
@ ftp-server
@ development-tools
kernel
dhcp
net-snmp-utils
shapecfg
tftp-server
mysql-server
grub
mrtg
php-mysql
mod_auth_mysql
freeradius
php-odbc

%post --nochroot
mkdir -p /mnt/source
mount /tmp/cdrom /mnt/source
cp -f /mnt/source/custom.tar /mnt/sysimage/root


----- Original Message -----
From: "David Tegelaar" <dtegelaar at egenera.com>
To: <MSiddall at imaginativeit.co.uk>; "Discussion list about Kickstart"
<kickstart-list at redhat.com>
Sent: Monday, April 19, 2004 6:22 PM
Subject: RE: Install of rpm packages in %post - script


> That's pretty wierd.  Try leaving out the
> "mkdir -p /mnt/source" line (or telling
> it to mkdir a different directory name).
> I think the /mnt/source directory already
> exists anyway.  Maybe the ? char
> is an extra char at the end of the text or
> is somehow part of a question that gets
> asked if the directory already exists
> when you try to mkdir it.
>
> -dave
>
>
>
> -----Original Message-----
> From: kickstart-list-bounces at redhat.com
> [mailto:kickstart-list-bounces at redhat.com]On Behalf Of Martin Siddall
> Sent: Monday, April 19, 2004 11:08 AM
> To: 'Discussion list about Kickstart'
> Subject: RE: Install of rpm packages in %post - script
>
>
> I've been struggling with this for days and I still have problems with
> it. Running Fedora Core 1.
>
>
> When attempting to do mkdir -p  /mnt/source the script creates a
> /mnt/source? Dir (mnt/source + questionmark). I thought well ok and
> changed the copy command to cp /mnt/source?/custom.tar
> /mnt/sysimage/root
>
> Still no luck. Comes back with error message that is intermingled with
> the kickstart dialog and I can't work out what's happening and why.
>
> [Note the installation has been stripped down to one CD - could I have
> missed and essential RPM ??]
>
> Anyone have an idea
>
>
> Many thanks
>
> Martin
>
>
>
>
> -----Original Message-----
> From: kickstart-list-bounces at redhat.com
> [mailto:kickstart-list-bounces at redhat.com] On Behalf Of Marco Welter
> Sent: 19 April 2004 15:23
> To: Discussion list about Kickstart
> Subject: Re: Install of rpm packages in %post - script
>
> Hi,
>
> > %post --nochroot
> > # cdrom is not mounted during post so i mount it with the --nochroot
> option
> > mkdir -p /mnt/source
> > mount /tmp/cdrom /mnt/source
> >
> > # copy updates.conf from the cd to /tmp on the installed system
> > cp -f /mnt/source/RedHat/RPMS/updates.conf /mnt/sysimage/tmp
> thank you, no works ;-)
> >
> > %post
> > # creation of admin account - the rest of the kickstart can be
> performed
> > in normal %post mode
> > /usr/sbin/useradd -c 'Administrateur' -s /bin/false admin
> but not 100 %, when i have a "normal" %post after %post --nochroot whith
> rpm
> -ivh /root/xyz.rpm it do not work
>
> Bye
>
> Marco
> > ...
> >
> > hth
> >
> > pantz
>
> --
> Lx-System  GbR
>
> Tel.: 0700 LXSYSTEM
> info at lx-system.de
>
> Hauptgeschäftsstelle:
> Ensinger Strasse 19 - 89073 Ulm
> 0731 / 602 81 19
>
> Zweigniederlassung:
> Zur alten Zollbruecke 30 - 87527 Sonthofen
> Tel: 08321 / 67 42 43 - Fax: 08321 / 67 42 44
> E-Mail: mawe at lx-system.de
>
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>
>
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list at redhat.com
> https://www.redhat.com/mailman/listinfo/kickstart-list
>


_______________________________________________
Kickstart-list mailing list
Kickstart-list at redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list





More information about the Kickstart-list mailing list