Re: Kickstart problems with %post not executing && network problems

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

 



The main problem with %post not executing is using a Windows text editor to edit the kickstart file.. It adds an extra CR (or is it LF) to the file and the kickstart interpretor seems to ignore those lines. I had the same problem before, just make sure you edit the file in Linux or use a Windows editor that doesn't do this (notepad does).

James

Nick Bernstein wrote:
First off, I have no idea why this is giving me so much trouble -- it seems pretty straight forward from what I've read. This is my first time using kickstart and I've encountered two main problems that I'm hoping you might be able to help me with. I apologize in advance if either of these are problems that have been discussed before, but search page that red-hat provides for the mailing list seems to be broken and would not return any results.

1. a) Kickstart has an extremely hard time getting an address. When trying to use dhcp (prefered) to obtain and address I have a 1 out of 9 rate of success. From what I 've seen come up on google this is a reoccuring problem.

<http://groups.google.com/groups?hl=en&lr=&ie=ISO-8859-1&q=kickstart+dhcp+problem&sa=N&tab=wg>

b) I tried to resolve the problems of using DHCP with specifying an address in the ks.cfg file using: "network --bootproto static --ip 192.168.0.250 --netmask 255.255.255.0 --gateway 192.168.0.1 --nameserver 192.168.0.11" making sure that it was all on the same line. I also used: "network --static --ip 192.168.0.250 --netmask 255.255.255.0 --gateway 192.168.0.1 --nameserver 192.168.0.11" once as I saw it in a kickstart tutorial I found on google. I didn's use them together, and I assume the 1st is right, as that is what is listed in the manual. Specifying the address staticly did not work. Anaconda would then prompt me for an address and I would have to key it in.

2. My main problem is that %post does not work. at all. It won't even echo to a file. This is really inconvenient, as %post is really the main reason I want to use kickstart. I understand that post runs in a chrooted jail and added "%post --nochroot" with no success. At this point all kickstart seems to be doing is the actual software installation.

I've included my ks.cgf below. If anyone could help me with this I would be eternally gratefull. ...ok not eternally but a good while anyway.


THANKS!!
Nick

--------------------< KS.CFG >-------------------------------
# Kickstart file automatically generated by anaconda.
# ks.cfg
install
lang en_US
network --static --ip 198.168.210.250 --netmask 255.255.255.0 --gateway 198.168.210.1 --nameserver 198.168.210.12 network
langsupport --default en_US.iso885915 en_US.iso885915
keyboard us
mouse msintellips/2 --device psaux
xconfig --card "ATI Mach64" --videoram 8192 --hsync 31.5-48.5 --vsync 50-70 --resolution 1024x768 --depth 32
rootpw --iscrypted $1$CªÇTÑW2A$vgJP8Y3jcdap4NKyZ/tY./
firewall --disabled
authconfig --enableshadow --enablesmbauth --smbservers officesrv --smbworkgroup docmagic
timezone America/Los_Angeles
nfs --server=da.docmagic.com --dir=/u2/install/7.3/
bootloader
clearpart --linux
part /boot --fstype ext3 --size=50 --ondisk=cciss/c0d0
part / --fstype ext3 --size=50000 --ondisk=cciss/c0d0
part /home --fstype ext3 --size=5000 --ondisk=cciss/c0d0
part /u --fstype reiserfs --size=70000 --ondisk=cciss/c0d0
part /u2 --fstype ext3 --size 12500 --ondisk=cciss/c0d0
part swap --size=1024 --ondisk=cciss/c0d0

%packages
@ Printing Support
@ Classic X Window System
@ X Window System
@ GNOME
@ Sound and Multimedia Support
@ Network Support
@ Messaging and Web Tools
@ NFS File Server
@ Windows File Server
@ Network Managed Workstation
@ Utilities
@ Software Development
@ Kernel Development

<SNIP>

%post
# SET UP THE HOSTNAME
#####################################################################
echo NETWORKING=yes >/etc/sysconfig/network
echo HOSTNAME=dsi2.docmagic.com >> /etc/sysconfig/network

# PORTMAP HAS A HISTORY OF BEING UNSCURE. LETS KEEP IT OFF BY DEFAULT
#####################################################################
/bin/rm /etc/rc.d/rc5.d/S13portmap

# GIVE da A PLACE TO LIVE AND MOUNT IT
#####################################################################
/bin/mkdir /mnt/da_nfs
/bin/mount 192.168.210.12:/u2 /mnt/da_nfs

# COPY OVER CONFIG FILES
#####################################################################
/bin/cp -f /mnt/da_nfs/install/ks/skel/ifcfg-eth0 /ets/sysconfig/network-scripts/ifcfg-eth0
/bin/cp -f /mnt/da_nfs/install/ks/skel/profile /etc/profile
/bin/cp -f /mnt/da_nfs/install/ks/skel/bashrc /etc/bashrc
/bin/cp -f /mnt/da_nfs/install/ks/skel/xinetd.conf /etc/xinetd.conf
/bin/cp -f /mnt/da_nfs/install/ks/skel/xinetd.d/* /etc/xinetd.d/
/bin/cp -f /mnt/da_nfs/install/ks/skel/named.conf /etc/named.conf
/bin/cp -f /mnt/da_nfs/install/ks/skel/S55named /etc/rc.d/rc5.d/

# MAKE A LINK TO SATISFY AN OLD DEPENDS
######################################################################
/bin/ln -s /usr/lib/libncurses.so.5 /usr/lib/libncurses.so.4

# INSTALLS THE COMPAQ RPMS FOR SNMP ETC.
######################################################################
rpm -Uvh /mnt/da_nfs/RPMS/compaq/*.rpm
rpm -Uvh /mnt/da_nfs/software/RPMS/jdk-1.3.1_06.i586.rpm


--------------------< KS.CFG >-------------------------------



_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/kickstart-list






[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