white noise | tag/bsd /blog//tag/bsd.html white noise uneasy netbsd packages upgrade /blog//post/uneasy_netbsd_packages_upgrade.html /blog//post/uneasy_netbsd_packages_upgrade.html bsd sysadmin unix Sun, 23 Dec 2007 15:51:16 +0100 NetBSD

Yesterday I took some time to upgrade my NetBSD test server packages collection to pkgsrc-2007Q3.

I updated the source tree:

$ cvs updated -dP -r pkgsrc-2007Q3

then I perform a bulk upgrade of all installed packages (not many to be honest):

# /usr/pkg/sbin/pkg_chk -g
# /usr/pkg/sbin/pkg_chk -us

It wasn't that smooth. I encountered two different kinds of problems:

  • some makefiles needed to be manually edited, since cvs was not able to merge all changes automatically
  • some packages couldn't be installed as part of the bulk process. I haven't completely understand the problem, so I just got rid of it by manually installing the new version of each problematic package

In the end I got it running, and everything seems fine. I had the feeling of a logical approach after all, so I am quite comfortable with this.

]]>
NetBSD upgrade from binary sets /blog//post/NetBSD_upgrade_from_binary_sets.html /blog//post/NetBSD_upgrade_from_binary_sets.html bsd sysadmin unix Sat, 10 Nov 2007 19:20:15 +0100 BSD

After performing a source-way upgrade of my NetBSD system, I decided to try out a different approach using the binary sets.

I got all the sets I needed from a handy mirror, then I performed the following steps:

$ tar zcvf etc-backup.tar.gz /etc
$ cp /netbsd /netbsd.old

$ tar zxvpf kern-GENERIC.tgz -C /
$ tar zxvpf base.tgz -C /
$ tar zxvpf comp.tgz -C /
$ tar zxvpf man.tgz -C /
$ tar zxvpf text.tgz -C /
$ tar zxvpf games.tgz -C /

$ mkdir /tmp/tmproot
$ tar zxvpf etc.tgz -C /tmp/tmproot
$ etcupdate -s /tmp/tmproot/etc

After all the modifications needed to the configuration files were done, I just rebooted the system.

]]>
upgrade netbsd installed packages /blog//post/upgrade_netbsd_installed_packages.html /blog//post/upgrade_netbsd_installed_packages.html bsd sysadmin unix Sun, 30 Sep 2007 22:04:53 +0200 NetBSD

After upgrading my NetBSD system, I decided to upgrade the packages collection. These are the step I've done.

Set cvs environment variables

Put in my .bashrc the following lines:

export CVSROOT="anoncvs@anoncvs.NetBSD.org:/cvsroot"
export CVS_RSH="ssh"

Updated the sources

$ cvs -q update -dP

Upgraded the packages

Refreshed the list of installed packages:

$ pkg_chk -g

The list was saved in /usr/pkgsrc/pkgchk.conf.

Updated the packages:

$ pkg_chk -us
]]>
NetBSD upgrade from sources /blog//post/NetBSD_upgrade_from_sources.html /blog//post/NetBSD_upgrade_from_sources.html bsd sysadmin unix Sun, 09 Sep 2007 21:41:50 +0200 NetBSD

Yesterday I finally find the time to upgrade wolverine, my NetBSD test server. I was in the mood to try something new, so I decided to perform the upgrade starting from sources.

It was really smooth, although it took a lot of time to compile everything (wolverine is a PIII 500Mhz). Here are the steps performed.

Backup data (/etc):

$ tar zcvf etc-3.0.tar.gz /etc

Prepare the directories (as root):

% mkdir /usr/src
% mkdir /usr/obj
% mkdir -p /usr/builds/i386
% mkdir -p /usr/releases/i386

Change the ownership of those directories to you user.

Get the sources:

$ wget ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-3.0.2/source/sets/*.tgz

Unpack the sources:

$ for file in *.tgz; do tar zxvf $file -C /; done

Build or update the crosscompiler:

$ cd /usr/src
$ ./build.sh -D /usr/builds/i386 -R /usr/releases/i386 -u -m i386 tools

Crosscompile the kernel:

$ ./build.sh -D /usr/builds/i386 -R /usr/releases/i386 -u -m i386 kernel=GENERIC

Install the new kernel (as root):

% cd /
% mv netbsd netbsd-3.0
% cp /usr/src/sys/arch/i386/compile/obj/GENERIC/netbsd .

Reboot the system.

Crosscompile the userland:

$ build.sh -D /usr/builds/i386/ -R /usr/releases/i386/ -U -u -m i386 build

Install (as root):

% build.sh -D /usr/builds/i386/ -R /usr/releases/i386/ -U -u -m i386 install=/

Review postinstall failed checks and fix things accordingly.

Update /etc (as root):

% /usr/sbin/etcupdate
]]>