As I was not happy with the sizes of my partitions and had nothing to lose, 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 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.0 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/pkg, so /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 sudo dbus fam avahi xcompmgr
pkgin install awesome abiword gpicview galculator pcmanfm firefox leafpad vim free tree scrot epdfview gnome-themes-standard gtk2-engines gtk2-engines-murrine mpv gtar xz cantarell-fonts dejavu-ttf liberation-ttf ubuntu-fonts git-base
I use awesome wm, but obviously, you can replace it with whatever wm you prefer. 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/famd /etc/rc.d/
cp /usr/pkg/share/examples/rc.d/avahidaemon /etc/rc.d/
Add these to /etc/rc.conf with the following:
Add an user
useradd -g wheel -G users -s /bin/ksh -c "your real name" -m name
Uncomment the following line using visudo to edit the sudoers file.
%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 visudo
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 /usr/pkg/etc/sudoers.d
Now, if you want to use git, wget and 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 .xinitrc, .shrc,…
If you need some clues have a look at my git-repo, I’ve all my configuration files there.
Next time you login, you can issue startx to launch the graphical environment on your install.
Here's how my set-up looks like using the equilux theme and the Orange-Maia icons
*Hewlett-Packard HP ProBook 6460b (A0001D02)
pin@awesome-netbsd ~$ 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
pin@awesome-netbsd ~$ uname -a
NetBSD awesome-netbsd 8.0 NetBSD 8.0 (GENERIC) #0: Tue Jul 17 14:59:51 UTC 2018
pin@awesome-netbsd ~$ 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: Broadcom BCM4727 802.11b/g/n (miscellaneous network, revision 0x01)