Hi Mannagers.
Thanks to:
Brad Young <bbyoung@amoco.com>
amick@erim.org (Richard Amick)
The most accurate answer came from
gary@ranchogrande.mce.com
ORIGINAL MAIL:
I want to make a floppy or a set of floppies in
order to boot some sun4c ( IPC ),partitioning its
hard disk and install miniroot; then I want to
install SunOS 4.1.3_u1 from an exported CD ROM.
Any suggestions ?
THE ANSWER:
gary@ranchogrande.mce.com wrote:
> ________________________________________________________________________
>
> HOW TO CONFIGURE Solaris 2.x to jumpstart SunOS_4.1.4
> =====================================================
>
> WRITTEN 02/24/95 Robert Kohler (robert.kohler@uprc.com)
> UPDATED 06/20/95 Robert Kohler (robert.kohler@uprc.com)
>
> Purpose: I have searched for a way to install SunOS_4.1.4 with minimal
> to no intervention. I pondered various scenarios, and finally
> succeeded.
>
> 1: I first tried to make a boot floppy, which would boot into an OS,
> then run my preconfigured scripts which would install the SunOS_4.1.4
> over the network onto the internal disk.
>
> After trying this myself and from various responses from the
> sun-managers mailing list, I concluded that SunOS_4.1.4 will not
> fit in 1.44MB of floppy disk space. If you want the details, please
> send a request to robert.kohler@uprc.com.
>
> 2: Second try involved Configuring Solaris 2.x JumpStart to install
> SunOS_4.1.4 for me. This would eliminate the need for a floppy disk.
> After several trial and error scenarios, I feel I have created one of
> the best ways to install SunOS_4.1.4 over the net.
> NOTE: Current delimna is the fact that each machine we install must
> be on the same subnet. This is because we filter broadcasts
> on our routers. This can be remedied, will discuss later.
>
> Details:
>
> 1. Install Solaris 2.x JumpStart onto an install server.
> NOTE: Mount Solaris 2.x CD, and run "add_install_server".
> We are using a SparcLX currently. (named "grunt"), and
> installed it into the following directory..
> /usr/export/data2/install_images
> NOTE: Don't need Solaris 2.x CD anymore.
>
> 2. Now you must install from CD your first SunOS_4.1.4 system.
> Install it exactly as you want using suninstall. Perform
> all configurations so that it will work on your network.
>
> We need this image to "dump" to our install server (grunt).
>
> We configured the following on our 207MB internal drives.
> Packages include:
> root
> usr
> Kvm
> Install
> Networking
> System_V
> Sys
> Text
> OpenWindows_Users
> OpenWindows_Fonts
> Security
>
> Disk layout is as follows:
>
> Current partition table (original sd0):
> partition a - starting cyl 0, # blocks 20736 (64/0/0)
> partition b - starting cyl 64, # blocks 65772 (203/0/0)
> partition c - starting cyl 0, # blocks 406296 (1254/0/0)
> partition d - starting cyl 0, # blocks 0 (0/0/0)
> partition e - starting cyl 0, # blocks 0 (0/0/0)
> partition f - starting cyl 0, # blocks 0 (0/0/0)
> partition g - starting cyl 267, # blocks 319788 (987/0/0)
> partition h - starting cyl 0, # blocks 0 (0/0/0)
>
> NOTE: partition a is / 10MB
> partition b is swap 32MB
> partition g is /usr REMAINING
>
> 3. Back on install server (grunt), make a sub-directory tree
> for images. We set up the following...
> grunt:/usr/export/data2/os_images/SunOS_4.1.4/sun4c/GENERIC
> I made a link for /os to point to /usr/export/data2/os_images
> so our scenario now looks like the following.
> grunt:/os/${OS_VERSION}/${ARCHITECTURE}/${KERNEL}
>
> Inside each kernel directory will be 2 files root and usr
> (dump images of the original SunOS_4.1.4 configured).
>
> NOTE: I chose dump/restore for it's flexibility of partition
> sizes and disk sizes.
>
> 4. Now it is time to dump the SunOS_4.1.4 install image of the
> preconfigured machine to the install server.
> Using NFS, we can "cd /data/grunt2/os/SunOS_4.1.4/sun4c/GENERIC
> which is actually "grunts" disk.
> From here we run the following command.
> "dump 0dsf 54000 13000 root /dev/rsd0a"
> "dump 0dsf 54000 13000 usr /dev/rsd0g"
>
> This will make 2 files on the install server (root and usr)
> which sould be the same size as the preconfigured machine.
>
> 5. Now you need to configure your install server's tftpboot and
> bootparams area so as to respond to the broadcast from the
> machine you are installing.
>
> Since we use NIS, I had to update our master yp server's
> ethers database and host database. (ie. the ethers will map
> Ethernet address of machine to install to hostname, and the
> hosts database will map hostname to IP address.) Note: you
> could just edit the local /etc/hosts and /etc/ethers files.
>
> Say we want to upgrade machine name "cronkite" which is a sun4c
> architecture.
>
> On install server, cd /usr/export/data2/install_images, you
> will find a script called "add_install_client".
>
> Run "./add_install_client sun4c cronkite" which sets up the
> following files... /etc/bootparams" and "/tftpboot/*".
>
> Here is our /etc/bootparams file.
> * install_config=grunt:/usr/export/data2/install_images/configs
> cronkite root=grunt:/usr/export/data2/install_images/export/exec/kvm/sparc.sun4
> c.Solaris_2.4 install=grunt:/usr/export/data2/install_images
>
> Here is our /tftpboot directory
> # ls -al /tftpboot
> total 348
> drwxrwxr-x 2 root other 512 Feb 24 16:53 .
> drwxr-xr-x 29 root root 1024 Feb 24 16:53 ..
> lrwxrwxrwx 1 root other 26 Feb 24 16:53 905E30C8 ->
> inetboot.sun4c.Solaris_2.4
> lrwxrwxrwx 1 root other 26 Feb 24 16:53 905E30C8.SUN4C ->
> inetboot.sun4c.Solaris_2.4
> - -rwxr-xr-x 1 root other 162932 Feb 24 16:53
> inetboot.sun4c.Solaris_2.4
> - -rw-r--r-- 1 root other 316 Feb 24 16:53 rm.144.94.48.200
> lrwxrwxrwx 1 root other 1 Feb 24 16:53 tftpboot -> .
>
> The files of interest are the 905E30C8 which is the IP address
> translated into HEX, and the inetboot.sun4c.Solaris_2.4 which
> is the boot program for Solaris_2.4.
>
> Also, the "add_install_client" will start a daemon called
> "bootparamd" which will respond to boot net broadcasts.
>
> 6. Now make a configuration directory. We made the following
> grunt:/usr/export/data2/install_images/configs
>
> This holds the info on how JumpStart reacts to the boot.
> (ie. what to install where).
>
> Copy the auto_install_sample directory into the configs area.
>
> Edit the file "rules", at the bottom add an entry like the
> following...
> hostname cronkite && karch sun4c pre_install_4.x 207MB.SunOS_4 post_install_4.x
>
> This means if the machine booting is named "cronkite" and the
> "arch -k" returns "sun4c" then run the "pre_install" script,
> then the 207MB.SunOS_4 configuration, then the "post_install"
> script. Upon completion, the system automatically reboots.
>
> Create the following files:
> # more pre_install_4.x 207MB.SunOS_4 post_install_4.x | cat
> ::::::::::::::
> pre_install_4.x
> ::::::::::::::
> #!/bin/sh
> #====================================================================
> # Name: pre_install_4.x Date: 2/24/95 =
> # Programmer: Robert Kohler E-Mail: robert.kohler@uprc.com =
> # Language: Bourne Shell =
> #-------------------------------------------------------------------=
> # Purpose: This script will run prior to system installation and =
> # pre-configure the defaultrouter interface. It then =
> # creates a variable list readable by a "post_install" =
> # script to minimize system work. =
> # Method: /etc/hosts is configured by "JumpStart" from the =
> # ethers and host databases. Read the valid IP address =
> # and change the last field to 1 for the defaultrouter. =
> #====================================================================
> #
> echo "Running pre_install_4.x script..."
> #
> # Gather all variables needed from the system.
> #
> HOSTNAME=`uname -n`
> IP_ADDRESS=`egrep -v '(127\.0\.0\.1|^#)' /etc/hosts | cut -f1`
> DEFAULT_ROUTER=`echo $IP_ADDRESS | awk -F. '{printf("%s.%s.%s.1",$1,$2,$3)}'`
> #
> if [ "${DEFAULT_ROUTER}" = "144.94.128.1" ]; then
> DEFAULT_ROUTER="144.94.128.172" # One exception to our network.
> fi
> #
> #-----------------------------------------------
> #
> # Set the default gateway.
> #
> route add net default ${DEFAULT_ROUTER} 1
> #
> #-----------------------------------------------
> #
> # Put the variables in /tmp so the JumpStart "post_script" can use them.
> #
> cat - << EOF > /tmp/pre_install_vars_${HOSTNAME}
> IP_ADDRESS=${IP_ADDRESS}
> DEFAULT_ROUTER=${DEFAULT_ROUTER}
> EOF
> #
> cat /tmp/pre_install_vars_${HOSTNAME}
> #
> #-----------------------------------------------
> #
> # Now return control back to JUMPSTART for Solaris Cluster install.
> #
> echo "pre_install_4.x script Complete."
> ::::::::::::::
> 207MB.SunOS_4
> ::::::::::::::
> install_type initial_install
> system_type standalone
> partitioning explicit
> filesys c0t3d0s0 10 /restore_root
> filesys c0t3d0s1 32 swap
> filesys c0t3d0s6 free /
> cluster SUNWCreq
> ::::::::::::::
> post_install_4.x
> ::::::::::::::
> #!/bin/sh
> #====================================================================
> # Name: post_install_4.x Date: 2/24/95 =
> # Programmer: Robert Kohler E-Mail: robert.kohler@uprc.com =
> # Language: Bourne Shell =
> #-------------------------------------------------------------------=
> # Purpose: This script will run after system installation and =
> # load SunOS_4.1.4 into the system instead. A new =
> # boot block is written, and configuration files are =
> # automatically setup. =
> # Method: Some variables are read from a file created by the =
> # pre_install script. Then the partitions declared are =
> # restored from an images of a SunOS_4.1.4 architecuture =
> # and Kernel. After install, I reconfigure root's =
> # password. =
> #====================================================================
> #
> echo "Running post_install_4.x script"
> #
> #-----------------------------------------------
> # Added by SUN to mount all disk partitions. RPK 3/23/95
> # Recieved via E-Mail from lou@sunesc.East.Sun.COM
> # Sun2.4 Jumpstart bug, after install only / is mounted.
> #
> vfstab=/a/etc/vfstab
>
> exec < ${vfstab}
> {
> while read special fsckdev mountp fstype fsckpass automnt mntopts
> do
> case ${special} in
> '#'* | ' ') # Ignore comments, empty lines
> continue ;;
> '-') # Ignore no-action lines
> continue
> esac
>
> if [ "${fstype}" = "ufs" ]
> then
>
> if [ -d "/a${mountp}/lost+found" ]
> then
> echo "/a"$mountp "is already mounted"
> else
> echo "mounting" ${special} "on /a"${mountp}
> /sbin/mount ${special} /a${mountp}
> fi
>
> fi
>
> done
> }
> #
> #-----------------------------------------------
> # Set local variables for SunOS_4.1.4 "dump/restore" images.
> #
> INSTALL_SERVER_IP="144.94.120.6" # grunt
> OS_VERSION="SunOS_4.1.4"
> ARCHITECTURE="sun4c"
> KERNEL="GENERIC"
> #
> #-----------------------------------------------
> # Read some local variables from the pre_install script.
> # ( IP_ADDRESS, DEFAULT_ROUTER)
> #
> HOSTNAME=`uname -n`
> #
> . /tmp/pre_install_vars_${HOSTNAME}
> #
> #-----------------------------------------------
> #
> # Install SunOS_4.1.4 (root) into /a/restore_root partition.
> #
> echo "Installing SunOS_4.1.4 (root) on partition 0.....please wait..."
> cd /a/restore_root
> ufsrestore -rf ${INSTALL_SERVER_IP}:/os/${OS_VERSION}/${ARCHITECTURE}/${KERNE
> L}/root
> echo " done."
> #
> #-----------------------------------------------
> #
> # Configure SunOS_4.1.4 system files.
> #
> echo "Installing SunOS_4.1.4 system files..."
> echo "${DEFAULT_ROUTER}" > /a/restore_root/etc/defaultrouter
> cp /a/etc/hosts /a/restore_root/etc/hosts
> cp /a/etc/hostname.le0 /a/restore_root/etc/hostname.le0
> rm /a/restore_root/etc/.UNCONFIGURED
> echo " done."
> #
> #-----------------------------------------------
> #
> # Clean /a out so you can Load SunOS_4.1.4 into it.
> #
> echo "Removing Solaris 5.4 (root) to install SunOS_4.1.4 (usr)..."
> cd /a
> rm -r `ls | egrep -v '(restore_root|lost\+found)'`
> echo " done."
> #
> #-----------------------------------------------
> #
> # Install SunOS_4.1.4 (usr) into /a partition.
> #
> echo "Installing SunOS_4.1.4 (usr) on partition 6.....please wait..."
> ufsrestore -rf ${INSTALL_SERVER_IP}:/os/${OS_VERSION}/${ARCHITECTURE}/${KERNE
> L}/usr
> echo " done."
> #
> #-----------------------------------------------
> #
> # Install SunOS_4.1.4 boot block on internal disk.
> #
> echo "Installing SunOS_4.1.4 boot block..."
> cd /a/kvm/mdec
> ./installboot -vlt /a/restore_root/boot bootsd /dev/rdsk/c0t3d0s0
> echo " done."
> #
> #-----------------------------------------------
> #
> # Install root password.
> #
> echo "Installing SunOS_4.1.4 root password..."
> STRING="xxxxxxxx" # roots passwd.
> PASSWD_FILE="/a/restore_root/etc/passwd"
> cp -p ${PASSWD_FILE} ${PASSWD_FILE}.save;
> sed -e '1s:\:[^\:]*\::\:'$STRING'\::' ${PASSWD_FILE}.save > ${PASSWD_FILE}
> echo " done."
> #
> #-----------------------------------------------
> #
> # Site Specific Configs.
> # Note: inetd.wrap.4x is merely an "inetd" wrapper which will fire off
> # and install script upon bootup when the inetd daemon tries
> # to start. It removes itself after bootup.
> #
> echo "Starting 4.1.4 Configuration setup."
> rcp grunt:/usr/export/data2/install/rc3/inetd.wrap.4x
> /a/restore_root/bin/inetd
> rcp grunt:/usr/export/data2/install/rc3/install_machine.4x
> /a/restore_root/install_machine.4x
>
> chown root /a/restore_root/bin/inetd
> chmod 744 /a/restore_root/bin/inetd
> chown root /a/restore_root/install_machine.4x
> chmod 744 /a/restore_root/install_machine.4x
> #
>
> echo "Done installing system."
> #
>
> =============================================================================
> # cat inetd.wrap.4x
> #!/bin/sh
> #
> # Date : 5/4/95
> # Script written by Robert Kohler to install Site specific information.
> #
> # This script needs to be copied into /bin/inetd file on
> # the newly installed system. It will run the install and remove itself.
> # This will automatically be executed upon bootup.
> #
> HOSTNAME=`uname -n`
>
> /usr/etc/inetd
> echo -n " install_machine"
>
> (sleep 8; stty sane; /install_machine.4x) &
>
> (sleep 2; rm /bin/inetd) &
> #
> =============================================================================
> # cat install_machine.4x
> #!/bin/sh
> #
> # Date : 5/4/95
> # Script written by Robert Kohler to install UPRC specific information.
> #
> # This script needs to be copied into the / directory on
> # the newly installed system. It will update and remove itself.
> # An "inetd" wrapper is almost the last thing run in "rc",
> # thus this will automatically be executed near bootup completion.
> #
> HOSTNAME=`uname -n`
>
> echo " "
> echo "Running Install_Machine for SunOS_4.1.4...Please Wait"
> echo " "
> /usr/ucb/rsh -n xxxx "cd /usr/export/data/system/Install_Machine;
> ./install_sun_4.1.4 ${HOSTNAME}"
> echo " "
> echo "Completed Install..."
> echo "****************************************************"
> echo "** WARNING!!! System will automatically reboot **"
> echo "** in 10 seconds...Please wait!!! **"
> echo "****************************************************"
> echo " "
> (sleep 5; rm /install_machine.4x) &
> (sleep 10; reboot) &
> #
> =============================================================================
> 7. Now check to ensure your files were made correctly.
> Run "./check", this should parse the "rules" file,
> "pre_install_4.x, post_install_4.x, and 207MB.SunOS_4"
> Upon completion, this makes a "rules.ok" file.
>
> 8. Now you are ready to try to install your new system.
> Plug new system into ethernet connection, and at the ok
> prompt type 'boot net - install'
>
> NOTE: If the system is live, and running (say SunOS_4.1.x) and
> you want to upgrade to SunOS_4.1.4, then log into that system
> and run 'reboot "net - install"' as root.
>
> 9. System should take 35 minutes for install. It installs core
> Solaris 2.4 into system, but then I remove it and overwrite
> with SunOS_4.1.4. Delay of 10 minutes.
> I have not found a way to install nothing from Solaris_2.4
> inside JumpStart.
>
> 10. Upon completion remove the machine from the tftp boot area.
>
> On install server: (grunt),
> cd /usr/export/data2/install_images
> "run rm_install_client cronkite"...
>
> 11. Upon first reboot, the inetd wrapper is executed, thus
> installs all latest patches, rdists pertinent files, and
> updates motd (message of the day), etc... It removes
> itself then reboot automatically.
>
> Tada, complete...
> Now for every other system you want to install,
> 1. Add to hosts database, or (/etc/hosts).
> 2. Add to ethers database, or (/etc/ethers).
> 3. Run "add_install_client <arch> <hostname>"
> 4. Boot <hostname> using "boot net - install" from prom.
> If system already on up...run # reboot "net - install"
> 5. Run "rm_install_client <hostname>".
>
> =============================================================================
>
> Now to get around the single subnet issue...
>
> 1. Go to a new install server on a different subnet.
> NFS mount the disk from the install server.
> cd /data/grunt2/install_images
> run add_install_server script. Put on a machine which
> is on the other subnet and has 16MB + disk space for each
> architecture you want loaded.
>
> 2. Now run add_install_client via NFS and let it add the clients.
> If it fails, remember you just need the files listed below...
> # cat /etc/bootparams
> * install_config=grunt:/usr/export/data2/install_images/configs
> cronkite root=grunt:/usr/export/data2/install_images/export/exec/kvm/sparc.sun4
> c.Solaris_2.4 install=grunt:/usr/export/data2/install_images
> # ls -al /tftpboot
> total 348
> drwxrwxr-x 2 root other 512 Feb 24 16:53 .
> drwxr-xr-x 29 root root 1024 Feb 24 16:53 ..
> lrwxrwxrwx 1 root other 26 Feb 24 16:53 905E30C8 ->
> inetboot.sun4c.Solaris_2.4
> lrwxrwxrwx 1 root other 26 Feb 24 16:53 905E30C8.SUN4C ->
> inetboot.sun4c.Solaris_2.4
> - -rwxr-xr-x 1 root other 162932 Feb 24 16:53
> inetboot.sun4c.Solaris_2.4
> - -rw-r--r-- 1 root other 316 Feb 24 16:53 rm.144.94.48.200
> lrwxrwxrwx 1 root other 1 Feb 24 16:53 tftpboot -> .
>
> 3. Make sure bootparamd is running on the second boot server.
> 4. Boot the systems on that net as "boot net - install".
>
> =============================================================================
>
> NOTE: Additions to be made and suggestions for improvement....
>
> Copy some machine specific files out prior to upgrade/install so that
> the system can keep its same configuration.
> (ie. /var/spool/mail/*, /var/spool/calendar/*, /etc/fstab, etc...)
>
> Find better work around for subnet restriction.
>
> Put everything in pre_install script. This way you wouldn't have
> to load any of SunOS_5.x to install 4.1.4. This means you would
> have to partition your disks in the scripts also. Newfs them, etc.
> I like having the system do it, and the extra 10 minutes is not
> an issue to us. Maybe future workarounds will bypass this bug,
> namely putting a "-" as the configuration package doesn't work.
>
> =============================================================================
> Enjoy!!!
>
> Robert Kohler
> Union Pacific Resources
> robert.kohler@uprc.com
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ José Manuel Franco Laboratorio de Cómputo Especializado (SUN) Estaciones de trabajo de profesores (SUN) ITESM CEM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Don't be humble, you're not that great. -- Golda Meir
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:54 CDT