Netbooting a VAXstation

From Computer History Wiki
Revision as of 19:06, 10 December 2015 by Darkstar (talk | contribs) (found this old doc on my harddisk and slightly edited it since it might be useful for some people...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page describes my struggles with trying to netboot a DEC VAXstation 4000/60 for installing NetBSD. I originally wrote this document in 2005, and it did work just fine back then. However, it might be difficult to get the required software nowadays, or changes in the Linux kernel could have an impact on the whole process. This is thus provided AS-IS.

Note that this might also work with SIMH but it is not tested.

Requirements

  • Network connectivity for your VAX (normally this means you either need a transceiver for the AUI port or a hub/switch with a 10Base2 connector)
  • A Linux machine for the boot-server parts (I used a physical machine with SuSE 9.3)
    • This Linux server needs a network card in promiscuous mode (for a VM you might need to do a few config changes, e.g. on ESX)
    • It also needs a MOP server, which is called mopd for Linux (it is a DEC specific boot protocol)
    • For netbooting NetBSD (as was the original goal) you will also need a DHCP/BOOTP server, which is probably not required if you try to netboot an original DEC operating system like VMS or ULTRIX
    • Also you need an NFS server (for the install packages and root filesystem) and the kernel from the NetBSD ftp server

Note that mopd does not work across routers so you need to have a flat network.

Linux server

First, your Linux box needs a network card in promiscuous mode. Use

lavie:/# ifconfig eth0 allmulti

to enable it. It should then look something like this

lavie:/# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:02:B3:98:9F:A1  
          inet addr:192.168.0.42  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: 2002:549c:e025:6:202:b3ff:fe98:9fa1/64 Scope:Global
          inet6 addr: fec0::6:202:b3ff:fe98:9fa1/64 Scope:Site
          inet6 addr: fe80::202:b3ff:fe98:9fa1/64 Scope:Link
          UP BROADCAST RUNNING ALLMULTI MULTICAST  MTU:1500  Metric:1
          RX packets:870128 errors:0 dropped:0 overruns:0 frame:0
          TX packets:189222 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1184340903 (1129.4 Mb)  TX bytes:54007715 (51.5 Mb)
          Base address:0x9000 Memory:fa040000-fa060000 

mopd

Then you need the mopd MOP server. You can find it via google, for example here is a GitHub repo which claims to be the latest release (2.5.3/2.5.4). If you use NetBSD as server, it supposedly ships with mopd on all supported platforms as noted here. Back in 2005 I found a prebuilt package on rpmfind.net, but it no longer exists.

You can run mopd as follows:

lavie:/ # mopd -d eth0
mopd: not running as daemon, -d given.

Just keep it running in the foreground. Of course substitute eth0 with your network interface where the VAXstation can be reached. Your syslog should now contain something like this:

Dec 25 02:32:11 lavie mopd[7854]: mopd 2.5.3 started.
Dec 25 02:32:11 lavie mopd[7854]: Initialized eth0

mopd looks into /tftpboot/mop/ by default, so you should make sure that this directory exists. We will populate it later.

DHCP/BOOTP

The third puzzle piece is the DHCP/BOOTP server where the NetBSD bootloader gets its configuration from. You should make sure to use a DHCP/BOOTP server which implements the BOOTP/TFTP option 17 (root path) correctly, in my case the CMU BOOTP (version bootp-DD2-4.3) did not do this correctly which made me use isc-dhcpd 3.0.2, which worked just fine. Remember this was 2005 so if you try a more recent version of either, your results may be totally different.

To configure it, create an /etc/dhcpd.conf with the following content:

subnet 192.168.0.0 netmask 255.255.255.0 {
}

host vs4k60 {
  hardware ethernet 08:00:2b:xx:yy:zz;
  fixed-address 192.168.0.67;
  option domain-name-servers 192.168.0.1;
  option domain-name "mydomain.com";
  option root-path "/export/vax/root";
  filename "netbsd";
}

This first tells DHCPD which subnet it's working on, and then it contains an entry which maps the VAXstation to a fixed IP address from that subnet. Important here are 2 things: First, of course replace the xx:yy:zz part with the MAC address of your VAXstation (which you can find out via SHOW ETHER from the PROM). Second, the root-path option specifies where the root filesystem will be exported. NetBSD will try to mount this when it boots (NetBSD has no initrd concept on VAX, and with 32mb RAM or so, it would be difficult to pull off anyway ;-)

The filename (in this case "netbsd") is unimportant.

NFS server

Create the directory /export/vax/root and export it via NFS to the IP address (or hostname) of your VAX

lavie:/# cat /etc/exports
/export      vs4k60(rw,async)

If you use a hostname, like me, you have to create the corresponding entry in the /etc/hosts file of course.

NetBSD installation files

This guide was written for NetBSD 3.0 but it should (in theory) work the same for newer releases as well. First you will need to get this file: http://ftp.netbsd.org/pub/NetBSD-archive/NetBSD-1.5/vax/installation/netboot/boot.mop Yes, it is from NetBSD 1.5, and yes, we will be installing a newer version. However, all newer versions don't include the boot.mop file anymore, just a file called boot, which is not the same and which I couldn't get to work...

Copy this file into the following directory under exactly this name (case-sensitive):

/tftpboot/mop/MOPBOOT.SYS

Then, create a symbolic link to this file and name it like aabbccddeeff.SYS, where aa:bb:cc:dd:ee:ff is the MAC address of your VAXstation, with all letters lower-case except the .SYS at the end, which must be upper case. On my system it looks like this:

lavie:/# ls /tftpboot/mop/ -ls
total 72
   0 drwxr-xr-x  2 root root     176 Dec 25 00:01 .
   0 drwxr-xr-x  3 root root     136 Dec 25 01:28 ..
   0 lrwxrwxrwx  1 root root      11 Dec 24 20:04 08002b30cc49.SYS -> MOPBOOT.SYS
  72 -rw-r--r--  1 root root   71168 Dec 25 00:01 MOPBOOT.SYS

Next you need the NetBSD install kernel image, which (for NetBSD 7.0) is available here. It is usually called install.ram.gz. Uncompress it and place it under

/export/vax/root/netbsd.vax

It should look something like this:

lavie:/# ls /export/vax/root/ -ls
total 7170
     0 drwxrwxrwx  2 root   root          184 Dec 25 02:43 .
     0 drwxrwxrwx  3 root   root           72 Dec 25 00:34 ..
  2478 -rw-r--r--  1 root   root      2534976 Dec 25 01:42 netbsd.vax

The bootloader has hardcoded filenames that it tries to boot, and netbsd.vax is just the first one it tries.

Note: the bootloader will try other filenames if netbsd.vax is not found, among them for example netbsd, netbsd.bak and netbsd.gz. The last one seems handy to reduce boot time (the bootloader uncompresses the gz file on the fly), however on most VAXen it is probably faster to just load the uncompressed kernel from the server than uncompressing it on the VAX itself...

Netbooting the VAXstation

After making sure that mopd, dhcpd and nfsserver are running, boot your VAX from the PROM:

>>> b esa0

 
-ESA0
>> NetBSD/vax boot [Nov 17 2000 07:23:42] > Press any key to abort autoboot 0
Trying BOOTP
Using IP address: 192.168.0.67
myip:  (192.168.0.67)
root addr=192.168.0.42 path=/export/vax/root
2534184+69564]=0x27bd9c
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    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 3.0 (INSTALL) #0: Mon Dec 19 04:33:36 UTC 2005
        builds@b4.netbsd.org:/home/builds/ab/netbsd-3-0-RELEASE/vax/200512182024Z-obj
        /home/builds/ab/netbsd-3-0-RELEASE/src/sys/arch/vax/compile/INSTALL

