- 论坛徽章:
- 0
|
Upgrading NetBSD 1.6 to 1.6.1
======================
Author: SolarfluX
Here's a tutorial that shows how to upgrade a NetBSD system to 1.6.1 from 1.6. I've included a few things that some documentation I've looked at seems to leave out.
As root, you'll want to set your environment variables in order to use cvs to get the new sources.
csh:
# setenv CVS_RSH ssh (as opposed to the non-encrypted pserver method, which won't be covered)
# setenv CVSROOT anoncvs@anoncvs.netbsd.org:/cvsroot
sh/ksh:
# export CVS_RSH=ssh
# export CVSROOT=anoncvs@anoncvs.netbsd.org:/cvsroot
# cd /usr; cvs co -P pkgsrc (gets pkgsrc)
If you are updating pkgsrc, you will have to make deinstall in /usr/pkgsrc/pkgtools/pkg_install and then make install to have the latest version; otherwise you won't be able to install anything in /usr/pkgsrc. If this is the first checkout of pkgsrc, then just make install in /usr/pkgsrc/pkgtools/pkg_install before attempting to install packages.
Type 'yes' to accept the RSA key and add the server to the list of known hosts, then enter 'anoncvs' for the password (no quotes). After a delay, you will see the pkgsrc files downloading to your machine. After that's done, get the new 1.6.1 sources:
# cvs co -rnetbsd-1-6-RC2 -PA src (when 1.6.1 is released, this will become netbsd-1-6-1)
This will take a long time... Go get some food or take a little nap.
When finished, make the obj dir, cd to the src dir and build the tools:
# mkdir /usr/obj; cd src; ./build.sh -t
Another delay while it does its thing.
# cd /sys/arch/i386/conf
# cp GENERIC {CUSTOMKERNEL}
# vi {CUSTOMKERNEL} and make changes; if you compiled a custom kernel previously, skip this step and the previous one.
# /usr/obj/tools/tools.NetBSD-1.6-i386/bin/nbconfig {CUSTOMKERNEL}
# cd ../compile/{CUSTOMKERNEL}
# /usr/obj/tools/tools.NetBSD-1.6-i386/bin/nbmake depend
# /usr/obj/tools/tools.NetBSD-1.6-i386/bin/nbmake \
CC=/usr/obj/tools/tools.NetBSD-1.6-i386/bin/i386--netbsdelf-gcc
# mv /netbsd /netbsd.old; mv netbsd /
# reboot
After the system is back online, become root and build the world:
# cd /usr/src; ./build.sh -j3 (assigns three jobs per CPU)
Wait awhile; a 1.4 GHz machine took 70 minutes to complete building the world.
# cd /usr/pkgsrc/sysutils/etcupdate; make install
This installs a utility which basically does the same thing as mergemaster on FreeBSD.
# etcupdate (NetBSD recommends that you reboot to single-user mode to run this, but it's not necessary; you may have problems with various daemons that are currently running, so beware)
You'll want to keep your original files for such things as named, hosts, resolv.conf or anything you've modified. Anything that needs to be added to your original files should be merged into a new file. Check the etcupdate man page if you're new to merging files. If changed files are displayed which you haven't edited before, always install the new version.
After etcupdate completes, reboot and you're finished.
-SolarfluX 03.07.2003 |
|