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:
- 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.
- 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/fstabmakes 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).
- Boot into Rescue mode with the Rescue disk first, Install disk second, etc.
mount /dev/sda /media/sdaand then
- Get the USB image,
wget --no-check-certificate https://cdn.netbsd.org/pub/NetBSD/NetBSD-7.1.1/images/NetBSD-7.1.1-amd64-install.img.gz.
gunzipit and copy to the install drive
dd if=NetBSD-7.1.1-amd64-install.img of=/dev/sdb.
- 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.
- For whatever reason it fails to automatically launch the install so login as
rootand then type
sysinstto run the installer.
- Go through the install, on the bootblocks screen accept default of “Use serial port com0” and then under “Set serial baud rate” select
115200for the baud rate.
- 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).
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:
- Still do the all the steps above as full virtualization (because the installer image expects that).
- Boot into the NetBSD configuration profile under full virtualization.
/etc/fstaband change the
- Change any interface references (e.g.
- Re-boot the NetBSD configuration using para-virtualization.
- 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: https://gnats.netbsd.org/52199 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
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.