[tlbuild] NetBSD help ...

Bruno Haible bruno at clisp.org
Tue Jan 23 11:58:01 CET 2024


Hi Norbert,

> I have FreeBSD running, but on NetBSD VMs there is no `pkg` nor
> `pkg_add` and I am slightly surprised. Is that on purpose to make
> software installation difficult?

A normal NetBSD installation does have a 'pkg_add' program available
to root (as /usr/sbin/pkg_add). Find below the recipe how I generate
e.g. a NetBSD 9.3/x86_64 VM.

Bruno

================================================================================
Download from https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.3/images/NetBSD-9.3-amd64.iso

Disk size: 8.3 GB

Create a GPT on the disk.
Set sizes of NetBSD partitions: 7.3 GB (7475 MB) /, 1 GB (1024 MB) swap, the others to 0
Installation without X11

Configure network:
  Autoconfigure =>
    DNS domain: WRONG_DOMAIN_NAME
    Host name: localhost
    Nameserver: 10.0.2.3
    Primary interface: wm0
    Media type: autoselect
    Host IP: 10.0.2.15
    Netmask: 255.255.255.0
    IPv4 gateway: 10.0.2.2
  OK? No
    Host name: netbsd93
    DNS domain: MY_DOMAIN_NAME
    Nameserver: other -> 10.0.2.3
  Everything OK.
Timezone: Europe/Berlin
Root password: ********
Enable sshd: YES
Enable ntpd: YES
Add a user:
  login: MY_USER_NAME
  password: ********

Reboot. Eject CD.

Verify that /etc/rc.conf contains
dhcpcd=YES
dhcpcd_flags="-qM wm0"
(Otherwise DNS access won't work.)

Install some packages.
List is at http://www.pkgsrc.se/
and http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/9.3/All/
See https://www.netbsd.org/docs/guide/en/netbsd.html#chap-boot-pkgsrc
# chmod 644 .cshrc .profile
Edit ~/.profile to define PKG_PATH:
  export PKG_PATH=http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/`uname -m`/9.3/All
Logout.

# pkg_add bash
# pkg_add gmake
# pkg_add vim
# pkg_add emacs-nox11

Edit /etc/passwd, to give me the shell /usr/pkg/bin/bash

Install other packages:
# pkg_add boehm-gc
# pkg_add readline
# pkg_add dejagnu





More information about the tlbuild mailing list.