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 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 “The Guide”, https://www.netbsd.org/docs/guide/en/
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
pkgin and I’m currently pulling my packages from ftp.fr.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.0/All/
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 xcompmgr # pkgin install awesome abiword gimp galculator pcmanfm firefox-62 leafpad vim free tree scrot epdfview gnome-themes-standard gtk2-engines gtk2-engines-murrine mpv gtar htop # pkgin install cantarell-fonts dejavu-ttf liberation-ttf ubuntu-fonts git-base
awesome wm, but obviously you can replace it with whatever wm you prefer. Although, there’s nothing better than
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/famd /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
Uncomment the following line using
visudo to edit the
%wheel ALL=(ALL) ALL
To be able to reboot and shutdown your laptop/desktop without having to enter the
sudo password add the following to the file using
# Enable sudo for login 'name' name ALL=(ALL) NOPASSWD: /sbin/reboot, /sbin/poweroff, /sbin/shutdown
If you prefer, the same is possible to achieve by read drop-in files from
Now, if you want to use
curl check if the
mozilla-rootcerts have already been pulled by another package, they should have,
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
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
Next time you login, you can issue
startx to launch the graphical environment on your install.
For installation on UEFI systems, see NetBSD desktop Part 1: Manual NetBSD installation on GPT/UEFI
For WIFI set-up, see NetBSD desktop pt.2: Set up wireless networking on NetBSD with wpa_supplicant and dhcpcd
For firewall configuration, see NetBSD desktop pt.3: simple stateful firewall with NPF
For configuration/use of a DM, see NetBSD desktop pt.4: The X Display Manager (XDM)
For auto-mounting removable media, see NetBSD desktop pt.5: automounting with Berkeley am-utils