NetBSD 10.1/alpha auf DEC 3000 M300LX mit OpenBSD 7.7/amd64 Howto

dettus

Bicycle User
Hallo!

Weil ich mal wieder VIEL ZU VIEL GOOGELN musste, habe ich mir erlaubt, wieder ein Howto zu schreiben.


0. ABOUT THIS DOCUMENT
----------------------
This document describes how to install NetBSD 10.1 on a DEC 3000 M300LX,
using a computer running OpenBSD 7.7 as server. Why OpenBSD 7.7? Well.. Why not? ;)
After a straightforward installation, it already offers all the Tools necessary to act as installation server.

The server will run the following services:

  • dhcpd (acting as BOOTP)
  • tftpd
  • nfsd
  • httpd

The first three are for booting the installation binary, the latter one
for downloading the 'sets'.

Even though they are disabled, a standard installation of OpenBSD has the
necessary tools installed. The only extra tool needed for interacting with
the DEC 3000 during the installation will be "minicom".


MOREOVER: The setup in this example is as followed:
OpenBSD machine and DEC3000 are connected via Ethernet and USB2UART adapter
cable. The OpenBSD machine is set to 192.168.1.1 and the DEC3000 to
192.168.1.200.
This is not necessary, but if your setup has different addresses, double
check the configurations.


1. GETTING THE INSTALLATION FILES
---------------------------------
The installation files can be download from any NetBSD mirror. For example from


From there, the following files will be needed:

For booting the installer:
Code:
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/installation/netboot/netboot
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/installation/instkernel/netbsd.gz

For the installation process:
Code:
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/MD5
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/SHA512
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/base.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/comp.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/debug.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/etc.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/games.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/gpufw.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/index.html
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/kern-GENERIC.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/man.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/misc.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/modules.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/rescue.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/tests.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/text.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/xbase.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/xcomp.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/xdebug.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/xetc.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/xfont.tgz
https://ftp.netbsd.org/pub/NetBSD/NetBSD-10.1/alpha/binary/sets/xserver.tgz




2. DISTRIBUTING THE FILES ON THE OPENBSD MACHINE
------------------------------------------------
The next chapters will contain the configurations that expect the downloaded
files in certain directories. (For whatever reason). In this document, there
are two:

/tftpboot
/var/www/htdocs/netbsd101/sets/

Files for booting the NetBSD installer will be placed in /tftpboot. THIS IS
NOT NEGOTIABLE! For some reason, tftpd cannot be configured to use any other
directory than /tftpboot. Whatever... As long as the directory is there, it
can be used for the nfsd data.