VAXstation 4000/60
cpu0: KA46
cpu: turning on floating point chip
total memory = 32372 KB
avail memory = 28444 KB
mainbus0 (root)
vsbus0 at mainbus0
vsbus0: 32K entry DMA SGMAP at PA 0x3c0000 (VA 0x803c0000)
vsbus0: interrupt mask 0
le0 at vsbus0 csr 0x200e0000 vec 770 ipl 15 maskbit 1 buf 0x0-0xffff
le0: address 08:00:2b:30:cc:49
le0: 32 receive buffers, 8 transmit buffers
dz0 at vsbus0 csr 0x200a0000 vec 124 ipl 15 maskbit 4
dz0: 4 lines
lkkbd0 at dz0
wskbd0 at lkkbd0 (mux ignored)
asc0 at vsbus0 csr 0x200c0080 vec 774 ipl 15 maskbit 0
asc0: NCR53C94, 25MHz, SCSI ID 6
scsibus0 at asc0: 8 targets, 8 luns per target
md0: internal 1536 KB image area
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 2 lun 0:  disk fixed
sd0: 4153 MB, 3421 cyl, 18 head, 138 sec, 512 bytes/sect x 8506782 sectors
sd0: sync (200.00ns offset 15), 8-bit (5.000MB/s) transfers, tagged queueing
sd1 at scsibus0 target 3 lun 0:  disk fixed
sd1: 406 MB, 1476 cyl, 9 head, 62 sec, 512 bytes/sect x 832527 sectors
sd1: sync (200.00ns offset 15), 8-bit (5.000MB/s) transfers
boot device: le0
root on md0a dumps on md0b
root file system type: ffs
Clock has lost 13136 day(s) - CHECK AND RESET THE DATE.

Congratulations on netbooting a VAX :)

Troubleshooting

On your mopd-console, you should see a lot of stuff flashing by soon after you typed b esa0. It should look like this:

