Subject: Re: When is the next release or snapshot due?
To: None <port-i386@NetBSD.ORG>
From: Rex McMaster +61 03 9883-7569 <rmcm@paradiso.apana.org.au>
List: port-i386
Date: 06/06/1997 14:08:46
I have successfully used a similar method to Andrew Brown for dynamic
OS upgrades - with a minor variation prior to the kernel build;

  in the usr directory I replaced more directories;
    lib libdata libexec bin sbin games include mdec obj share

Once these were in place, the host (a firewall) continued running
without a problem for the next 8 hours, until it was convenient to
reboot with a new kernel.

I have yet to try this over a ppp link - perhaps over the next few
days.

------------------------------------------------------------
Rex McMaster                       rmcm@ariel.unimelb.edu.au     
                                  rmcm@paradiso.apana.org.au
Andrew Brown writes:
 > >Are there instructions anywhere on how to upgrade NetBSD?
 > >At a first glance it looks like it's something you need to
 > >set aside about a full working week for, per machine.
 > 
 > i've done live, running migrations from 1.1 to 1.2 a few times, all
 > with the machine being up, live, running, and doing stuff.  the only
 > "down-time" the machine experienced was when it changed from the 1.1
 > kernel to the 1.2 one.
 > 
 > what i did (which may or may not be "correct", but worked fine for me):
 > 
 > 1) make a directory into which the new stuff will be unpacked (eg,
 > /newroot).
 > 
 > 2) make subdirectories in /bin, /sbin, /usr/sbin, /usr/lib,
 > /usr/libexec, called .1.1 and .1.2 (the significance of these names
 > will become apparent shortly).
 > 
 > 3) in "/newroot", i made a directory called usr and made six symlinks
 > to the .1.2 directories made in the previous step.  so now i have
 > stuff like:
 > 
 >   /bin/.1.1/
 >   /bin/.1.2/
 >   /sbin/.1.1/
 >   /sbin/.1.2/
 >   ...
 > 
 >   /newroot/bin -> /bin/.1.2
 >   /newroot/sbin -> /sbin/.1.2
 >   /newroot/usr/bin -> /usr/bin/.1.2
 >   /newroot/usr/sbin -> /usr/sbin/.1.2
 >   ...
 > 
 > 4) unpack the new stuff into /newroot (which will actually end up
 > unpacking it into your real tree, albeit somewhat sequestered away).
 > also, at this time, move your old kernel source tree and unpack the
 > new kernel source.
 > 
 > 5) copy /bin/mv to / (so that i know where it is)
 > 
 > 6) then, in order, i cd into /usr/lib, /sbin, /bin, /usr/sbin,
 > /usr/bin, /usr/libexec, and execute the following one-line command
 > (regardless of the shell)
 > 
 >   /mv * .1.1 ; /mv .1.2/* .
 > 
 > which has the following side-effects (as i understand things):
 > a) no files are removed, they are simply moved
 > b) no running programs should be affected by libraries disappearing
 > c) there does exist a tiny window for new programs starting while
 > you're doing the step in the /usr/lib directory to fail, but i
 > dismissed it
 > d) by replacing libraries first, and then binaries, you have a much
 > greater chance that everything will continue to work as you are
 > working
 > 
 > 7) now, with new tools in place, config and build a new kernel.  then
 > install it and reboot.
 > 
 > no one noticed when i did it.
 > 
 > -- 
 > |-----< "CODE WARRIOR" >-----|
 > andrew@echonyc.com (TheMan)        * "ah!  i see you have the internet
 > codewarrior@daemon.org                               that goes *ping*!"
 > warfare@graffiti.com      * "information is power -- share the wealth."
--