Skip to content

NetBSD 9.2 install guide

Remy van Elst edited this page Aug 27, 2021 · 4 revisions

netbsd-axpbox-3.png

Neofetch running on NetBSD inside AXPbox

This is a guide on installing and running NetBSD 9.2. It also includes a guide on how to install packages without networking available.

Remy has a more blogpost-style guide on his website, this wiki article is focused just on the installation.

This guide does not cover X11 / GUI, since there is no networking available. With networking enabled, NetBSD panics on boot. No networking means that you cannot SSH into the machine and use X11 forwarding. I did also try the AXPbox VGA console but as you might have guessed, that crashed NetBSD.

Package installation is a bit difficult as well since there is no networking. However, we can work around that by downloading the package files and creating an ISO file, which can be mounted inside NetBSD. Poor mans file transfer, but that way I was able to get sysbench installed.

Compiling and configuring AXPbox

Make sure you have git and a development environment installed. For Ubuntu:

apt install build-essential git

Clone the AXPbox git repository:

git clone https://github.com/lenticularis39/axpbox.git

You can also use one of the pre-built release versions, as of writing 1.1.0 is the latest. If you do that, skip the build process and continue to the configuration section.

Create a build folder and compile AXPbox:

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE="Release" 
make -j$(($(nproc) + 1))

In your build folder there should now be a binary named AXPbox:

./axpbox 
AXPBox Alpha Emulator (commit cba974cdfa4d2b8a459e7c1eb1943fff8b514a09)
Usage: ../build/axpbox run|configure <options>

Create a netbsd folder where the config, ISO and disk are. Not really required, but I like to keep my virtualized configs seperated:

mkdir netbsd
cd netbsd

Create a folder for the ROM file, which AXPbox needs to boot:

mkdir rom
cd rom

Download the SRM rom file:

wget https://raymii.org/s/inc/downloads/es40-srmon/cl67srmrom.exe
cd ..

Add the config file for AXPbox. Create or edit es40.cfg:

vim es40.cfg

Paste the following contents:

sys0 = tsunami
{
  memory.bits = 29;
  rom.srm = "rom/cl67srmrom.exe";
  rom.decompressed = "rom/decompressed.rom";
  rom.flash = "rom/flash.rom";
  rom.dpr = "rom/dpr.rom";

  cpu0 = ev68cb
  {
    speed = 1800M;
    icache = false;
    skip_memtest_hack = true;
  }

  serial0 = serial
  {
    port = 21264;
    action = "";
  }

  pci0.15 = ali_ide
  {
  }

  pci0.1 = sym53c810
  {
    disk0.0 = file
    {
      file = "disk.img";
      cdrom = false;
      read_only = false;
    }

    disk0.1 = file
    {
      file = "netbsd.iso"; 
      cdrom = true;
      read_only = true;
    }
  }

  pci0.7 = ali
  {
    mouse.enabled = false;
    vga_console = false;
  }
}

Create an empty disk file where you will install NetBSD on to:

truncate -s 20G disk.img

I've used 20 GB as size, but less than that will work fine as well. I think you need 1.5GB for a full NetBSD installation.

Installing NetBSD inside AXPbox

Before we can install NetBSD, we need to download the ISO file. I'm using the latest current ISO because that was what the QEMU article used, 9.2 should work just as well.

Check the following directory for the current version of the latest current ISO, in my case NetBSD-9.99.88-alpha.iso. Download the ISO:

wget -O netbsd.iso https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/images/NetBSD-9.99.88-alpha.iso

Note: If the version number changed, the above command will return a 404 error and you must specify the new URL yourself.

More information on how the current (development/daily) builds work can be found here on the NetBSD site.

Once the ISO is downloaded, you can start AXPbox. Make sure you're in the same folder as the es40.cfg file and the NetBSD ISO. In my case AXPbox is in the ../build folder, if yours is somewhere else, adapt the commands accordingly.

../build/axpbox run

Output:

