Subject: Re: how to upgrade NetBSD
To: Zafer Aydogan <zafer.aydogan@gmail.com>
From: Gary Thorpe <gathorpe79@yahoo.com>
List: netbsd-help
Date: 07/06/2006 22:28:49
--- ZaZaferyAydoganzazaferyaydoganmgmailom> wrote:

> Thanks.
> But you misunderstood.
> I have the distribution sets (base.tgtgzcomp.tgtgzetc.tgtgz...) and
> want to update a running system. I don't need to build the sources,
> because that's done on another machine -> therefore the sets.
> What do I have to do now ?
> 
> Z.
> 

The standard installation utility ('sysysinst?) can do an upgrade: no
repartitioning or file system recreation is necessary.  If you have the
sources you can probably build it if it hasn't been built already.

I found the steps to be very similar to a normal installation. I think
the only caveats are that older files may stick around afterwards and
some things may have to be manually done (I had to add a handful of new
users/groups upgrading from 2.0 -> 3.0). The GENERIC kernels include
all compatibility options, so any old packages should still work (they
will have to be upgraded separately) and you can build kernels with
these options. The 'sysinst' upgrade is good if you do not want to
change the filesystem type or change partition sizes. It also preserved
the passwd/groups, configuration files, ssh keys etc.

If you only want to keep /home (your data) or other partitions (if you
avoided the "one big / to rule them all" approach): simply do a clean
install but ensure that those slices you wish to preserve do not get
put through newfs. I think I did this for 1.6 -> 2.0 successfully (if
you want to keep packages etc. this would be a good reason to keep
/usr/pkg on a separate file system, same for /usr/local or /opt or
whatever). During the installation, you can mark partitions you do not
want to be reinitialized (it's an option or a flag). This can preserve
your data, give you some 'fresh' filesystems, and clean out all old
system binaries but /etc will probably have to manually updated (from
your backup?).

Either way, packages are separate from the system upgrade procedure:
you can keep them (due to compatibilty) or upgrade them separately
(security?). 

Both approaches may result in data loss (human errors or otherwise), so
you should backup everything useful. The official guide,
http://www.netbsd.org/guide/, and the port-specific INSTALL documents
are valuable sources for these issues (and have sections on upgrading
specifically).

Good luck! [you can measure twice, but only cut once]


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com