RE: Unable to use nfs in %post

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

 



Everything works like a charm when using vty 2 and issuing the command manually however I’m still not able to get it working from my Kickstart profile

 

Here is the %post section from my profile.ks

 

%post

/usr/sbin/ntpdate -su pool.ntp.org

 

echo "Turning off some packages"

/sbin/chkconfig --level 0123456 apmd off

/sbin/chkconfig --level 0123456 atd off

/sbin/chkconfig --level 0123456 sendmail off

/sbin/chkconfig --level 0123456 lpd off

/sbin/chkconfig --level 0123456 xfs off

/sbin/chkconfig --level 0123456 gpm off

/sbin/chkconfig --level 0123456 wine off

/sbin/chkconfig --level 0123456 cups off

/sbin/chkconfig --level 0123456 ntpd off

/sbin/chkconfig --level 0123456 nscd off

/sbin/chkconfig --level 0123456 sendmail off

/sbin/chkconfig --level 0123456 iptables off

/sbin/chkconfig --level 0123456 ip6tables off

 

perl -pi.bak -e 's/#(PermitRootLogin\s+)yes/\1 no/i' /etc/ssh/sshd_config

 

cat << EOF > /etc/sysctl.conf

kernel.core_uses_pid = 1

kernel.msgmax = 65536

kernel.msgmnb = 65536

kernel.shmall = 4294967296

kernel.shmmax = 68719476736

net.core.netdev_max_backlog = 3000

net.core.rmem_default = 65536

net.core.rmem_max = 8388608

net.core.wmem_default = 65536

net.core.wmem_max = 8388608

net.ipv4.conf.default.rp_filter = 1

net.ipv4.ip_forward = 0

net.ipv4.route.flush = 1

net.ipv4.tcp_mem = 8388608 8388608 8388608

net.ipv4.tcp_moderate_rcvbuf = 1

net.ipv4.tcp_no_metrics_save =1

net.ipv4.tcp_syncookies = 1

net.ipv4.tcp_wmem = 4096 65536 8388608

EOF

 

$yum_config_stanza

$kickstart_done

 

cat << EOF > /etc/auto.master

/misc   /etc/auto.misc

/home   /etc/auto.home

/net    -hosts

+auto.master

EOF

 

################################ This refuses to work what could be wrong?

echo "chrooting /mnt/sysimage" <## I never get this message

chroot /mnt/sysimage

echo "mounting nfsfiler:/mount/unix to /a"

mkdir /a

/bin/mount -t nfs -o nolock,udp 192.168.149.211:/mount/unix /a

sleep 15

/usr/bin/perl /a/scripts/motd.pl > /etc/motd

(cd /etc; tar xvf /a/packages/ldap_krb.tar)

 

yum update -y

 

 

From: kickstart-list-bounces@xxxxxxxxxx [mailto:kickstart-list-bounces@xxxxxxxxxx] On Behalf Of Kaj Niemi
Sent: Monday, March 10, 2008 2:47 PM
To: Discussion list about Kickstart
Subject: Re: Unable to use nfs in %post

 

Hi,

 

 

You might want to put a very long sleep after the commands and either look at what happened from the command line (vty 2) or in your %post just put a practically infinite sleep, jump to vty 2, chroot /mnt/sysimage and run the commands by hand to see what it bombs on. Good luck :)

 

 

On Mar 10, 2008, at 20:06, Rodrick Brown wrote:



I’m unable to get the following lines to work in my Kickstart profile I’m not sure what I could be doing

Here is my configuration:

 

%post

# run custom scripts

mkdir /a

/bin/mount -t nfs 192.168.149.211:/mount/unix /a

sleep 3

[[ -f /a/scripts/motd.pl ]] && /usr/bin/perl /a/scripts/motd.pl > /etc/motd

 

# needed to connect to AD domain

(cd /etc; tar xvf /a/packages/ldap_krbsettings.tar)

 

---

Rodrick R. Brown

Ballista Securities LLC

120 Wall St. Suite 2400

C: 347 702 0012 | O: 646 307 4709

 

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

 

 

 

HTH

 

Kaj

-- 

Kaj J. Niemi

+358 45 63 12000




 

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.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