Installing NetBSD from GNU/Linux

tested on ubuntu/bionic and slackware14.2

Introduction

fsck_ext2fs has been enhanced therefore this is now possible since netbsd-current Sun Mar 31 13:16:52 2019 UTC (revs 1.36 - 1.39)

The script has been tested against XEN/PV, XEN/HVM and bare-metal.

Requirements

See the Tracking Daily section on PXE // NetBSD for getting the necessary sets and kernels down there: /tftpboot/netbsd9/amd64/

Deploy

bare-metal

cd ~/

XEN PV or HVM

guest=nbsd
mkdir -p /data/guests/$guest/
cd /data/guests/$guest/
#xl des nbsd
#rm -f nbsd nbsd.sparse 

and prepare the script

wget http://pub.nethence.com/bin/netbsd.install.bash.txt
cp netbsd.install.bash.txt netbsd.install.bash
chmod +x netbsd.install.bash

point to either previously fetched current or release branch

vi netbsd.install.bash.txt

sets=/tftpboot/netbsd9/amd64/binary/sets
kernel=/tftpboot/netbsd9/amd64/binary/kernel

define network parameters that will be pushed into the guest image

#cat ~/.ssh/id_*.pub
cat > network.conf <<-EOF9
pubkey=""
#only one vnic defined, if you need xennet1, tune the guest config accordingly
netif=xennet0
host=$guest
ipmask=IP-ADDRESS/CIDR
#may be empty
gw=
dnses="208.67.222.222 208.67.222.222"
EOF9
vi network.conf

the script will mount and unmuont /mnt/ from either /dev/sda1

./netbsd.install.bash -h
#./netbsd.install.bash baremetal

or from <guest>.sparse

./netbsd.install.bash pv $guest
#./netbsd.install.bash hvm $guest

TODO

things to check

Resources

Partitioning

NetBSD

EXT2

GRUB

Troubleshooting


Nethence | Pub | Lab | Pbraun | SNE Russia | xhtml