Newbie problem with kickstart post section
Neerad Niksun
neeradm at in.niksun.com
Tue May 23 17:25:06 UTC 2006
Hey! , nothing seems wrong with your env ;)
This is the way is it suppose to wrok.
This is how you should understand.
All the partitioning/installation and stuff you did while installation went
into /mnt/sysimage. This does not come into effect until you reboot the
system.
mean while you have a ristricted env to do some common stuff while
/mnt/sysimage just act as a normal directory.
Okay so if you wanna make changes to something , those should go into
/mnt/sysimage ... respective files.
Let me give you an example.
I needed to create a user in my post section. So this is what i did.
cp -f /mnt/sysimage/etc/passwd /etc/passwd
cp -f /mnt/sysimage/etc/group /etc/group
cp -f /mnt/sysimage/etc/shadow /etc/shadow
/mnt/sysimage/usr/sbin/useradd <user_name> -d <usr_home_path> -s
/bin/bash -g <gorup> -G <group_member>, <group_member>.....
cp -f /etc/passwd /mnt/sysimage/etc/passwd
cp -f /etc/group /mnt/sysimage/etc/group
cp -f /etc/shadow /mnt/sysimage/etc/shadow
Also if you want to install packages there are two ways.
1) Include it in comps.xml and hdlist
2) In post section as described under.
mkdir /tmp/cd
mount /tmp/cdrom /tmp/cd
/mnt/sysimage/bin/rpm -i /tmp/cdrom /tmp/cd/<your_package_name>
Hope this helps.
Neerad Mittal
Lead Software Engineer
----- Original Message -----
From: "Arnar Þórarinsson" <art at caa.is>
To: <kickstart-list at redhat.com>
Sent: Monday, May 22, 2006 3:46 AM
Subject: Newbie problem with kickstart post section
> Hi
> I'm having a hard time getting the %post section to do what I want to
> do, like turning services off and installing RPMs and fonts.
>
> chkconfig is not found unless I use /mnt/sysimage/sbin/chkconfig and
> then it can't find /etc/init.d
>
> rpm -qa gives a blank output, like no rpms are installed.
>
> I'm guessing that theres something wrong with my environment ;)
>
> post section runs as :
> %post --nochroot --interpreter=/bin/bash --log=/mnt/sysimage/root/post-
> install.log
>
> /sbin/chkconfig --level 345 telnet off
> /mnt/sysimage/sbin/chkconfig --level 345 telnet off
>
>
> System in RHEL WS 4.3
>
> what am I doing wrong here ????
>
> Regards.
>
> --
> --
> Regards
> Arnar Thorarinsson
>
> Software Programmer / System Administrator
> Systems Department, Air Traffic Services
> Phone : +354 569 4289
> ------------------------------------------
> Icelandic Civil Aviation Administration
> Reykjavik Airport
> IS 121 Reykjavik
> Iceland
> http://www.caa.is
> ------------------------------------------
>
>
> Thessi tolvupostur og vidhengi hans geta innihaldid
> trunadarupplysingar og er eingongu aetladur theim sem hann er
> stiladur a.
> Oheimil medferd tolvuposts thessa og vidhengja hans getur vardad
> skadabota- og refsiabyrgd samkvaemt logum um fjarskipti. Efni
> tolvupostsins og vidhengja er a abyrgd sendanda ef thad tengist
> ekki starfsemi Flugmalastjornar Islands. Ef Thu ert ekki skradur
> mottakandi og hefur fengid skeytid vegna mistaka, vinsamlegast
> hafdu strax samband vid sendanda.
>
> ------------
>
>
> This e-mail and its attachments is intended only for the person or
> entity to which it is addressed and may contain confidential
> and/or privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other than
> the intended recipient is prohibited.
> If you received this in error, please contact the sender and
> delete the material from any computer.
>
>
>
More information about the Kickstart-list
mailing list