NetBSD - A little guide for newcomers


As I was not happy with the sizes of my partitions and had nothing to loose, I’d backed-up my configuration files at github. I’ve decided to do a fresh install of NetBSD 8.0 on my laptop.

When I did this for the first time, I remember I’d to collect bits and pieces from different places, some of which were rather old and outdated. So I’ve decided to write this stuff down and publish it here.
Hope that it helps anyone looking to install and configure NetBSD as a laptop/desktop daily driver, if it helps one single soul, I’d be happy!

I got this old, 2013 laptop from the garbage without a hard drive, but with a 4GB RAM chip.
How large should the hard drive be?
Looking on the web and asking a few questions, I came to the conclusion that NetBSD wouldn’t require that much for a full install.
So I bought a 30GB SSD for $20 and placed it in this laptop. Then, I installed NetBSD 8.0 from an usb, as described in following the steps from “The Guide”,

Choose keyboard -> Install to hard disk -> Full installation -> Use the entire disk
Then set the sizes of the partitions. NetBSD installs software to /usr/pkg, so /usr should be the largest partition on the drive, this is my new partition scheme for the 30GB drive:
/ 3GB
/var 3GB
/usr 16GB
/home 3GB
swap 4GB

When the base install was finished, I choose to let dhcp configure my network connection automatically, set the console keyboard, created a root password and set the root shell to /bin/ksh. As I’m in Europe, I’ve configured the system to use an European mirror for pkgin.
I’ve chosen not to set-up pkgsrc for now. Why? Keep it simple to start with and, to be honest I think a larger hard drive would be handy to build packages from source using pkgsrc, as the build directory needs some space to grow during the building process.
Also, I always choose to add a system user after installing, so that’s what I’ve done this time as well.

After installing and rebooting the system, login as root and…

# pkgin install xinit setxkbmap sudo dbus fam avahi
# pkgin install awesome abiword gimp galculator pcmanfm firefox60 leafpad vim free tree scrot epdfview gnome-themes-standard gtk2-engines gtk2-engines-murrine mpv
# pkgin install cantarell-fonts dejavu-ttf liberation-ttf ubuntu-fonts paper-icon-theme

Next you copy some start up files to /etc/rc.d

# cp /usr/pkg/share/examples/rc.d/dbus /etc/rc.d/
# cp /usr/pkg/share/examples/rc.d/fam /etc/rc.d/
# cp /usr/pkg/share/examples/rc.d/avahidaemon /etc/rc.d/

Add these to /etc/rc.conf with the following:


and reboot.

Add an user

useradd -g wheel -G users -s /bin/ksh -c "your real name" -m name
passwd name

If you want to use git, wget and curl check if the mozilla-rootcerts have already been pulled by another package, they should…

pkigin search mozilla-rootcerts

Now, either run

mozilla-rootcerts install

or as I did instead

pkgin install mozilla-rootcerts-openssl

Reboot, login as the new user and configure your stuff, like .xinitrc, .shrc,…
If you need some clues have a look at my github repo, I’ve all my configuration files there,
Enjoy NetBSD.



why would you enable hald though? It’s old, heavy, vulnerable and what else. Is there any package actually still requiring it?
There’s BSD amd for automounting and HEAD has a working autofs/automountd port already

Another thing I’d do on a fresh install is installing Mozilla-signed certificates, otherwise SSL/TLS handshake on encrypted web/ftp pages, will always fail, as it will SSL fingerprint verification while sending mails through(E)SMTPS, fetching files from https mirrors with curl, wget, etc…, cloning/checking-out repos with git or svn respectively.

cd /usr/pkgsrc/security/mozilla-rootcerts
make install clean clean-depends
mozilla-rootcerts install


Ok! I forgot to mention mozilla-certificates…
Those are installed, though :roll_eyes:
As for hald… I’ll remove it and see what happens.
Automount is not something I care about, nothing to loose…
Nice to have you here my friend :hugs:


They’re pulled as dependencies by many packages, but it’s the user to actually put them in place by simply running mozilla-rootcerts install

By the way, it’s good to install sysutils/fam and enabling famd too


First post corrected following your suggestions, thanks!
Changes: removed hal and installed fam
Add a reference to mozilla-rootcerts, although I’ve choose to

pkgin install mozilla-rootcerts-openssl

instead of mozilla-rootcerts install, since this complained with WARNING /etc/openssl/openssl.conf could not be written to. Probably because it doesn’t exist :sweat_smile: Note that the certificates are installed anyway, these are just warnings and not errors.

Anyway, tested and working with git at least. Although, I ran into a strange issue here…

pkgin install git pulls in 27 packages that somehow are not marked as non-removable. If I issue pkgin autoremove it wants to remove 24 orphan dependencies, which obviously will render git unusable.
Wonder if I should report this somewhere… :thinking:

EDIT: Ok, it seams to be an inconsistence. pkgin install git installs 27 packages of which 24 are orphan and will be removed with pkgin autoremove. Why are these not marked as git dependencies? They were just pulled in by the git meta-package!!
Now, if one does pkgin install git-base it pulls a total of 21 packages, git-base itself and 20 dependency packages, and pkgin autoremove now does the correct thing and shows no orphan dependencies found.
The 6 packages missing, remember 21 packages are pulled by git-base and 27 by git, are tcl, tk, git-gitk, git-docs, git-contrib and git itself :open_mouth: …WTFt?! Also it pulls in 27 packages and removes 24, but the other 3 are not in the system anymore :open_mouth: :zipper_mouth_face:
Anyway, git-base has all you need, but I still find all this is a bit f***ed-up. Maybe I should report this at pkgsrc-users or maybe directly at

Wonder what’s best?! :thinking:


Try after doing " cd pkgsrc/pkgtools/pkgin && cvs up -rHEAD && make replace "


If I got it correctly, you mean replacing pkgin from 8.0 with pkgin from current using pkgsrc to fetch current through cvs?
Well, as my SSD is just 30Gb I haven’t set-up pkgsrc… that’s obviously not a problem cause I can manually edit /usr/pkg/etc/pkgin/repositories.conf to point at and run pkgin update && upgrade. In which case, I’ll be fetching directly from the main US repo. Things will be a bit slower, but still menageble.
I still believe this is a bug and I should report it somewhere!?
Or do you mean I should check this with current before filing an issue on github??


I meant check in with -current before reporting PR/issue :slight_smile:


:+1: Ok, will test current first.


Did -current pkgin solved it?


Sorry, didn’t have the time to try it yet :slightly_frowning_face:
I’ll post back as soon as I can, although it will most probably take a few days.

EDIT: I think I’ll leave it like that after all pkgin install git-base solved my issues. git is working as it should and I’ve just re-installed and got everything just as I wanted. Maybe I get back to this on the next release. Hope you understand…
Anyway, I’m on NetBSD to stay :wink: