How to install NetBSD/luna68k

There are two ways to boot a NetBSD kernel on your LUNA.

  1. network boot using "isiboot"
  2. place NetBSD kernel on the root directory of the LUNA original disk

Because there is no provision of installation kernel tailored to run in standalone with the help of memory disk, either way requires to prepare an initial filesystem on an NFS server.

Preparing filesystem to NFS mount

NetBSD/luna68k is a cousin of various m68k port of NetBSD. Any set of m68k distribution is useful to run NetBSD/luna68k with minor adjustments as described below.

Inflate two files, base.tgz and etc.tgz, to the NFS server. Then replace two files, etc/ttys and dev/MAKEDEV, with ones found in the ftp://ftp.NetBSD.org/pub/NetBSD/arch/luna68k/ directory of NetBSD ftp servers. Make sure to run sh ./MAKEDEV all in dev/ directory.

Preparing BOOTP/DHCP network service

NetBSD kernel requests its network parameters and NFS mount point. You need to know its station address (Ethernet MAC address), which can be found using ROM monitor (see how to do).

Here is the sample configuration of /etc/bootptab:

dayan:\ 
     ht=ethernet:ha=00000a02430f:ip=10.1.1.106:sm=255.255.255.0:\
     gw=10.1.1.1:rp=/ccd/filesys/luna68k:

where rp= field tells NFS root directory for LUNA exported by NFS server. bf= field is unnecessary to have.

Another sample configuration for /etc/dhcpd.conf:

group {
  option subnet-mask 255.255.255.0;
  option broadcast-address 10.1.1.255;
  option routers 10.1.1.1;
  host dayan {
    hardware ethernet 00:00:0a:02:43:0f;
    fixed-address 10.1.1.106;
    next-server 10.1.1.101;
    option root-path "/ccd/filesys/luna68k";
  }
}

Network boot with 'isiboot'

LUNA ROM monitor can download kernel image via network. 'isiboot' serves this purpose. The server program requires BPF (Berkeley Packet Filter) in the servicing machine to work. The source code of isiboot can be found ftp://ftp.NetBSD.org/pub/NetBSD/arch/luna68k/ directory of NetBSD ftp servers. The description is here.

  SYNOPSIS
    isiboot [-i interface] [-s directory] [-d tracelevel]

  DESCRIPTION
    isiboot is a server which supports LUNA network boot.  It listens
    to ROM monitor download requests and serves for it.  The proprietary
    protocol uses a special Ethernet type and works within a local wire.

    -i  isiboot searches available network interfaces and
    chooses one found first.  If the servicing machine has multiple
    network interfaces in action, this option can be used to specify
    which network interface to use.

    -s  whose directory isiboot server makes chroot(2)
    to after invocation.  Given no provision, isiboot searches the
    downloading files in the current directory when started.

    -d  accepts value 1, 2 or 3.  Greater number provides
    more detailed trace.

    The protocol uses server's hostname to start the downloading
    dialogue.  isiboot makes the name using gethostname(3) trimmed
    down by the first dot '.' if applicable.

[1] Invoke isiboot program on the root directory of NetBSD/luna68k
    filesystem on NFS server.  Use -s option when necessary.

[2] Manipulate LUNA ROM monitor as follows;

    Given '> ' ROM monitor prompt;

    >[k]            start to change boot parameters,
    ctlr: dk [et]       specify network boot,
    home: omron         type a return, isiboot doesn't care this field, 
    sver: servername        type another return,
    fnam: server:/vmunix [pelican:netbsd]
                specify server hostname and the filename
                to download.  Leading / is not significant.

    Then type 'g' ROM monitor command to start downloading.  You will see
    the progress like;

    >[g]
    text(776872)+data(49788)+bss(131942)

    When completed, type 'x' ROM monitor command with '-s' string to
    run NetBSD kernel.  -s specifies not to start multiuser mode.

    >[x -s]

The kernel starts to configure itself, and requests BOOTP/DHCP on wire to get network parameters and the name of filesystem to mount. After receiving a proper reply, NetBSD/luna68k kernel invokes single user mode shell eventually.

Booting from disk

NetBSD/luna68k kernel can be booted off from the vender supplied original operating system. Place kernel image on the root directory, then type to ROM monitor as follows:

    >[k]
    ctlr: dk        type just a return to make no change,
    drv: 0      return,
    par: c      and another return,
    fnam: vmunix [netbsd]
            specify the name of NetBSD/luna68k kernel.

    >[g]        load the kernel image from disk.  Litting
            front panel LED tells activity.

    >[x -sa]        run the kernel, where -sa instructs to ask
            which filesystem to mount.

Now, tell the kernel to mount filesystem provided by NFS server;

    boot device: sd0
    root device (default on sd0a): [le0]    le0 to use NFS
    dump device:                return to choose default
    filesystem (default generic):       another return to choose

Then kernel requests BOOTP/DHCP for network parameters and its root directory, and eventually invokes single user mode shell when successful.

Installing NetBSD/luna68k on disk

NetBSD sysinst utility is not prepared for NetBSD/luna68k. Here is the instruction for manual installation.

It's reasonable and preferred to make fresh filesystems from scratch. Vender supplied OS has such a rather obscure convention to keep its root filesystem on partition c that's not comfortable with NetBSD standard. Use disklabel(8) command to make the new filesystem layout.

LUNA ROM monitor can search and load kernel images on the root filesystem. To make this possible, the root filesystem must be created in the 'old FFS' format. Make sure to have -O (large letter oh) for newfs(8). Other filesystems do not require the option.

Then mount the root filesystem somewhere, say /mnt, and other filesystems for usr/ or var/ underneath it. If you have NetBSD distribution sets on a certain NFS mounted point, goto the directory and then issue a simple loop:

    # for i in *.tgz
    do
    (cd /mnt && tar xvfp - ) < $i
    done

When completed, make sure to place NetBSD/luna68k kernel image on /mnt directory and to replace two files, etc/ttys and dev/MAKEDEV. Run sh ./MAKEDEV all on /mnt/dev/ directory to have device nodes.

It's ok to halt the system now by typing halt for # prompt.

Arrange ROM boot parameters for daily use

    >[k]
    ctlr: dk        type just a return to make no change,
    drv: 0      another return,
    par: c [a]      change to choose 'a' partition to load,
    fnam: vmunix [netbsd]
    >[k+]       store those into NVRAM