Koroush Saraf wrote:
> Can someone please tell me what I'm doing wrong and also tell me how to
> script this?

You have a number of bad assumptions.  Here is the correct
procedure:

1)      Upgrade one system.  This is necessary to obtain the
        correct /stand/sysinstall program and the /dev/MAKEDEV
        and /dev/MAKEDEV.local scripts, which will not come
        in automatically, if you do not boot from the install
        media.

2)      Copy these files and make a tarball, e.g.:

                cd /tmp
                mkdir terry
                cd terry
                cp /stand/sysinstall .
                cp /dev/MAKEDEV* .
                tar cvf ../terry.tar .

3)      Mount and NFS export the CDROM; this will be more
        efficient.  If you don't want to do that, then
        you will need to mount the CDROM on a directory
        named "4.5-RELEASE", and export its *parent* as
        your FTP export directory on the machine.  The main
        problem here is that the sysinstall looks for the
        subdirectory named after the release for the
        sysinstall version you are running.  It is a lot
        easier to just use NFS.

4)      Mount the CDROM via NFS on the machine to be upgraded.

5)      Copy over the tarball and unpack it on the target
        system, e.g.:

                cd /tmp
                mkdir terry
                cd terry
                tar xvf ~/terry.tar

6)      Run the sysinstall from the tarball, e.g.:

                ./sysinstall

        THIS IS VERY IMPORTANT!

7)      If you need local sources, and don't have any local
        modifications that you care about losing, then empty
        /usr/src; otherwise, the sources will be left alone,
        and will be old and stale.

8)      Upgrade using the sysinstall "upgrade" option; tell
        it you are using locally mounted media, and point it
        to where you mounted the CDROM via NFS.

        DO NOT REBOOT YET!

9)      Modify /etc/pam.conf to add the ssh lines (refer to
        the system you updated using the normal process).  A
        failure to this means that SSH will stop working; if
        you are updating rack-mount equipment, this could
        lock you out!

10)     Update and run the MAKDEV scripts.  A sysinstall based
        upgrade done this way will not properly update things;
        so:

                cp MAKEDEV* /dev
                cd /dev
                sh MAKEDEV all

11)     Reboot.  This system should be done.  Go on to the
        next system.

In theory, you can script the sysinstall upgrade process,
along with the MAKEDEV and the pam.conf stuff.  Whether
this is worthwhile depends on the number of systems that
you have to deal with this way (the sysinstall scripting
is dark and mysetrious, IMO).

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to