sys0(tsunami): $Id: System.cpp,v 1.79 2008/06/12 07:29:44 iamcamiel Exp $
%FLS-F-NOREST: Flash could not be restored from rom/flash.rom
sys0(tsunami): $Id: Flash.cpp,v 1.19 2008/03/24 22:11:50 iamcamiel Exp $
pci0.1(sym53c810).disk0.0(file): Mounted file disk.img, 10485760 512-byte blocks, 16384/16/40.
pci0.1(sym53c810).disk0.1(file): Mounted file netbsd.iso, 168005 2048-byte blocks, 33601/5/1.
dma: $Id: DMA.cpp,v 1.9 2008/04/29 09:24:52 iamcamiel Exp $
%DPR-F-NOREST: DPR could not be restored from rom/dpr.rom
sys0(tsunami): $Id: DPR.cpp,v 1.23 2008/06/12 07:29:44 iamcamiel Exp $
cpu0(ev68cb)(0): $Id: AlphaCPU.cpp,v 1.82 2009/03/16 01:33:27 iamcamiel Exp $
serial0(serial): Waiting for connection on port 21264.

Open another terminal and connect to the emulator, after which it will continue booting:

telnet 127.0.0.1 21264

Output:

Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
This is serial port #0 on ES40 Emulator

A bunch of output appears which is all part of the emulator startup sequence, no NetBSD yet:

OpenVMS PALcode V1.98-104, Tru64 UNIX PALcode V1.92-105

starting console on CPU 0
initialized idle PCB
initializing semaphores
initializing heap
initial heap 240c0
memory low limit = 1b0000 heap = 240c0, 17fc0
initializing driver structures
initializing idle process PID
initializing file system
initializing hardware
initializing timer data structures
lowering IPL
CPU 0 speed is 1786 MHz
create dead_eater
create poll
create timer
create powerup
access NVRAM
Memory size 512 MB
testing memory
..
probe I/O subsystem
probing hose 1, PCI
probing hose 0, PCI
probing PCI-to-ISA bridge, bus 1
bus 0, slot 1 -- pka -- NCR 53C810
bus 0, slot 15 -- dqa -- Acer Labs M1543C IDE
bus 0, slot 15 -- dqb -- Acer Labs M1543C IDE
starting drivers
entering idle loop
*** system serial number not set. use set sys_serial_num command.
Partition 0, Memory base: 000000000, size: 020000000
initializing GCT/FRU at 1c8000
Initializing pka ewa dqa dqb 
Memory Testing and Configuration Status
  Array       Size       Base Address    Intlv Mode
---------  ----------  ----------------  ----------
    0        512Mb     0000000000000000    4-Way

     512 MB of System Memory
Testing the System
Testing the Disks (read only)
Testing the Network
AlphaServer ES40 Console V7.3-1, built on Feb 27 2007 at 12:57:47


P00>>>

Once you see the P00>>> prompt, the fist part of the boot process is finished. Enter the command show dev to see which devices are available:

P00>>>sho de

Output:

dka0.0.0.1.0               DKA0                           RZ58  2000
dka100.1.0.1.0             DKA100                        RRD42  4.5d
ewa0.0.0.4.0               EWA0              08-00-DE-AD-BE-EF
dva0.0.0.1000.0            DVA0                               
pka0.7.0.1.0               PKA0                  SCSI Bus ID 7

Enter the command boot dka100 to boot from the CDROM drive (with the NetBSD iso):

P00>>>boot dka100

Output:

(boot dka100.1.0.1.0 -flags 0)
block 0 of dka100.1.0.1.0 is a valid boot block
reading 13 blocks from dka100.1.0.1.0
bootstrap code read in
base = 200000, image_start = 0, image_bytes = 1a00(6656)
initializing HWRPB at 2000
initializing page table at 1ff56000
initializing machine state
setting affinity to the primary CPU
jumping to bootstrap code

NetBSD/alpha 9.99.88 ISO 9660 Primary Bootstrap
Jumping to entry point...

