Updated guide (2019-11-13): I’ve decided to do a fresh install of NetBSD-8.1_STABLE on my laptop.
When I installed NetBSD for the first time, I remember I’d to collect bits and pieces of information 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 8GB of RAM.
How large should the hard drive be?
Looking on the web and asking a few questions, I concluded 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.1_STABLE from an usb, as described in, 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 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 a European pkgin mirror
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.
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 doas dbus fam spectrwm slock abiword galculator pcmanfm firefox leafpad vim scrot epdfview gnome-themes-standard gtk2-engines gtk2-engines-murrine gtar xz cantarell-fonts dejavu-ttf liberation-ttf ubuntu-fonts git-base desktop-file-utils feh mozilla-rootcerts-openssl
For my needs, I also install
hunspell-sv_SE, but your needs may be slightly different 😉
I use spectrwm, but obviously, you can replace it with whatever wm you prefer.
Next 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/
Add these to
/etc/rc.conf with the following:
If, like me, you have an Intel processor and would like to have the microcode updated, remember Meltdown and Spectre?!
Install the intel-microcode package,
# pkgin install intel-microcode-netbsd
copy the start-up script to
# cp /usr/pkg/share/examples/rc.d/intel-microcode /etc/rc.d/
rc.conf and reboot.
Add an user
# useradd -g wheel -G users -s /bin/ksh -c "your real name" -m user_name
# passwd user_name
Make sure your user_name has been added to wheel (check
/etc/group). If not, add it now.
/usr/pkg/etc/docs.conf file according to your needs.
Here's mine as an example,
permit nopass user_name cmd reboot
permit nopass user_name cmd shutdown
Reboot, login as the new user and configure your stuff, things like
If you want to have a look at any particular configuration file, feel free to go through my git-repo
Next time you login, you can issue startx to launch the graphical environment on your install.
*HP ProBook 6460b (A0001D02)
$ sysctl hw.machine_arch hw.model hw.ncpu hw.usermem64
hw.machine_arch = x86_64
hw.model = Intel 686-class
hw.ncpu = 4
hw.usermem64 = 8480997376
$ pcictl pci0 list
000:00:0: Intel Sandy Bridge (mobile) Host Bridge (host bridge, revision 0x09)
000:02:0: Intel Sandy Bridge (mobile) GT2+ Integrated Graphics Device (VGA display, revision 0x09)
000:22:0: Intel 6 Series Chipset Family MEI (miscellaneous communications, revision 0x04)
000:25:0: Intel 82579LM Gigabit Network Connection (ethernet network, revision 0x04)
000:26:0: Intel 6 Series Chipset Family USB (USB serial bus, EHCI, revision 0x04)
000:27:0: Intel 6 Series Chipset Family HD Audio (mixed mode multimedia, revision 0x04)
000:28:0: Intel 6 Series Chipset Family PCIe Root Port 1 (PCI bridge, revision 0xb4)
000:28:1: Intel 6 Series Chipset Family PCIe Root Port 2 (PCI bridge, revision 0xb4)
000:28:2: Intel 6 Series Chipset Family PCIe Root Port 3 (PCI bridge, revision 0xb4)
000:28:3: Intel 6 Series Chipset Family PCIe Root Port 4 (PCI bridge, revision 0xb4)
000:29:0: Intel 6 Series Chipset Family USB (USB serial bus, EHCI, revision 0x04)
000:31:0: Intel HM65 LPC (ISA bridge, revision 0x04)
000:31:2: Intel 6 Series Chipset Family AHCI 2 (SATA mass storage, AHCI 1.0, revision 0x04)
035:00:0: JMicron Technology JMB38X IEEE 1394 Host Controller (IEEE1394 serial bus, OpenHCI, revision 0x30)
035:00:1: JMicron Technology JMB388 SD/MMC Host Controller (miscellaneous system, revision 0x30)
035:00:2: JMicron Technology JMB388 SD Host Controller (SD Host Controller system, interface 0x01, revision 0x30)
036:00:0: Intel Centrino Advanced-N 6205 WiFi (miscellaneous network, revision 0x34)