netbsd install guide
most of this guide was taken from unitedbsd.com
first make sure your HDD is completely wiped of partitions. booting from a GParted live image is always a good idea.
download the latest daily build from nyftp.netbsd.org and choose the relevant *amd64-install.img.gz
once you have wiped your drive and booted from your install media: choose keyboard -> install to hard disk -> full installation -> use the entire disk.
partitions
use entire disk and default partition sizes. adjust swap to 4096mb. edit the start point of the MBR partition to 1024mb minimum for wear leveling and give it the name NetBSD.
enable wifi
complete the base install then enable wifi before configuring the system. ctrl+z gets you to a shell during install.
activate your wifi interface:
# ifconfig iwn0 up
configure /etc/rc.conf:
wpa_supplicant=YES
wpa_supplicant_flags="-B -D bsd -i iwn0 -c /etc/wpa_supplicant.conf"
dhcpcd=YES
dhcpcd_flags="-qM iwn0 -b"
edit /etc/wpa_supplicant.conf with your ssid and password, then start it:
# /etc/rc.d/wpa_supplicant start
exit back to sysinst with ctrl+d and choose auto configure iwn0.
after installing and rebooting, add /var and /usr to critical filesystems in /etc/rc.conf:
critical_filesystems_local="OPTIONAL:/var OPTIONAL:/usr"
system setup
set your mirror in /usr/pkg/etc/pkgin/repositories.conf:
ftp://ftp7.jp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/11.0_current/All
update and upgrade:
pkgin update
pkgin full-upgrade
pkgin autoremove
pkgin clean
install essential software:
doas pkgin install dbus fam tree doas vim psmisc gtar git-base mozilla-rootcerts mozilla-rootcerts-openssl intel-microcode-netbsd pkg_alternatives
copy startup files:
# 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/intel-microcode /etc/rc.d/
add to /etc/rc.conf:
hostname="<hostname>.local"
rpcbind=YES
dbus=YES
famd=YES
microcode=YES
reboot.
create a user
# useradd -g users -G wheel,operator,users -s /bin/ksh -c "your name" -m username
# passwd username
create /usr/pkg/etc/doas.conf:
permit :wheel
upgrading netbsd
refer to pin’s guide for full upgrade instructions.
for kernel-only upgrades, install sysupgrade from pkgsrc and add to /usr/pkg/etc/sysupgrade.conf:
ARCHIVE_EXTENSION=tar.xz
and to /etc/rc.conf:
ipv6addrctl=YES
ipv6addrctl_policy=ipv4_prefer
then:
# sysupgrade auto https://nyftp.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/amd64
for major version upgrades use sysinst instead — boot the install media and choose b: upgrade netbsd on a hard disk.
this guide is a wip — enjoy netbsd!