NetBSD/alpha 9.99.88 Secondary Bootstrap, Revision 1.13 (Sun Aug 15 22:22:52 UTC 2021)

VMS PAL rev: 0x4006800010162
OSF PAL rev: 0x400690002015c
Switch to OSF PAL code succeeded.

Boot flags: 0
11177040+185104=0xad6560

Yay! NetBSD is booting! The boot process continues until it stops and asks you what terminal you have:

Entering netbsd at 0xfffffc0000a01410...
[   1.0000000] Unrecognized boot flag '0'.
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[   1.0000000]     2018, 2019, 2020, 2021 The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 9.99.88 (INSTALL) #0: Sun Aug 15 22:22:52 UTC 2021
[   1.0000000]  [email protected]:/usr/src/sys/arch/alpha/compile/INSTALL
[   1.0000000] AlphaServer ES40, 1785MHz, s/n 
[   1.0000000] 8192 byte page size, 1 processor.
[   1.0000000] total memory = 512 MB
[   1.0000000] (2736 KB reserved for PROM, 509 MB used by NetBSD)
[   1.0000000] avail memory = 491 MB
[   1.0000000] mainbus0 (root)
[   1.0000000] cpu0 at mainbus0: ID 0 (primary), 21264C-6 (EV68CB)
[   1.0000000] cpu0: Architecture extensions: 0x1305<PMI,PAT,MVI,CIX,BWX>
[   1.0000000] tsc0 at mainbus0: 21272 Core Logic Chipset, Cchip rev 0
[   1.0000000] tsc0: 8 Dchips, 2 memory buses of 16 bytes
[   1.0000000] tsc0: arrays present: 512MB, 0MB, 0MB, 0MB, Dchip 0 rev 1
[   1.0000000] tsp0 at tsc0
[   1.0000000] pci0 at tsp0 bus 0
[   1.0000000] siop0 at pci0 dev 1 function 0: Symbios Logic 53c810 (fast scsi)
[   1.0000000] siop0: interrupting at dec 6600 irq 8
[   1.0000000] scsibus0 at siop0: 8 targets, 8 luns per target
[   1.0000000] tlp0 at pci0 dev 4 function 0: DECchip 21143 Ethernet, pass 3.0
[   1.0000000] tlp0: interrupting at dec 6600 irq 20
[   1.0000000] tlp0: Ethernet address 08:00:de:ad:be:ef
[   1.0000000] tlp0: 100baseTX, 10baseT, auto
[   1.0000000] sio0 at pci0 dev 7 function 0: vendor 10b9 product 1533 (rev. 0xc3)
[   1.0000000] aceride0 at pci0 dev 15 function 0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc1)
[   1.0000000] aceride0: primary channel interrupting at isa irq 14
[   1.0000000] atabus0 at aceride0 channel 0
[   1.0000000] aceride0: secondary channel interrupting at isa irq 15
[   1.0000000] atabus1 at aceride0 channel 1
[   1.0000000] isa0 at sio0
[   1.0000000] lpt0 at isa0 port 0x3bc-0x3bf irq 7
[   1.0000000] com0 at isa0 port 0x3f8-0x3ff irq 4: ns8250 or ns16450, no fifo
[   1.0000000] com0: console
[   1.0000000] pckbc0 at isa0 port 0x60-0x64
[   1.0000000] pckbd0 at pckbc0 (kbd slot)
[   1.0000000] pckbc0: using irq 1 for kbd slot
[   1.0000000] wskbd0 at pckbd0 (mux ignored)
[   1.0000000] pms0 at pckbc0 (aux slot)
[   1.0000000] pckbc0: using irq 12 for aux slot
[   1.0000000] wsmouse0 at pms0 (mux ignored)
[   1.0000000] mcclock0 at isa0 port 0x70-0x71: mc146818 compatible time-of-day clock
[   1.0000000] tsp1 at tsc0
[   1.0000000] pci1 at tsp1 bus 0
[   1.0000000] tsciic at tsc0
[   1.0000000]  not configured
[   1.0000000] entropy: WARNING: extracting entropy too early
[   1.0083909] scsibus0: waiting 2 seconds for devices to settle...
[   3.1186893] sd0 at scsibus0 target 0 lun 0: <DEC, RZ58     (C) DEC, 2000> disk fixed
[   3.1227910] sd0: 20480 MB, 65536 cyl, 16 head, 40 sec, 512 bytes/sect x 41943040 sectors
[   3.1258816] sd0: async, 8-bit transfers
[   3.1289436] cd0 at scsibus0 target 1 lun 0: <DEC, RRD42   (C) DEC, 4.5d> cdrom removable
[   3.1310198] cd0: async, 8-bit transfers
[   3.1576555] root on md0a dumps on md0b
[   3.1607318] root file system type: ffs
[   3.1621352] kern.module.path=/stand/alpha/9.99.88/modules
Terminal type? [vt100] 

