PDA

View Full Version : Fedora 7 and kickstart (problem)



pawellt
22nd June 2008, 08:22 PM
Hi,

I have Fedora 7. I prepared customized iso with my kickstart file.
On iso, in Server catalog I have some RPM packages.
In %post section I want to give command to anaconda - to install
this packages. In ks.cfg I have:


%post --interpreter=/bin/bash

/sbin/chkconfig --level 345 httpd on
cd /mnt/source/Server
rpm -Uvh some_packages.rpm

The problem is that anaconda while installation dont want to install
some_packages.rpm :(
Maybe command "cd /mnt/source/Server" is wrong? How in other way
can I access catalog Server on my DVD?

Last question. How force anaconda (in kickstart file) to enable
network configuration during installation? In my ks.cfg
I have no command "network" - however during installation there is
no question about network configuration.....

Thanks for help,
Pawel

Bigdumbman
23rd June 2008, 07:10 PM
when i want to access the installation dvd through kickstart i use this method:

%post --nochroot
mkdir -p /mnt/source
mount -o ro /tmp/cdrom /mnt/source
mkdir -p /mnt/sysimage/tmp/RPMS

cp /mnt/source/RPMS/* /mnt/sysimage/tmp/RPMS/
umount /tmp/cdrom

%post
rpm -U /tmp/RPMS/<rpm name(s)>

I'm not sure if this is the best way in the world to go, but I needed the --nochroot to be able to access the dvd and then you need another %post section to be chrotted into your sysimage to be able to use commands like rpm.



As far as the networking goes kickstart will not ask you to configure the network if you don't include it in the kickstart file because network is not required to build a machine. You can use the network directive like the following to hard-code some things:

network --device eth0 --bootproto static --ip XXX.XXX.XXX.XXX --netmask 255.255.255.0 --gateway XXX.XXX.XXX.XXX --nameserver XXX.XXX.XXX.XXX --hostname somename.mydomain

Jman
25th June 2008, 06:37 PM
Sorry, F7 was just end of lifed. You will want at least F8.

scottro
25th June 2008, 06:52 PM
A line like this in the ks.cfg, under the keyboard and xconfig lines.



network --device eth0 --bootproto static --ip 192.168.1.20 --netmask 255.255.0.0 --gateway 192.168.1.1 --nameserver 192.168.1.1 --hostname newserver.example.com