Installing NetBSD on Linode

In this short guide I will show you how to install NetBSD amd64 6.1.4 on a Linode VPS. First you will have to create a 64MB ext3 disk image to hold the DomU kernels. Create a second raw disk image to be used as your NetBSD root partition.

Prepare to reboot into rescue mode and allocate the kernel disk accordingly:

/dev/xvda: kernel # your small ext3 disk image

Now boot into Finnix and copy the DomU kernel images:

# mkfs.ext3 /dev/xvda
# mount /dev/xvda /mnt
# curl -O ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.4/amd64/binary/kernel/netbsd-INSTALL_XEN3_DOMU.gz
# curl -O ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.4/amd64/binary/kernel/netbsd-XEN3_DOMU.gz
# gzip -d netbsd-INSTALL_XEN3_DOMU.gz
# gzip -d netbsd-XEN3_DOMU.gz
# mv netbsd-INSTALL_XEN3_DOMU /mnt/kernel-install
# mv netbsd-XEN3_DOMU /mnt/kernel
# umount /mnt

Once that's done, you can shutdown Finnix.

Create a new configuration profile, call it NetBSD select the pv-grub-x86_64 kernel. Allocate the disks as shown below:

/dev/xvda: root   # your rootfs disk image
/dev/xvdb: kernel # the kernel disk image

Set the root device to /dev/xvda.

Boot your new configuration profile. You will be presented with a a pv-grub command line. Boot into your NetBSD DomU install kernel:

grubdom> kernel (hd1)/kernel-install
grubdom> boot

Install NetBSD as usual and choose the target disk to be /dev/xbd0. Once you are done, shutdown the machine.

Reboot your configuration profile and select the NetBSD DomU kernel.

grubdom> kernel (hd1)/kernel
grubdom> boot

You should be presented with the login prompt.

At this point, you may consider mounting the kernel disk under /extboot. You should also be able to set up a GRUB configuration file to allow the system to boot without human intervention.