Press RETURN to accept the default terminal type. The next thing you should see is the menu driven installer:

 NetBSD/alpha 9.99.88

 This menu-driven tool is designed to help you install NetBSD to a hard disk,
 or upgrade an existing NetBSD system, with a minimum of work.
 In the following menus type the reference letter (a, b, c, ...) to select an
 item, or type CTRL+N/CTRL+P to select the next/previous item.
 The arrow keys and Page-up/Page-down may also work.
 Activate the current selection from the menu by typing the enter key.
 


                ┌─────────────────────────────────────────────┐
                │>a: Installation messages in English         │
                │ b: Messages d'installation en fran�ais      │
                │ c: Installation auf Deutsch                 │
                │ d: Komunikaty instalacyjne w jezyku polskim │
                │ e: Mensajes de instalacion en castellano    │
                └─────────────────────────────────────────────┘

I'm not going to cover the entire installation process, that would give an enormous amount of output. It's a minimal install with default partitioning. No network configured, no X11.

I'll highlight the steps with some output, but the installer is so straight forward that you should be able to figure it out.

Select >a: Install NetBSD to hard disk to continue.

Choose the only available disk (sd0):

On which disk do you want to install NetBSD?

                      ┌──────────────────────────┐
                      │ Available disks          │
                      │                          │
                      │>a: sd0 (20.0G)           │
                      │ b: Extended partitioning │                          
                      │ x: Exit                  │
                      └──────────────────────────┘

Select the default partitioning:

 You can use a simple editor to set the sizes of the NetBSD partitions, or
 apply the default partition sizes and contents.

 You will then be given the opportunity to change any of the partition
 details.                 
                          
 The NetBSD (or free) part of your disk (sd0) is 20G.
                          
 A full installation requires at least 1156M without X and at least 1456M if
 the X sets are included. 

                     ┌───────────────────────────────────┐
                     │ What would you like to do?        │
                     │                                   │
                     │ a: Set sizes of NetBSD partitions │
                     │>b: Use default partition sizes    │
                     │ x: Cancel                         │
                     └───────────────────────────────────┘

Review the options and select OK:

 We now have your disklabel partitions for sd0 below.  This is your last  
 chance to change them.

 Flags: (I)nstall, (N)ewfs.  Total size: 20G, free: 0B
 
     Start (sec)    End (sec)   Size (sec)  FS type Flag Filesystem
    ------------ ------------ ------------ -------- ---- ----------------
 a:            0     41680895     41680896   4.2BSD IN   /
 b:     41680896     41943039       262144     swap
 c:            0     41943039     41943040 Whole disk
    ------------ ------------ ------------ -------- ---- ----------------
 e: Change input units (sectors/cylinders/MB/GB)
 f: Edit name of the disk
 g: Clone external partition(s)
 h: Cancel           
>x: Partition sizes ok

The installer will now format and partition the disk, output looks like this:

    Status: Running
    Command: /sbin/newfs -V2 -O 1  /dev/rsd0a

────────────────────────────────────────────────────────────────────────────────
/dev/rsd0a: 428.0MB (876544 sectors) block size 8192, fragment size 1024}
        using 10 cylinder groups of 42.80MB, 5479 blks, 10624 inodes.
