[opensuse-autoinstall] Deriving hostname for .xml file from PXE client & setting values in /etc/sysctl.conf
Dear all, Question 1: I am trying to construct a generic autoinst.xml file for several clients. The template I am using is the one generated from one server, an HP Blade, found in /root/autoinst.xml. I intend to use this from within a file called this, (the MAC address is made up) # cat /tftpboot/pxelinux.cfg/00-00-00-00-00-00-01 default SLES11 # install SLES11 - Dummy entry for generic profile label SLES11 kernel vmlinuz append initrd=initrd ramdisk_size=65536 install=nfs://10.205.8.145/export/sles11-dvd1-i586 hostip=10.205.8.123/24 autoyast=nfs://10.205.8.145/export/generica-sles11_i586-autoinst.xml netdevice=eth0 textmode=1 insmod=bnx2 The autogenerated file contains host specific entries like, <host> <hosts config:type="list"> <hosts_entry> <host_address>10.254.66.90</host_address> <names config:type="list"> <name>newHPserver newHPserver</name> </names> </hosts_entry> <hosts_entry> <host_address>127.0.0.1</host_address> <names config:type="list"> <name>localhost</name> </names> </hosts_entry> <hosts_entry> <host_address>127.0.0.2</host_address> <names config:type="list"> <name>newHPserver.it.lan newHPserver</name> </names> I would like to have this xml inherit the hostname, IP address from the client that called it. Question 2: In most cases these servers will run Oracle. Therefore I would like to some how add values for shmmni shmmax and so on for Oracle. I expect to have a separate .xml file somewhere that would set these values. What is the way to so this? I thought that I could use some xml like this but I don;'t know if this is the preferred way in the SUSE world? <script>echo "kernel.shmall = 2097152" >>/etc/sysctl.conf</script> How would I instruct autoyast to call this file? Regards, S. -- Simon Loewenthal/Tele2 GSM: +31 6 2000 5427 [ -d . ] || echo "Oh!" ******** IMPORTANT NOTICE ******** This e-mail (including any attachments) may contain information that is confidential or otherwise protected from disclosure and it is intended only for the addressees. If you are not the intended recipient, please note that any copying, distribution or other use of information contained in this e-mail (and its attachments) is not allowed. If you have received this e-mail in error, kindly notify us immediately by telephone or e-mail and delete the message (including any attachments) from your system. Please note that e-mail messages may contain computer viruses or other defects, may not be accurately replicated on other systems, or may be subject of unauthorized interception or other interference without the knowledge of sender or recipient. Tele2 only send and receive e-mails on the basis that Tele2 is not responsible for any such computer viruses, corruption or other interference or any consequences thereof. -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Tue, Sep 01, 2009 at 08:18:00AM -0700, Simon Loewenthal/NL/Tele2 wrote:
I would like to have this xml inherit the hostname, IP address from the client that called it.
You can basically re-write the entire profile in the pre-install scripts if you want, and could do what you're looking to do (and a lot more) there. Just output a /tmp/profile/modified.xml file and it'll be re-read after the pre-install scripts are run. I do several things using comment tags that are replaced by a pre-install script that replaces them based on common names.. e.g. compute_single.xml: <comment>SWAP_DEFAULTS</comment> scripts.xml: <comment>NET_DEFAULTS</comment> scripts.xml: <comment>NIS_DEFAULTS</comment> scripts.xml: <comment>NTP_DEFAULTS</comment> scripts.xml: <comment>CLK_DEFAULT</comment> scripts.xml: <comment>ADDON_DEFAULTS</comment> scripts.xml: <comment>ROOTWORD_DEFAULT</comment> scripts.xml: <comment>TZ_DEFAULT</comment> The script looks for any VALUE_DEFAULTS then in a case statement runs the right subroutine to replace the comment tags with xml for the profile.. the above do things like dynamically set the swap space (different admins in our offices wanted to be able to set different amounts of swap), outputs the entire <networking> section (which is what you're mostly looking for), NIS info (mostly deprecated), etc. These were originally put in place to allow a shared set of identical files with one configuration file per site read in to put in site specific values without super complicated rules.xml setups, which have their own short-comings.
<script>echo "kernel.shmall = 2097152" >>/etc/sysctl.conf</script>
How would I instruct autoyast to call this file?
You can also do this type of thing in either the chroot or post-install scripts. The ways to do pre/chroot/post scripts are pretty well documented in the autoyast docs. -- Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com "Only wimps use tape backup: _real_ men just upload their important stuff on ftp, and let the rest of the world mirror it ;)" (Linus Torvalds, about his failing hard drive on linux.cs.helsinki.fi) -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Dear all, I set-up the server, and it passes out the DHCP lease as shown below. However, when the client tries to contact the TFTP server it attempts to do so on 0.0.0.0 instead of t2nl-app205.versatel.com. Below are the files and part of a tcpdump from the session detailing some of the TFTP communication. Somethin I have missed but what it is I do not know. Does anyone else know? Best regards, S. 14:02:42.960262 IP t2nl-app205.versatel.com.32799 > 10.205.8.254.acp-port: UDP, length 1460 14:02:42.960815 IP 10.205.8.254.acp-port > t2nl-app205.versatel.com.32799: UDP, length 4 14:02:42.960836 IP t2nl-app205.versatel.com.32799 > 10.205.8.254.acp-port: UDP, length 48 14:02:42.961127 IP 10.205.8.254.acp-port > t2nl-app205.versatel.com.32799: UDP, length 4 14:02:43.006899 IP 10.205.8.254.57089 > *0.0.0.0*.tftp: 63 RRQ "pxelinux.cfg/01-00-23-7d-a8-0a-54" octet tsize 0 blksize 1440 14:02:43.713904 IP 10.205.8.254.57089 > *0.0.0.0*.tftp: 63 RRQ "pxelinux.cfg/01-00-23-7d-a8-0a-54" octet tsize 0 blksize 1440 14:02:45.197284 IP 10.205.8.254.57089 > *0.0.0.0*.tftp: 63 RRQ "pxelinux.cfg/01-00-23-7d-a8-0a-54" octet tsize 0 blksize 1440 14:02:47.948824 arp who-has 10.205.8.254 tell t2nl-app205.versatel.com 14:02:47.949072 arp reply 10.205.8.254 is-at 00:23:7d:a8:0a:54 (oui Unknown) 14:02:48.118658 IP 10.205.8.254.57089 > 0.0.0.0.tftp: 63 RRQ "pxelinux.cfg/01-00-23-7d-a8-0a-54" octet tsize 0 blksize 1440 14:02:53.947311 IP 10.205.8.254.57089 > 0.0.0.0.tftp: 63 RRQ "pxelinux.cfg/01-00-23-7d-a8-0a-54" octet tsize 0 blksize 1440 14:03:05.594568 IP 10.205.8.254.57089 > 0.0.0.0.tftp: 63 RRQ "pxelinux.cfg/01-00-23-7d-a8-0a-54" octet tsize 0 blksize 1440 14:03:28.879831 IP 10.205.8.254.57090 > 0.0.0.0.tftp: 51 RRQ "pxelinux.cfg/0ACD08FE" octet tsize 0 blksize 1440 14:03:29.620095 IP 10.205.8.254.57090 > 0.0.0.0.tftp: 51 RRQ "pxelinux.cfg/0ACD08FE" octet tsize 0 blksize 1440 # cat /etc/xinetd.d/tftp # default: off # description: tftp service is provided primarily for booting or when a \ # router need an upgrade. Most sites run this only on machines acting as # "boot servers". service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = no } # find /tftpboot/ -ls 185858 4 drwxr-xr-x 5 root root 4096 Sep 3 17:23 /tftpboot/ 185859 16 -rw-r--r-- 1 root root 13148 Dec 23 2008 /tftpboot/pxelinux.0 185860 4 drwxr-xr-x 2 root root 4096 Sep 3 17:15 /tftpboot/pxelinux.cfg 185868 4 -rw-r--r-- 1 root root 291 Sep 3 16:34 /tftpboot/pxelinux.cfg/01-00-1b-78-76-36-02 185872 0 lrwxrwxrwx 1 root root 20 Sep 3 15:41 /tftpboot/pxelinux.cfg/0ACD08FE -> 01-00-23-7d-a8-0a-54 185873 4 -rw-r--r-- 1 root root 438 Sep 3 16:34 /tftpboot/pxelinux.cfg/default 185875 4 -rw-r--r-- 1 root root 333 Sep 3 17:15 /tftpboot/pxelinux.cfg/01-00-23-7d-a8-0a-54 185861 136 -rw-r--r-- 1 root root 135168 Dec 24 2008 /tftpboot/message 185863 0 lrwxrwxrwx 1 root root 23 Dec 24 2008 /tftpboot/initrd -> initrd-2.4.21-32.EL.img 185865 0 lrwxrwxrwx 1 root root 20 Dec 24 2008 /tftpboot/vmlinuz -> vmlinuz-2.4.21-32.EL 185864 4 drwxr-xr-x 2 root root 4096 Sep 3 13:39 /tftpboot/sles11_i586 185867 2404 -r--r--r-- 1 root root 2455600 Aug 31 17:07 /tftpboot/sles11_i586/linux 185870 20852 -r--r--r-- 1 root root 21319984 Aug 31 17:07 /tftpboot/sles11_i586/initrd 185862 1228 -rw-r--r-- 1 root root 1252573 Dec 24 2008 /tftpboot/vmlinuz-2.4.21-32.EL 185866 520 -rw-r--r-- 1 root root 528338 Dec 24 2008 /tftpboot/initrd-2.4.21-32.EL.img 185871 4 drwxr-xr-x 2 root root 4096 Sep 3 13:40 /tftpboot/sles11_x86 185869 4 -rw-r--r-- 1 root root 333 Sep 3 17:23 /tftpboot/01-00-23-7d-a8-0a-54 # cat /tftpboot/pxelinux.cfg/01-00-23-7d-a8-0a-54 default SLES11 # install SLES11 - Dummy entry for generic profile label SLES11 kernel /sles11_i586/linux append initrd=initrd ramdisk_size=65536 install=nfs://10.205.8.145/export/sles11-dvd1-i586 hostip=10.205.8.254/24 autoyast=nfs://10.205.8.145/export/generica-sles11_i586-autoinst.xml netdevice=eth0 textmode=1 insmod=bnx2 -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (2)
-
Mike Marion
-
Simon Loewenthal/NL/Tele2