lavie:/# mopd -d eth0
mopd: not running as daemon, -d given.
MOP RC 802.3 8:0:2b:30:cc:49   > ab:0:0:2:0:0      len   45 code 07 SID 
MOP RC 802.3 8:0:2b:30:cc:49   > ab:0:0:2:0:0      len   45 code 07 SID 
MOP RC 8:0:2b:30:cc:49   > ab:0:0:2:0:0      len   37 code 07 SID 
MOP DL 802.3 8:0:2b:30:cc:49   > ab:0:0:1:0:0      len   47 code 08 RPR 
MOP DL 802.3 0:2:b3:98:9f:a1   > 8:0:2b:30:cc:49   len    9 code 03 ASV 
MOP DL 802.3 8:0:2b:30:cc:49   > ab:0:0:1:0:0      len   47 code 08 RPR 
MOP DL 802.3 0:2:b3:98:9f:a1   > 8:0:2b:30:cc:49   len    9 code 03 ASV 
MOP DL 802.3 8:0:2b:30:cc:49   > 0:2:b3:98:9f:a1   len   47 code 08 RPR 
Native Image (VAX)
Header Block Count: 1
Image Size:         00011400
Load Address:       00000000
Transfer Address:   00000000
MOP DL 802.3 0:2:b3:98:9f:a1   > 8:0:2b:30:cc:49   len 1498 code 02 MLD 
MOP DL 802.3 8:0:2b:30:cc:49   > 0:2:b3:98:9f:a1   len   47 code 08 RPR 
Native Image (VAX)
Header Block Count: 1
Image Size:         00011400
Load Address:       00000000
Transfer Address:   00000000
MOP DL 802.3 0:2:b3:98:9f:a1   > 8:0:2b:30:cc:49   len 1498 code 02 MLD 
MOP DL 802.3 8:0:2b:30:cc:49   > 0:2:b3:98:9f:a1   len   11 code 0a RML 
MOP DL 802.3 0:2:b3:98:9f:a1   > 8:0:2b:30:cc:49   len 1498 code 02 MLD 
MOP DL 802.3 8:0:2b:30:cc:49   > 0:2:b3:98:9f:a1   len   11 code 0a RML 
MOP DL 802.3 8:0:2b:30:cc:49   > 0:2:b3:98:9f:a1   len   11 code 0a RML 
MOP DL 802.3 0:2:b3:98:9f:a1   > 8:0:2b:30:cc:49   len 1498 code 02 MLD 
..................

the syslog should look something like this:

Dec 25 03:17:24 lavie mopd[7961]: mopd 2.5.3 started.
Dec 25 03:17:24 lavie mopd[7961]: Initialized eth0
Dec 25 03:17:30 lavie mopd[7961]: 8:0:2b:30:cc:49 (2) Do you have 08002b30cc49? (Yes)
Dec 25 03:17:30 lavie mopd[7961]: 8:0:2b:30:cc:49 (2) Do you have 08002b30cc49? (Yes)
Dec 25 03:17:30 lavie mopd[7961]: 8:0:2b:30:cc:49 Send me 08002b30cc49
Dec 25 03:17:30 lavie mopd[7961]: 8:0:2b:30:cc:49 Send me 08002b30cc49
Dec 25 03:17:30 lavie mopd[7961]: hostname: [ipc] len: 3
Dec 25 03:17:30 lavie mopd[7961]: 8:0:2b:30:cc:49 Load completed

If you want to, you can manually specify which file to boot by typing b/100 esa0 at the VAX console:

>>> b/100 esa0

 
 Bootfile: mopboot


  
-ESA0
>> NetBSD/vax boot [Nov 17 2000 07:23:42] > Press any key to abort autoboot 0
...

You should also have the following entries from dhcpd in your syslog:

Dec 25 03:17:35 lavie dhcpd: DHCPDISCOVER from 08:00:2b:30:cc:49 via eth0
Dec 25 03:17:35 lavie dhcpd: DHCPOFFER on 192.168.0.67 to 08:00:2b:30:cc:49 via eth0
Dec 25 03:17:35 lavie dhcpd: DHCPREQUEST for 192.168.0.67 (192.168.0.42) from 08:00:2b:30:cc:49 via eth0
Dec 25 03:17:35 lavie dhcpd: DHCPACK on 192.168.0.67 to 08:00:2b:30:cc:49 via eth0

You should see all these 4 DHCP packets (DHCPDISCOVER, DHCPOFFER, DHCPREQUEST, DHCPACK), otherwise check your dhcpd configuration

The NFS server also prints one line in the syslog:

Dec 25 03:17:36 lavie rpc.mountd: authenticated mount request from vs4k60:1023 for /export/vax/root (/export)

If this says something like "permission denied", you probably forgot to add your VAX to /etc/hosts.