.......................................

Select the Minimal Installation option. The Install From location is CD-ROM / DVD.

The installer will show the progress of the installation:

    Status: Running
    Command: progress -zf /mnt2//alpha/binary/sets/kern-GENERIC.tgz tar --chroot -xpf -
                                                                                   
    ────────────────────────────────────────────────────────────────────────────────
     15% |*****                              |  2240 KiB  743.71 KiB/s    00:15 ETA

Once prompted Hit ENTER to continue, do so. The basic installation is complete and you can now configure a few options.

Leave all the options on their default. If you want you can set a root password.

 Configure the additional items as needed.

                                                                               
>a: Configure network                                  configure 
 b: Timezone                                           UTC
 c: Root shell                                         /bin/sh
 d: Change root password                               ***EMPTY***
 e: Enable installation of binary packages             install
 f: Fetch and unpack pkgsrc                            install
 g: Enable sshd                                        NO
 h: Enable ntpd                                        NO
 i: Run ntpdate at boot                                NO
 j: Enable mdnsd                                       NO
 k: Enable xdm                                         NO
 l: Enable cgd                                         YES
 m: Enable lvm                                         NO
 n: Enable raidframe                                   YES
 o: Add a user
 x: Finished configuring

Choose x: Finished configuring, press ENTER a few more times and exit the installer. Shutdown the system with the command shutdown -h now and in your other terminal, where AXPbox runs, exit that by pressing CTRL+C.

The installation is now finished.

NetBSD startup

Fire up AXPbox again and open a telnet session in another terminal, just as you did when installing NetBSD. There are two things different as to when installing, the first is setting a boot flag to boot in to multiuser mode and the second is a different boot device.

The SRM firmware has the concept of boot flags, which are different for each type of operating system. For Tru64 (unix) and thus for NetBSD, by default the system will boot to single user mode, unless we give it a specific flag.

On the P00>>> prompt, enter the following command:

P00>>>set boot_osflags a

You only need to do this once. Next time you fire up AXPbox, the flag will be remembered.

Boot from the freshly installed NetBSD disk:

P00>>>boot dka0

Output:

(boot dka0.0.0.1.0 -flags a)
block 0 of dka0.0.0.1.0 is a valid boot block
reading 13 blocks from dka0.0.0.1.0
bootstrap code read in
base = 200000, image_start = 0, image_bytes = 1a00(6656)
initializing HWRPB at 2000
initializing page table at 1ff56000
initializing machine state
setting affinity to the primary CPU
jumping to bootstrap code

NetBSD/alpha 9.99.88 FFS Primary Bootstrap
Jumping to entry point...

NetBSD/alpha 9.99.88 Secondary Bootstrap, Revision 1.13 (Sun Aug 15 22:22:52 UTC 2021)

VMS PAL rev: 0x4006800010162
OSF PAL rev: 0x400690002015c
Switch to OSF PAL code succeeded.

Boot flags: a
13164432+233872 [645360+419227]=0xdcb718

