Updated guide: I’ve decided to do a fresh install of NetBSD 8.1 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
pkgin install spectrwm slock abiword gpicview galculator pcmanfm midori 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 gcc6-libs gnome-themes-standard gst-plugins1-bad-1.16.0 gst-plugins1-base-1.16.0 gst-plugins1-good-1.16.0 gst-plugins1-libav-1.16.0 gst-plugins1-oss-1.16.0 gst-plugins1-ugly-1.16.0 gst-plugins1-x264-1.16.0 gst-plugins1-vpx-1.16.0 mozilla-rootcerts-openssl
For my needs, I also install hunspell-sv_SE, but your needs maybe slightly different 😉
I use spectrwm, 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
Make sure your user name has been added to wheel (check /etc/group), if not, add it now.
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
Reboot, login as the new user and configure your stuff, like .xinitrc, .shrc,…
If you want to have a look at any particular configuration file, feel free to look at my git-repo
Next time you login, you can issue startx to launch the graphical environment on your install.
*Hewlett-Packard 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)