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 https://www.netbsd.org/docs/guide/en/chap-inst.html following the steps from “The Guide”, https://www.netbsd.org/docs/guide/en/chap-exinst.html
Choose keyboard -> Install to hard disk -> Full installation -> Use the entire disk
Then set the sizes of the partitions. NetBSD installs software to
/usr should be the largest partition on the drive, this is my new partition scheme for the 30GB drive:
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
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
# 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:
rpcbind=YES dbus=YES famd=YES avahidaemon=YES
Add an user
useradd -g wheel -G users -s /bin/ksh -c "your real name" -m name passwd name
If you want to use
curl check if the
mozilla-rootcerts have already been pulled by another package, they should…
pkigin search mozilla-rootcerts
Now, either run
or as I did instead
pkgin install mozilla-rootcerts-openssl
Reboot, login as the new user and configure your stuff, like .xinitrc, .
If you need some clues have a look at my github repo, I’ve all my configuration files there, https://github.com/voidpin/awesome-wm-netbsd