Entering netbsd at 0xfffffc0000a014b0...
[   1.0000000] consinit: not using prom console
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
[   1.0000000]     2018, 2019, 2020, 2021 The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 9.99.88 (GENERIC) #0: Sun Aug 15 22:22:52 UTC 2021
[   1.0000000]  [email protected]:/usr/src/sys/arch/alpha/compile/GENERIC
[   1.0000000] AlphaServer ES40, 1785MHz, s/n 
[   1.0000000] 8192 byte page size, 1 processor.
[   1.0000000] total memory = 512 MB
[   1.0000000] (2736 KB reserved for PROM, 509 MB used by NetBSD)
[   1.0000000] avail memory = 488 MB
[   1.0000000] mainbus0 (root)
[   1.0000000] cpu0 at mainbus0: ID 0 (primary), 21264C-6 (EV68CB)
[   1.0000000] cpu0: Architecture extensions: 0x1305<PMI,PAT,MVI,CIX,BWX>
[   1.0000000] tsc0 at mainbus0: 21272 Core Logic Chipset, Cchip rev 0
[   1.0000000] tsc0: 8 Dchips, 2 memory buses of 16 bytes
[   1.0000000] tsc0: arrays present: 512MB, 0MB, 0MB, 0MB, Dchip 0 rev 1
[   1.0000000] tsp0 at tsc0
[   1.0000000] pci0 at tsp0 bus 0
[   1.0000000] siop0 at pci0 dev 1 function 0: Symbios Logic 53c810 (fast scsi)
[   1.0000000] siop0: interrupting at dec 6600 irq 8
[   1.0000000] scsibus0 at siop0: 8 targets, 8 luns per target
[   1.0000000] sio0 at pci0 dev 7 function 0: Acer Labs M1533 PCI-ISA Bridge (rev. 0xc3)
[   1.0000000] aceride0 at pci0 dev 15 function 0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc1)
[   1.0000000] aceride0: primary channel interrupting at isa irq 14
[   1.0000000] atabus0 at aceride0 channel 0
[   1.0000000] aceride0: secondary channel interrupting at isa irq 15
[   1.0000000] atabus1 at aceride0 channel 1
[   1.0000000] isa0 at sio0
[   1.0000000] lpt0 at isa0 port 0x3bc-0x3bf irq 7
[   1.0000000] com0 at isa0 port 0x3f8-0x3ff irq 4: ns8250 or ns16450, no fifo
[   1.0000000] com0: console
[   1.0000000] pckbc0 at isa0 port 0x60-0x64
[   1.0000000] pckbd0 at pckbc0 (kbd slot)
[   1.0000000] pckbc0: using irq 1 for kbd slot
[   1.0000000] wskbd0 at pckbd0 mux 1
[   1.0000000] pms0 at pckbc0 (aux slot)
[   1.0000000] pckbc0: using irq 12 for aux slot
[   1.0000000] wsmouse0 at pms0 mux 0
[   1.0000000] attimer0 at isa0 port 0x40-0x43
[   1.0000000] pcppi0 at isa0 port 0x61
[   1.0000000] spkr0 at pcppi0: PC Speaker
[   1.0000000] wsbell at spkr0 not configured
[   1.0000000] midi0 at pcppi0: PC speaker
[   1.0000000] isabeep0 at pcppi0
[   1.0000000] mcclock0 at isa0 port 0x70-0x71: mc146818 compatible time-of-day clock
[   1.0000000] attimer0: attached to pcppi0
[   1.0000000] tsp1 at tsc0
[   1.0000000] pci1 at tsp1 bus 0
[   1.0000000] tsciic0 at tsc0
[   1.0000000] iic0 at tsciic0: I2C bus
[   1.0000000] entropy: WARNING: extracting entropy too early
[   1.0117272] scsibus0: waiting 2 seconds for devices to settle...
[   3.0219763] sd0 at scsibus0 target 0 lun 0: <DEC, RZ58     (C) DEC, 2000> disk fixed
[   3.0258952] sd0: 20480 MB, 65536 cyl, 16 head, 40 sec, 512 bytes/sect x 41943040 sectors
[   3.0278523] sd0: async, 8-bit transfers
[   3.0307854] cd0 at scsibus0 target 1 lun 0: <DEC, RRD42   (C) DEC, 4.5d> cdrom removable
[   3.0327430] cd0: async, 8-bit transfers
[   3.0709108] root on sd0a dumps on sd0b
[   3.0767888] root file system type: ffs
[   3.0787464] kern.module.path=/stand/alpha/9.99.88/modules
Thu Aug 26 16:13:07 UTC 2021

If you exit the emulator without shutting down the operating system, there might be a disk check at boot. Takes about 5 minutes:

