SUMMARY : Jumpstart and Solaris 2.5

From: greevy_o@vptt.ch
Date: Mon Jan 29 1996 - 02:38:51 CST


Dear Sun-managers,

my original question was :

How do you automate the timezone/netmask query during auto-install if you are
not using NIS/NIS+?

Thanks to all who answered, in particular :

Jens Fischer jefi@kat.ina.de
Henry Katz hkatz@panix.com

I've tried these out and the problem is solved!!!

--------------------------------------------------------------------------------
Solution 1:
-----------

> For your information:
>
> I noticed the discussion about auto-install and automating the timezone/netma-k
> query on comp.unix.solaris. I don't run NIS, so can't completely satisfy
> the auto-install process unless I modify the CD-rom image (copied to disk,
> of course). Here's the (extremely minor) change I made to
> solaris_2_3/export/exec/kvm/sparc.sun4c.Solaris_2.3/sbin/sysconfig
>
> (a similar change needs to be made for each kernel architecture supported)
>
> ============================================================================
> *** /tmp/T0a003oP Thu May 12 11:16:55 1994
> --- sysconfig Wed May 11 20:11:23 1994
> ***************
> *** 45,50 ****
> --- 45,55 ----
> echo " rpcbind\c"
> /usr/sbin/rpcbind > /dev/console 2>&1
>
> + if [ -x /tmp/install_config/localconfig ]; then
> + echo " localconfig\c"
> + /tmp/install_config/localconfig > /dev/console 2>&1
> + fi
> +
> # Configure NIS or NIS+
> echo " sysidnis\c"
> /usr/sbin/sysidnis > /dev/console 2>&1
> ============================================================================
>
> localconfig looks like this:
>
> ============================================================================
> #!/bin/sh
> # localconfig
> # set up netmasks, timezone, and fix up .sysIDtool.state
> STATE=/tmp/root/etc/.sysIDtool.state
> echo 128.100.0.0 255.255.255.0 >/tmp/root/etc/inet/netmasks
> echo 'TZ=Canada/Eastern' >/tmp/root/etc/default/init
> ed $STATE >/dev/null <<end_of_edit
> /Network has subnets/s/0/1/
> /System previously configured/s/0/1
> w
> q
> end_of_edit
> ============================================================================
>
> Supplement for Solaris 2.5 (by Jens Fischer, fischjns@kat.ina.de)
>
> Since the mount of the install_config dir is done after sysconfig executes
> the lines recommended by John DiMarco I have moved the localconfig script to
>
> solaris_2_5/export/exec/kvm/sparc.Solaris_2.5/sbin/localconfig
>
> (which is /sbin/localconfig during installation) and changed the lines in
> sysconfig (which is in solaris_2_5/export/exec/kvm/sparc.Solaris_2.5/sbin, to-)
> to:
>
> #gettext " rpcbind"
> #/usr/sbin/rpcbind > /dev/console 2>&1
>
> + if [ -x /sbin/localconfig ]; then
> + echo " localconfig\c"
> + /sbin/localconfig > /dev/console 2>&1
> + fi
> +
> echo " sysidnis\c"
> /usr/sbin/sysidnis -y
--------------------------------------------------------------------------------
Solution 2:
-----------

you must modify the /sbin/startup script to get rid up the pesky sysidtool
suite.

Comment out the following sysidxxxx binaries in startup:
 
diff startup*
1c1
< #!/sbin/sh -x

---
> #!/sbin/sh
164c164
< #     /usr/sbin/sysidnet -l -y ${NO_MULTI}
---
>       /usr/sbin/sysidnet -l -y ${NO_MULTI}
181c181
< #     /usr/sbin/sysidconfig
---
>       /usr/sbin/sysidconfig
 
In sysconfig, comment out the entire if clause that prompts you for your
terminal type and hardcode it to an xterm. The supposition is that when
you're blasting the machines you're probably performing this over a terminal
server within a xterm:
 
#if [ -z "${TERM}" -a -z "${DISPLAY}" ]; then
#.
#.
#.
#fi
TERM=xterm
 
Then you need to ensure that your boot client has sufficient information
from the bootparams to know the ns info (read bootparams(4)) and understand
how to use the bpgetfile command to retrieve the bootparams over the net.
With this you can easily construct a postinstall script that sets the final
touches: updates netmasks, sets nsswitch.conf. Don't forget to remove
.UNCONFIGURED from /a/etc so that the machine will boot up without 
interruption. In order to set the domainname, I squeeze this information out
of the dmesg which you also set in the ns bootparams var.
 
It takes a couple of iterations to customize things but it works. Then 
you can get fancier and add all your other customizations to the postinstall
script



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:52 CDT