Code:
; mkdir /tftpboot
; cp netboot /tftpboot
; cp netbsd.gz /tftpboot
; chmod 777 /tftpboot
; chmod 666 /tftpboot/*

(Yadda yadda yadda... Permissions are unsafe... Be sure to clean up afterwards!)


The installation process itself wants to download the "sets" from someplace.
In theory, it is possible to do this via NFS as well. However, using http is
easier.
Those "sets" are the .tgz files downloaded earlier. They need to go into a
directory, which will be accessible by the httpd.

Code:
; mkdir /var/www/htdocs/netbsd101/sets/
; cp MD5 SHA512 index.html *.tgz /var/www/htdocs/netbsd101/sets/
; chmod -R 755 /var/www/htdocs/netbsd101/

(I AM NOT SURE IF THE index.html, MD5 or SHA512 files are necessary. But they
do not hurt. ;) )



3. CONFIGURING THE DAEMONS
--------------------------
The following files worked for me.

Code:
; cat /etc/dhcpd.conf
option  domain-name "my.home.domain";
option  domain-name-servers 192.168.1.3, 192.168.1.5;
allow bootp;
subnet 192.168.1.0 netmask 255.255.255.0 {
    option routers 192.168.1.1;

    range 192.168.1.32 192.168.1.127;

    host static-client {
        hardware ethernet HH:II:JJ:KK:LL:MM;   
        filename "netboot";                 <--- is in /tftpboot
        fixed-address 192.168.1.200;
        next-server 192.168.1.1;
        option root-path "/tftpboot";       <--- but this is for NFSd.
        always-reply-rfc1048 true;
    }
}
Obviously, HH:II:JJ:KK:LL:MM is not the correct Ethernet Address. It will
become in chapter 6. Sorry about that!

Code:
; cat /etc/exports
/tftpboot -ro -maproot=LOGIN_OF_A_USER_IN_WHEEL_ON_THE_OPENBSD_MACHINE
The /tftpboot directory doubles as the nfs directory.


Code:
; cat /etc/httpd.conf
server "192.168.2.1" {
        listen on * port 80
        root "/htdocs/netbsd101"
}
types {
        include "/usr/share/misc/mime.types"
}
Note that the htdocs directory is /htdocs, as opposed to /var/www/htdocs.

The configurations can be checked with
Code:
; dhcpd -n
; httpd -n


4. STARTING THE DAEMONS
-----------------------

Once the configurations are correct, a simple
Code:
; rcctl enable dhcpd httpd tftpd portmap mountd nfsd
; rcctl start dhcpd httpd tftpd portmap mountd nfsd
; rcctl reload mountd
will do.

The daemons can be tested using
Code:
; cd /tmp
; tftp localhost
tftp> GET netboot
tftp> exit
; ftp http://localhost/sets/index.html
; mount 192.168.1.1:/tftpboot /mnt/
; ls -l /mnt/
; umount /mnt/



5. CONFIGURING MINICOM
----------------------
I have a USB to UART adapter, and after plugging it in, /dev/ttyU0 was the
device to use. Personally, I like minicom. I use minicom. So I installed
minicom with a simple

Code:
; pkg_add minicom

or
Code:
; cd /usr/ports/comms/minicom
; make install
Both will do.

The configuration can be invoked with

Code:
; minicom -s
There, <SERIAL PORT SETUP> should look like this:

Code:
    +-----------------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyU0                                |
    | B - Lockfile Location     : /var/spool/lock                           |
    | C -   Callin Program      :                                           |
    | D -  Callout Program      :                                           |
    | E -    Bps/Par/Bits       : 9600 8N1                                  |
    | F - Hardware Flow Control : No                                        |
    | G - Software Flow Control : No                                        |
    | H -     RS485 Enable      : No                                        |
    | I -   RS485 Rts On Send   : No                                        |
    | J -  RS485 Rts After Send : No                                        |
    | K -  RS485 Rx During Tx   : No                                        |
    | L -  RS485 Terminate Bus  : No                                        |
    | M - RS485 Delay Rts Before: 0                                         |
    | N - RS485 Delay Rts After : 0                                         |
    |                                                                       |
    |    Change which setting?                                              |
    +-----------------------------------------------------------------------+
<MODEM AND DIALING> like that:
Code:
 +--------------------[Modem and dialing parameter setup]---------------------+
 |                                                                            |
 | A - Init string .........                                                  |
 | B - Reset string ........                                                  |
 | C - Dialing prefix #1....                                                  |
 | D - Dialing suffix #1....                                                  |
 | E - Dialing prefix #2....                                                  |
 | F - Dialing suffix #2....                                                  |
 | G - Dialing prefix #3....                                                  |
 | H - Dialing suffix #3....                                                  |
 | I - Connect string ...... CONNECT                                          |
 | J - No connect strings .. NO CARRIER            BUSY                       |
 |                           NO DIALTONE           VOICE                      |
 | K - Hang-up string ...... ~~+++~~ATH^M                                     |
 | L - Dial cancel string .. ^M                                               |
 |                                                                            |
 | M - Dial time ........... 45      Q - Auto bps detect ..... No             |
 | N - Delay before redial . 2       R - Modem has DCD line .. Yes            |
 | O - Number of tries ..... 10      S - Status line shows ... DTE speed      |
 | P - DTR drop time (0=no). 1       T - Multi-line untag .... No             |
 |                                                                            |
 | Change which setting?     Return or Esc to exit. Edit A+B to get defaults. |
 +----------------------------------------------------------------------------+

Then, <SAVE SETUP AS DFL> is recommended.



6. STARTING THE INSTALLER
-------------------------
Once the DEC 3000 and the OpenBSD machine are connected via Ethernet and a
USB2UART adapter, the DEC machine can be switched on. (It is loud, isn't it? ;))
Run

Code:
>>> INIT
>>> SHOW DEV
If you want.

The minicom window should now show the boot messages, including the DEC3000
Ehternet address.

On the DEC3000 console, use the following command to boot via BOOTP from the
first ethernet device:
Code:
>>> BOOT ez0
(Even though the ethernet device might have shown up as ESA0)


7. THE INSTALLATION PROCEDURE
-----------------------------
Installing NetBSD is ALMOST straigthforward, so I will not go into details.

My box came with a 1GByte HDD, which is rather small by today's standards.
However, it was enough. When asked about the partion sizes, this is what I
set up:
Code:
       Size (sec)                            Filesystem
       ----------------------------------- - --------------------
    a: 1800000                               /
   >b: 250860                                <swap>
    c: 0                                     /tmp (mfs)
    d: 0                                     /usr
    e: 0                                     /var
       ----------------------------------- - --------------------
    g: Add a user defined partition
    h: Clone external partition(s)
    i: Change input units (sectors/cylinders/MB/GB)
    x: Go on.  Free space 0 sec.

I chose a "CUSTOM INSTALLTION" later. Those are the packages I installed
Code:
    Distribution set         Selected                                         
    ------------------------ --------
 a: Kernel (GENERIC)               Yes
 b: Kernel modules                 Yes
 c: Base                           Yes
 d: Configuration files (/etc)     Yes
 e: Compiler tools                 Yes
 f: Games                          Yes
 g: Graphics driver firmware       No
 h: Manual pages                   No
 i: Miscellaneous                  No
 j: Recovery tools                 No
 k: Test programs                  No
 l: Text processing tools          No
 m: X11 sets                       None
 n: Source and debug sets          None
>x: Install selected sets
In the end, I had 90 MByte to spare! :)
I guess without the compiler, it would have been 500 MByte more.

As installation source, the http server on the OpenBSD machine can be used
Code:
 a: Host                                192.168.1.1
 b: Base directory                      /
 c: Binary set directory                sets
 d: Source set directory                /source/sets
 e: File extension                      .tgz
 f: User                                ftp
 g: Password
 h: Proxy
 i: Transfer directory                  /usr/INSTALL
 j: Delete after install                Yes
 k: Configure network
 l: Exit
>x: Get Distribution

The installation process ran through in ~20 Minutes.
In the configuration afterwards I set up a user and enabled the sshd server.

Since the ssh server is generating its keys on the first boot, this one took
another 20 minutes.... The second one was faster!

Now it is working, and.... honestly... I do not know what to do with it...
But it is fun and nice to have!


After the first boot is finished, log in, and do whatever you normally do with NetBSD.
:)


8. CLEANING UP
----------------------
You probably won't need the daemons anymore
Code:
; rcctl stpo dhcpd httpd tftpd portmap mountd nfsd
; rcctl disable dhcpd httpd tftpd portmap mountd nfsd

-------------------------------------------------------------------------------
Side note: My DEC 3000 hat a dead RTC battery. The component on the board was
a DALLAS DS1287A - 2335G 442798. I replaced it with a DS12887+ - 2335G 442789.

And I kinda liked the fact that the bootloader was not automatically loading
whatever was on the harddrive, so entering


worked for me!
 
Mist!
Ich habe mich natuerlich vertan und ein gzip -d vergessen.

Richtig muss es in Kapitel 2 heissen:

.....
can be used for the nfsd data.



Code:
; mkdir /tftpboot
; cp netboot /tftpboot
; cp netbsd.gz /tftpboot
; gzip -d /tftpboot/netbsd.gz
; chmod 777 /tftpboot
; chmod 666 /tftpboot/*


(Yadda yadda yadda... Permissions are unsafe... Be sure to clean up afterwards!)
 
Zurück
Oben