Starting root file system check:
/dev/rsd0a: UNREF FILE I=391813  OWNER=0 MODE=100600
/dev/rsd0a: SIZE=0 MTIME=Aug 26 16:10 2021   (CLEARED)
/dev/rsd0a: FREE BLK COUNT(S) WRONG IN SUPERBLK (SALVAGED)
/dev/rsd0a: SUMMARY INFORMATION BAD (SALVAGED)
/dev/rsd0a: BLK(S) MISSING IN BIT MAPS (SALVAGED)
/dev/rsd0a: 7355 files, 97258 used, 9945101 free (437 frags, 1243083 blocks, 0.0% fragmentation)
/dev/rsd0a: MARKING FILE SYSTEM CLEAN

Boot output continues:

Setting sysctl variables:
ddb.onpanic: 1 -> 0
[ 195.0098685] cd0: no disk label
swapctl: setting dump device to /dev/sd0b
swapctl: adding /dev/sd0b as swap device at priority 0
Starting file system checks:
rndctl: no entropy in seed
Setting tty flags.
Starting network.
Hostname: netbsd.spnw.nl
IPv6 mode: host
Configuring network interfaces:.
Adding interface aliases:.
route: writing to routing socket: Network is unreachable
add net default: gateway 192.168.0.1: Network is unreachable
Waiting for duplicate address detection to finish...
Building databases: dev, utmp, utmpx, services.
Starting syslogd.
Mounting all file systems...
Clearing temporary files.
Checking quotas: done.
Setting securelevel: kern.securelevel: 0 -> 1
[ 222.5400920] cd0: no disk label
swapctl: setting dump device to /dev/sd0b
Starting virecover.
Checking for core dump...
savecore: no core dump
Starting local daemons:.
Updating motd.

If you do have SSH enabled, on first boot NetBSD generates host keys, which takes almost an hour:

ssh-keygen: 1024 SHA256:o7jEPyk463sM62tU9m3QMIIQqPBWa95yIlqVayPbaW0 [email protected] (DSA)
ssh-keygen: 521 SHA256:4SNpVX3HRzkLQ7MymTryocCoJZ518iPbb3gLiZexmwg [email protected] (ECDSA)
ssh-keygen: 256 SHA256:YR3WQJK38h3Nc4hrGgBtvPTPn8eawBtDoiETfrwzmoc [email protected] (ED25519)
ssh-keygen: 3072 SHA256:lQdGTEzlJHpo7EDHrRbx2Q1C1zh1B6JDbe3wDWoAjtA [email protected] (RSA)
Starting sshd.
postfix: rebuilding /etc/mail/aliases (missing /etc/mail/aliases.db)
Starting postfix.
Starting inetd.
Starting cron.
Thu Aug 26 16:25:54 UTC 2021

NetBSD/alpha (netbsd.spnw.nl) (constty)

login: 

Enter the username root and if you set a password during install, also enter that. You should now be logged in:

Aug 26 16:26:38 netbsd login: ROOT LOGIN (root) on tty constty
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
    2018, 2019, 2020, 2021 The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 9.99.88 (GENERIC) #0: Sun Aug 15 22:22:52 UTC 2021

Welcome to NetBSD!

This is a development snapshot of NetBSD for testing -- user beware!

Bug reports: https://www.NetBSD.org/support/send-pr.html
Donations to the NetBSD Foundation: https://www.NetBSD.org/donations/
We recommend that you create a non-root account and use su(1) for root access.
netbsd# 

Now the system is all yours to play with. This guide also covers package installation via an ISO file, but if you know your way around NetBSD you can stop here.

Some system information:

netbsd# uname -a
NetBSD netbsd.spnw.nl 9.99.88 NetBSD 9.99.88 (GENERIC) #0: Sun Aug 15 22:22:52 UTC 2021  [email protected]:/usr/src/sys/arch/alpha/compile/GENERIC alpha

It's not possible to see what kind of CPU NetBSD thinks there is:

netbsd# cat /proc/cpuinfo 
netbsd# cpuctl identify 0
CPU identification not implemented for this architecture.

dmesg output does have some info:

