Wednesday, July 11, 2012

NetBSD quick update guide

Since I always tend to forget and the documentation on the website is a bit incomplete, I sum up the procedure I use to update from source the kernel and userland:

Update /usr with cvs, create /usr/obj and /usr/tools (or clean its content).

As per documentation, build the tools. Inside /usr/src:
$ ./ -O /usr/obj -T /usr/tools -U -u tools
Now build the kernel:
$ cd /usr/src
$ ./ -O ../obj -T ../tools kernel=
Install it:
# mv /netbsd /netbsd.old
# mv /usr/obj/sys/arch/i386/compile//netbsd /
And now, important, build and install the modules:

# ./ -O /usr/obj -T /usr/tools -U -u modules installmodules=/

Reboot and check that the kernel works. Then build and install userland:
$ ./ -O ../obj -T ../tools -U -x distribution
# ./ -O ../obj -T ../tools -U -u -x install=/ 
 Cross your fingers and happy BSD!

No comments: