Subject: Re: Upgrading from 1.5.2 to -current?
To: Brad Knowles <brad.knowles@skynet.be>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-sparc
Date: 04/12/2002 15:01:58
On Fri, Apr 12, 2002 at 12:46:17PM +0200, Brad Knowles wrote:
> At 9:44 AM +0200 2002/04/12, Manuel Bouyer wrote:
> 
> >  From 3), just do:
> >  3) cd /usr/src ; ./build.sh -d -D /usr/tmp/destdir
> 
> 	My /usr isn't particularly large -- only 512MB total, of which 
> about 300MB is in use.  Do I need to specify the destdir, and if so 
> does it need to be on the same filesystem as /usr/src?  What if 
> /usr/src isn't on the same filesystem as the rest of /usr?

All /usr, destdir and /usr/src can be on different filesystems.

> 	Any idea how much disk space this process requires in the destdir?

destdir will be about the same size as a complete NetBSD install without
packages - I'd say something like 200M. It's 186M on my SGI but may vary a bit
from one arch to another.

/usr/src will grow too, as objects will be created there. On my SGI it's
937M after a build.sh (I didn't check how much it was before so I don't
know the size required for objects :)

> 
> 
> >  4) build a new kernel (cd /usr/src/sys/arch/i386/conf; config 
> >GENERIC; cd ../compile/GENERIC; make)
> 
> 	Should I make the GENERIC kernel first and get it up and running, 
> then later go in and do up a kernel that has support for hme & qfe 
> interfaces, or can I safely do all this at once?

You can do it all at once.

> 
> 	Also, any idea how much disk space this process takes?

The space to compile a kernel. A custom kernel on my sparc64 needs 70M to
build, but it's compiled with -g, which makes objects larger (netbsd.gdb
itself is 17M).


> 
> >  5) install the new kernel and reboot
> >  6) mv /etc /etc.old; cd /usr/tmp/destdir; pax -rw -p e . /
> 
> 	Ahh, now this is a step unlike anything I've seen before on any 
> other OS.  I'll have to take a closer look at what the system is 
> doing, but although this step is a little different, it does seem 
> fairly intuitive and I think I understand the overall idea on 
> inspection.  Still, I want to be safe.

Well, this just copy binaries that have been installed in destdir to the
live filesystem. This also copy the new etc files, which is why you need to
backup the old one before.

> 
> >  7) merge bits from /etc.old in /etc (this should be not much more than
> >  users added to master.passwd, groups, myname, mygate, resolv.conf, 
> >ifconfig.*,
> >  rc.conf)
> 
> 	Is there a mergemaster-like process to help automate this?

There is a etcupdate(8) in the base -current system.
If you want to use it then there are a few steps to do in a different way:
- use ./build.sh -D /usr/tmp/destdir (instead of
  ./build.sh -d -D /usr/tmp/destdir)
- don't rename /etc before running pax (now destdir/etc should not contain any
  files)
- run 'etcupdate' once you installed the new binaries.

But note that I never tried it.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--