Installing NetBSD from GNU/Linux

tested on ubuntu/bionic and slackware14.2

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.

mkdir -p /data/kernels/netbsd
cd /data/kernels/netbsd
source=http://ftp.fr.netbsd.org/pub/NetBSD-daily/netbsd-9/201909190800Z/amd64
for set in kern-GENERIC modules base comp debug etc man misc tests text; do
       echo -n fetching binary/sets/$set.tar.xz...
       wget -q $source/binary/sets/$set.tar.xz && echo done
done; unset set
wget $source/binary/kernel/netbsd-INSTALL.gz
wget $source/binary/kernel/netbsd-INSTALL_XEN3_DOMU.gz
wget $source/binary/kernel/netbsd-XEN3_DOMU.gz

XEN PV or HVM

guest=malabar
mkdir -p /data/guests/$guest/
cd /data/guests/$guest/

bare-metal

cd ~/

and proceed with the script (eventually fix the sets variable to point to either previously fetched current or release). the script will mount and unmuont /dev/sda1 versus <guest>.sparse on /mnt/.

wget http://pub.nethence.com/bin/netbsd.install.bash
chmod +x netbsd.install.bash
vi network.conf

pubkey=""
#only one vnic defined
netif=xennet0
host=
ipmask=IP-ADDRESS/CIDR
#may be empty
gw=
dnses="208.67.222.222 208.67.222.222"

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

TODO things to check

Resources

Partitioning

NetBSD

EXT2

GRUB

Troubleshooting


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