In a way this really doesn’t need a blog post. It’s not as fiddly as XEN was and if you are willing to just do everything through Glish it pretty much just proceeds as expected. But my concern was having to be reliant on Glish as until recently it didn’t work on NetBSD Firefox (does now) and connecting via lish would give you a blank screen (not fun). But you can get both to work:

  1. Create three disks, 1x 1024 MB (ext) called “Rescue”, 1x 1024 MB (raw) called “Install” and 1x the remainder (raw) called “NetBSD”. An extra Rescue disk is required owing to the size of the image and unzipping it.
  2. Create a two configuration profiles, use Direct Disk, Full Virtualisation and turn off the FileSystem/Boot helpers. One has the NetBSD and Install disks mounted and is to boot from the Install disk in order to install to the NetBSD drive. When setting this up pick the NetBSD disk as sda, the Install disk as sdb and (obviously) the boot device as sdb - doing this just makes sure the /etc/fstab makes sense when it comes to actually booting NetBSD. The second profile is the final one which just boots NetBSD (and so has that disk as sda).
  3. Boot into Rescue mode with the Rescue disk first, Install disk second, etc.
  4. mount /dev/sda /media/sda and then cd /media/sda.
  5. Get the USB image, wget --no-check-certificate
  6. gunzip it and copy to the install drive dd if=NetBSD-7.1.1-amd64-install.img of=/dev/sdb.
  7. Boot the install configuration and within 30 seconds get the lish console open and press space to drop out of menu. Select 4 for the boot prompt, enter consdev auto, then menu, then press enter to boot; If you want to read about consdev it’s in man 8 boot_console.
  8. For whatever reason* it fails to automatically launch the install so login as root and then type sysinst to run the installer.
  9. Go through the install, on the bootblocks screen accept default of “Use serial port com0” and then under “Set serial baud rate” select 115200 for the baud rate.
  10. Shutdown the install configuration and then boot the NetBSD one. Hey presto! Glish and Lish work (maybe, but if not at least Lish works which is more useful than Glish).

* - The USB image expects the root device to be sd0a whereas on Linode it’ll be something like wd0a (depending on which device you have selected to boot from, etc). That’s why it dumps you into single user. You can login as root and do a mount /dev/wd0a / and then you can edit fstab with write access and make the same changes. Then if you reboot the install configuration it should actually start up sysinst automatically.

I still haven’t converted my XEN install to KVM yet though, but might soon

[EDIT: 2017-06-26] Wow, if you want to play with NetBSD 8.0 Beta then you might as well double the Rescue and Install images.

[EDIT: 2018-01-23] If you want to be able to use para-virtualization then you need to do:

  1. Still do the all the steps above as full virtualization (because the installer image expects that).
  2. Boot into the NetBSD configuration profile under full virtualization.
  3. Edit /etc/fstab and change the wd0 references to sd0.
  4. Change any interface references (e.g. dhcpcd in rc.conf) from wm0 to vioif0.
  5. Re-boot the NetBSD configuration using para-virtualization.
  6. I think that’s all that is required.

I even spelt virtualization the American way

[EDIT: 2018-01-25] JESUS CHRIST! DON’T RUN AS PARA-VIRTUALISED ON LINODE: I got that exactly (“adapter resource shortage” and “generic hba error” and instant shutdown).

[EDIT: 2018-02-18] Clarified the disk order when installing (after I forgot); Use --no-check-certificate with wget; Mention that Glish and Lish might not work - fuck knows what the deal is post-Meltdown with Linode, but it’s made things strange.

[EDIT: 2020-02-14] Latest disk sizes are 3GB for rescue, 2GB for install. Added the footnote for the reason for the sysinst launch failure.

[EDIT: 2020-02-15] And I should have updated ages ago, but para-virtualisation is fine since NetBSD 8; I am still on full though; Change slowly.