Upgrading NetBSD

See the Tracking Daily section on PXE // NetBSD for getting the necessary sets and kernels down there: /tftpboot/netbsd9/amd64/

Kernel

mv -f /netbsd /netbsd.old
#mv -f /netbsd.xen /netbsd.xen.old
tar xvJpf /tftpboot/netbsd9/amd64/binary/sets/kern-GENERIC.tar.xz -C /
tar xJpf /tftpboot/netbsd9/amd64/binary/sets/modules.tar.xz -C /
ls -lF /stand/
#vi /boot.cfg
sync
shutdown -r now

reboot in single user mode if you got access to the console

mount -o rw /

proceed with userland and etc, and when finished, continue the boot process by exiting the single user shell

cd /
sync
exit

otherwise you will have to reboot a second time.

Userland

cd /tftpboot/netbsd9/amd64/binary/sets/
ls -lF etc* misc*
for set in base comp debug man misc tests text; do
    print $set... \\c
    tar xJpf $set.tar.xz -C / && print done
done; unset set

/etc/

#rm -rf /etc.old/
cp -a /etc/ /etc.old/
etcupdate -s /tftpboot/netbsd9/amd64/binary/sets/etc.tar.xz

cap_mkdb /etc/login.conf
ls -lF /etc/login.conf.db

cd /dev/
./MAKEDEV all

sync
shutdown -r now

/etc/ alternate 1

#sh /usr/sbin/postinstall -s 'new/' -d / fix ptyfsoldnodes
#sh /usr/sbin/postinstall -s '$newrelease' -d / fix gid pwd_mkdb obsolete ptyfsoldnodes

/etc/ alternate 2

What? There’s sysupgrade auto now?!?

Trash

old tar

#tar xvzphfe
#tar xzphfe
#tar xvJphfe
#tar xJphfe

tracking release changes

Eventually review the changes between the old and the new etc.tgz

#mkdir old/ new/
#tar xzphfe OLD-RELEASE/binary/sets/etc.tgz -C old/
#tar xzphfe /tftpboot/netbsd9/amd64/binary/sets/etc.tgz -C new/ 
#etcupdate -h
#etcupdate -s new

Nethence | Pub | Lab | Pbraun | SNE Russia | xhtml