%post DHCP?

James Harrison jamesaharrisonuk at yahoo.co.uk
Thu Nov 18 19:27:52 UTC 2004


When you run Post-installation scripts outside of a chroot'd environment 

For some reason (maybe its anaconda) networking settings are reset...

>From my experience Ive had to do the following:

%post --interpreter /bin/bash
#start network for on system
/sbin/service network start
/sbin/service portmap start

#mount a network drive on machine and cd into directory
mkdir /mnt/network 
mount ??.??.??.??:/kickstart /mnt/network 
cd /mnt/network/config-sys 
..
..

Forget Anaconda once you run the Post-install script in a chroot'd
environment. The above is using your newly installed OS and starting it in
single mode.



James





--- Chris Mckenzie <Chris.McKenzie at entrust.com> wrote:

> Thanks Daniel.
> 
> My ks.cfg had...
> 
> network --device eth0 --bootproto dhcp
> nfs --server 10.4.146.47 --dir /var/entrust/RedHat/Enterprise3_u3
> 
> The OS install worked fine, but the %post mount with just the mount command
> failed to find the server as mentioned below.
> 
> I tried switching to static IP and it worked fine. The %post mount found the
> NFS server using the eth0 which was setup but the kickstart OS install.
> 
> I stuck the ifconfig in there to see what was going on with DHCP, the RedHat
> CDs were installed over NFS, so why can't I access the same NFS with a
> separate mount point?
> 
> My install environment is going to have a number of system kickstart'ing at
> the same time, I want to make sure they each have their own separate IP.
> 
> Any ideas?
> 
> Thanks!
> 
> - Chris
> 
> -----Original Message-----
> From: kickstart-list-bounces at redhat.com
> [mailto:kickstart-list-bounces at redhat.com] On Behalf Of Daniel Segall
> Sent: November 17, 2004 1:48 PM
> To: Discussion list about Kickstart
> Subject: Re: %post DHCP?
> 
> 
> You shouldn't need to obtain an IP in %post, unless it is a different
> netblock. It sounds like your NFS server is providing the IP, thus you
> should just need to mount the share.
> 
> mount -r -o nolock 10.4.146.47:/var/entrust/eewmc/7.5/image /mnt/entrust
> 
> -Dan
> 
> > Hi guys.
> >
> > Thanks for answering my previous post, I removed the -nochroot from 
> > %post and I was able to work some magic on the rest of the FS. My chvt 
> > 3 was in the script I was trying to copy, I moved it to the kickstart 
> > itself.
> >
> > Now, my apparent last problem is I can't get DHCP working from %post.
> >
> > The kickstart install was from the same NFS server that I want to copy 
> > my script from to the local system. The NFS install proceed fine, but 
> > %post isn't able to mount a new NFS point.
> >
> > I've tried...
> >
> > %post
> > ifconfig
> > service portmap start
> > mkdir /mnt/entrust
> > mount 10.4.146.47:/var/entrust/eewmc/7.5/image /mnt/entrust cp 
> > /mnt/entrust/init/runonce.bsh /tmp/runonce.bsh
> >
> > ...the TTY reports that eth0 doesn't have an IP address yet. It's the 
> > regular ifconfig output, but with the IP/Mask line missing. Naturally 
> > the mount isn't going to succeed if it can't reach the server, so that 
> > error is also reported.
> >
> > Are there any generally kickstart issues with using DHCP? I also tried 
> > the following in my %post without luck.
> >
> > %post
> > echo "check_link_down() {" >> /etc/sysconfig/network-scripts/ifcfg-eth0
> > echo "     return 1;"      >> /etc/sysconfig/network-scripts/ifcfg-eth0
> > echo "}"                   >> /etc/sysconfig/network-scripts/ifcfg-eth0
> > /etc/sysconfig/network-scripts/ifup eth0
> > ifconfig
> > service portmap start
> > mkdir /mnt/entrust
> > mount 10.4.146.47:/var/entrust/eewmc/7.5/image /mnt/entrust cp 
> > /mnt/entrust/init/runonce.bsh /tmp/runonce.bsh
> >
> > This time when ifup runs, I get...
> >
> > Determining IP information for eth0... Failed.
> >
> >
> > Any ideas?
> >
> > Thanks!!!
> >
> > - Chris
> >
> > _______________________________________________
> > 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
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the Kickstart-list mailing list