netbsd# dmesg | grep MHz
[     1.000000] AlphaServer ES40, 1785MHz, s/n 

In the QEMU guide, that output was:

6600 family, unknown model variation 0x1400, 250MHz, s/n QEMU

To speed up the system, you can disable a few services in /etc/rc.conf:

sshd=NO
inetd=NO
postfix=NO
cron=NO
syslogd=NO

Networking does not work, so postfix, inetd and sshd are not needed. inetd starts services once you connect to a port, but we can't do that when we have no network. Postfix is for email, which is quite useless without network.

cron and syslogd could be useful, but disk IO is not fast, so disabling them speeds up the system a noticeable amount.

Autoboot NetBSD via SRM

As I showed in the OpenVMS guide, with the below SRM commands you can make AXPbox boot into NetBSD by default, that way you don't have to type the boot dka0 command each time you fire up AXPbox.

P00>>>set auto_action boot 
P00>>>set bootdef_dev dka0

You cannot undo those commands, or at least I haven't found out how.

Installing packages

Since we have no network, we cannot use pkgin or fetch or ftp to download packages. As in the OpenVMS install guide we used a trick to install the OpenVMS license. we have to create an ISO file on the host OS (where you run AXPbox) and mount that ISO file inside the virtualized OS (OpenVMS in that case), transferring the file that way.

That trick also works with NetBSD. We are going to install the sysbench package, because that is a simple package without dependencies. Start by creating a folder for the packages:

mkdir pkg
cd pkg

Download the package:

wget https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/alpha/9.2/All/sysbench-0.4.12nb8.tgz

Go up one folder:

cd ..

Turn that folder into an ISO file:

genisoimage -V pkg -o pkg.iso pkg/

Output:

Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
202 extents written (0 MB)    

Make sure AXPbox is not running. Edit es40.cfg and replace the netbsd.iso filename with our new ISO: pkg.iso:

disk0.1 = file
{
  file = "pkg.iso"; 
  cdrom = true;
  read_only = true;
}

Fire up AXPbox and boot into NetBSD. Once logged in, mount the ISO file:

netbsd# mount /dev/cd0a /mnt

Output:

[ 1092.6207707] cd0: no disk label
[ 1092.6246875] cd0: no disk label
[ 1092.7029975] cd0: no disk label

In /mnt you should now see the package we put on the ISO:

netbsd# ls -la /mnt

Output:

total 59
dr-xr-xr-x   1 root  wheel   2048 Aug 27 06:49 .
drwxr-xr-x  20 root  wheel    512 Aug 26 16:05 ..
-r-xr-xr-x   1 root  wheel  56803 Jul 16 11:27 sysbench.tgz

Install the package:

netbsd# pkg_add /mnt/sysbench.tgz 

Output:

pkg_add: Warning: package `sysbench-0.4.12nb8' was built for a platform:
pkg_add: NetBSD/alpha 9.0 (pkg) vs. NetBSD/alpha 9.99.88 (this host)

You can repeat this process for as many packages as you want. It becomes a bit more difficult when you have dependencies, as you need to manually install those in the correct order. This is the output of installing screenfetch:

pkg_add: Warning: package `screenfetch-3.9.1' was built for a platform:
pkg_add: NetBSD/alpha 9.0 (pkg) vs. NetBSD/alpha 9.99.88 (this host)
pkg_add: no pkg found for 'curl-[0-9]*', sorry.
pkg_add: Can't install dependency curl-[0-9]*
pkg_add: Expected dependency curl-[0-9]* still missing
pkg_add: 1 package addition failed

The curl package depends on libidn and so forth, it took a while to get screenfetch installed.

You do not have to reboot AXPbox every time you update the ISO. Unmount it in NetBSD (umount /mnt), add a package to the pkg folder and re-issue the genisoimage command. Mount the disk in NetBSD and you should see the new package. I'm not sure if this is intended, but as far as I tested it, it seems to work. If you do get weird errors, reboot netbsd or terminate and restart AXPbox to make sure the ISO file is re-read.