divzeroweb

2f30.org website
git clone git://git.2f30.org/divzeroweb
Log | Files | Refs | README | LICENSE

commit 785c2a4a44ecd9f24cb47c8ec34e2340b9b5ca1a
parent 1ad8b1d518b22c3cad8ed227ed6a33680ae1d071
Author: sin <sin@2f30.org>
Date:   Mon,  1 Sep 2014 09:55:42 +0100

Add guide for installing NetBSD on Linode

Diffstat:
MMakefile | 3++-
Mguides.md | 1+
Aguides/netbsd-linode.md | 59+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -14,7 +14,8 @@ PAGES = $(MENUPAGES) \ guides/sunsparc.html \ guides/proxy.html \ guides/trunk.html \ - guides/ipsec.html + guides/ipsec.html \ + guides/netbsd-linode.html EXTRA = css divzerokey.png favicon.ico index.html \ lectures/resources diff --git a/guides.md b/guides.md @@ -7,3 +7,4 @@ Just some notes on various useful tasks. * [proxy](guides/proxy.html): Accessing firewalled services using PF on OpenBSD * [trunk](guides/trunk.html): Trunk failover setup on OpenBSD * [ipsec](guides/ipsec.html): Securing services with IPsec tunnels + * [netbsd-linode](guides/netbsd-linode.html): Installing NetBSD on Linode diff --git a/guides/netbsd-linode.md b/guides/netbsd-linode.md @@ -0,0 +1,59 @@ +### 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/sdb0`. 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. + +Cheers! + +sin@