3. Installing NetBSD/VAX


Contents of this section
Note: You can read this document more or less as an Install-HOWTO. I've tried to put everything in logical order so that you can read it from start to end and use it as installation instructions. Please refer to the INSTALL document found in the root of the NetBSD/VAX distribution for further information and Ragge's installation notes.

3.1 Where can I find NetBSD/VAX?

A: Every ftp site that carries NetBSD should also have a copy of the VAX files, but most don't :-(.

These are the sites I know of:

If you know of any sites not listed here, please tell me!

3.2 What hardware is supported?

A: Currently, the following hardware is supported:

CPUs:

Networking:

Serial lines:

Disks:

Tapes:

NOTE! This list is unofficial. Please check the official VAX port page on http://www.NetBSD.org/ for any late breaking news and the official list of supported hardware.

3.3 How do I create the boot tape?

A: You have several options, writing from another Unix system, or from a VMS system (see section 3.4).

First you will need the files tk50-file1-???.fs and tk50-file2-???.fs where ??? is the revision of NetBSD/VAX.

Writing from Unix to TK50 tape (example taken from DEC MIPS/Ultrix, installing NetBSD/VAX 1.2):


# dd if=tk50-file1-12 of=/dev/nrmt0h bs=512
# dd if=tk50-file2-12 of=/dev/nrmt0h bs=512
and unload the tape. You're done.

If you use NetBSD/VAX to write the tape (for example if you're upgrading from a previous release), use tape device /dev/nrmt8 (like this):


# dd if=tk50-file1-12 of=/dev/nrmt8 bs=512
# dd if=tk50-file2-12 of=/dev/nrmt8 bs=512
and unload the tape. You're done.

Note that blocksize (bs=) has to be 512!. The commands above might not work on your variant of Unix, check your dd documentation ('man dd')!

It might be a good idea to write the distribution tapes while you're at it. See section 3.16 for more information.

3.4 Can I create the tape on a VMS system?

A: Sure you can. Here's how (taken from a message by Robert Byer <byer@carl.a-com.com> on the port-vax mailing list): ------------------- Begin included message ------------------------------- Date: Sat, 01 Oct 1994 22:18:39 EDT From: Robert Byer <byer@carl.a-com.com> To: PORT-VAX@NetBSD.ORG Cc: TECH-INSTALL@NetBSD.ORG Subject: VMS Boot Tape Instructions... Problem Solved: For those of you that helped, thanks. Here's the steps you need to generate a NetBSD boot tape from VMS, you will need TWO TK50 tapes for this. First, initialize both the tapes using the following command: $ INITIALIZE/ERASE MUA0: "" Now, the "/ERASE" really isn't necessary, but it can't hurt either and who knows what was on the tape. The "" writes a blank label and I don't know if it makes any difference. Now take one of the tapes you just initialized and label it as the "boot" tape and mount the tape as "/FOREIGN" with a block size of 512 using the switch "/BLOCK=512". So the MOUNT commands looks like: $ MOUNT/FOREIGN/BLOCK=512 MUA0: Now copy the file "TK50-FILE1-11A.;" to the tape. $ COPY TK50-FILE1-11A.; MUA0: Dismount the "boot tape". $ DISMOUNT/UNLOAD MUA0: And now label the other tape you initialize as "mini-root" and place it in the tape drive and mount it as you did with the "boot" tape. Once that is mounted, copy the second file to the tape just like you did the first. $ COPY TK50-FILE2-11A.; MUA0: Dismount the second tape and reboot the machine. Place the "boot" tape in and boot with it. - From here follow the instructions in the "INSTALL" file UNTIL you get to the "copy" program. When you boot the "copy" program and it comes up asking for the source device, unload the "boot" tape and load the "mini-root" tape and continue on as normal. I'm researching the reason for needing two tapes, but it seems to work and I find that more used machines come with VMS loaded than a Unix file system. If anyone has any questions, please e-mail me and I'll see what I can do. I don't know much about Unix, but I do know VMS and I can help their. Robert Alan Byer, Vice-President A-Com Computing, Inc. 115 W. Washington St., Suite 1165 Indianapolis, IN 46204 Phone: (317)673-4204 E-Mail: byer@carl.a-com.com Send An E-Mail Request For My PGP Key -------------------- End included message -------------------------------- Here's my 2 cents worth: 1) I was able to copy both files to one tape (and read everything from NetBSD/VAX). I did this on an OpenVMS V6.1 system using a SCSI TK50 tape drive. 2) I wouldn't use the /ERASE qualifier on the INITIALIZE command if I were you, it makes the drive run through the entire tape and that can take a long time on a TK50! When using two tapes remember that when you are going to read 'miniroot' it is the first file on tape number two, you must refer to it as file 0 (zero) on the tape. YMMV and so on...

3.5 How do I boot the VAX from the tape?

A: This is simple, but you have to follow the instructions exactly (as I discovered the hard way ;-).

Bring your VAX to the console prompt (>>> ) by pressing

or whatever's appropriate for your hardware.

Enter the following command:


>>> B/3 MUA0
If your tape drive has a different controller number or unit number, you will have to enter the appropriate device instead of "MUA0". See section 3.6 for more information.

The important part here is to remember to include the /3 qualifier to the boot command, if you forget this you will be unable to load the 'edlabel' and 'copy' programs mentioned later!

Thanks to Mike Young <young@ecn.purdue.edu> for pointing this out to me when I was stuck at this very point!

3.6 What are the VAX device names under NetBSD/VAX?

A: It depends. There are different device names depending on if you're running the "standalone" environment (i.e. you've booted from the installation tape), or if you're running the regular NetBSD/VAX.

The following is taken from Ragge's INSTALL document (you can find it in the root directory of the NetBSD/VAX distribution), and covers the standalone environment:

-------------------- Begin included text -------------------------------- 1. Device conventions. NetBSD standalone system addresses devices like 'devicename(adapter, controller, unit, partition)' Known devicenames are: tms - TMSCP tape. ts - TSV05/TS11 tape. ra - RA??/RD?? disks/floppies. hp - RP??/RM?? disks. You can omit parameters; ra(0,0) refers to disk 0 partition a on default controller. On tapes partition refers to file # on the tape. Example: DUB1 (DEC syntax) swap partition will be referred as ra(1,0,1), DRA2 root partition is hp(2,0). -------------------- End included text ---------------------------------- What this boils down to is:

and so on. More on partitions in section 3.7. If we break this down, we get:

device-type(controller#,unit#,file_or_partition)

In DEC-speak the devices are called:

ddcn Where:

dd is DU or MU for disk or tape,
c is A, B, C, D and so on for controller number,
n is 0, 1, 2, 3 and so on for unit number.

DUA0 then has to be a disk, connected to the first disk controller in the system, and unit #0 on that controller.
This maps to ra(0,0,p) in the NetBSD/VAX standalone environment.

MUB3 then has to be a tape, connected to the second tape controller in the system, and unit #3 on that controller.
This maps to tms(1,3,f) in the NetBSD/VAX standalone environment.

Note that if you access devices on the first controller in the system (like DUA0 or MUA0) you can omit the first 0 in the NetBSD/VAX device name. This means that the first partiton on DUA0 can be accessed as ra(0,0) and the first file on a tape in MUA0 can be accessed as tms(0,0).

Got that? It's not hard once you understand the principle...

The regular NetBSD/VAX environment is a different case altogether. Here the devices have the form:

ddnp

Where:

dd is ra or mt for disk or tape,
n is 0, 1, 2, 3 and so on for unit number,
p is a, b, c, d and so on for partition.

So, your DUA0 disk will be called ra0 in NetBSD/VAX.
Your DUA2 disk will be called ra2 in NetBSD/VAX.
Your MUA0 tape will be called mt0 or mt8 in NetBSD/VAX.

Whoa, that last line needs some explanation. Tapes are special in Unix. Normally you would address your MUA0 tape as rmt8 in NetBSD/VAX. Why? rmt8 breaks down like this:

r for raw (that is, access the tape as a raw device)
mt for tape device
8 for first tape drive in high density mode

rmt0 is the same drive, only in low density mode. The tapes can also be accessed as block devices, just remove the leading r in the devicename.

In a future release of NetBSD/VAX the tapes will change names, they will be named after device type (i.e. ts8 for TS11 tapes and so on).

Note also that you will seldom access a disk under NetBSD/VAX as just ra0, you will normally have to include the partition letter. For partition a on VAX device DUA0 this translates to ra0a.

3.7 What is 'edlabel' and why do I need a label on my disk?

A: 'edlabel' is used to partition your disk for use with NetBSD/VAX. The partition information is written to the beginning of the disk and tells NetBSD/VAX how to access the disk.

So what are partitions anyway? Simply put: Your disk is beeing split into slices that NetBSD/VAX can access as "virtual drives", putting a separate filesystem on each.

Each partition is designated by a letter, usually from a to h.

The conventional way is to access a disk like this:
a the root (/) partition
b the swap partition
c in case you want to access the whole disk as one filesystem
d user defined
e user defined (normally /usr)
f user defined
g user defined (some people like to put /usr here)
h user defined

Note that the c partition must exist and must cover the entire disk! If you want to access the whole disk as the c partition (i.e. 'newfs' and 'mount' the c partition) you can't use any of the other partitions! Also note that partitions should not overlap, this can cause severe data loss!

3.8 What is the disktab entry for my xxxx disk?

A: Here's the NetBSD/VAX distribution /etc/disktab file. Use your browser's "back" or "return" command to return to this document when you've finished browsing the file.

Here are some thoughts on reading the the RD53 entry, thanks to Holger B. Austinat <hba1@cec.wustl.edu> (in a posting to port-vax):

------------------- Begin included message ------------------------------- Date: Tue, 30 Jan 1996 23:10:56 -0600 (CST) From: "Holger B. Austinat" <hba1@cec.wustl.edu> To: Robert Smith <rmsmith@csc.com> Cc: port-vax@NetBSD.ORG Subject: Re: RD53 cylinder count? > Now, I have not found the "dimensions" on an RD53 - don't > know number of cylinders...help please. Here is the section of /etc/disktab from the NetBSD-distribution telling you the parameters you need: rd53|RD53|DEC RD53 on Microvax:\ :ty=winchester:ns#18:nt#8:nc#963:\ :dt=MSCP:\ :pa#15884:oa#0:ba#8192:fa#1024:\ :pb#33440:ob#15884:bb#4096:fb#512:tb=swap:\ :pc#138672:oc#0:bc#4096:fc#512:\ :pe#33440:oe#0:be#4096:fe#512:\ :pf#105232:of#33440:bf#4096:ff#512:\ :pg#89348:og#49324:bg#4096:fg#512:\ :ph#122788:oh#15884:bh#4096:fh#512:\ :b0=rdboot: ns = sectors per track = 18 nt = tracks per cylinder = 8 (==> sectors/cylinder = 144) nc = number of cylinders = 963 I hope this is what you need. Good luck. Holger *** newly excited user of NetBSD on a uVAXII *** +----------------------------------------------------+ | HOLGER AUSTINAT phone: (314) 935-1200 | | e-mail: hba1@cec.wustl.edu | +----------------------------------------------------+ *** proud member of the CEC shit list *** ------------------- End included message ---------------------------------

3.9 How do I use 'edlabel'?

A: When you boot off the installation tape you will (after a few minutes) see a prompt like this:

Nboot
:

Here you enter "edlabel" and press return. You will see some more booting messages and finally enter the 'edlabel' program itself.

Here is some information taken from Ragge's README.edlabel file, found in the root directory of the NetBSD/VAX distribution, about using 'edlabel' (slightly edited by me for clarity. Sorry, Ragge!):

-------------------- Begin included text -------------------------------- $NetBSD: README.edlabel,v 1.1 1995/09/16 12:00:19 ragge Exp $ How to use edlabel ------------------ Edlabel is a program to edit disklabels on any disks in a standalone environment. Mostly it is used to set labels when doing initial installation procedure. It is started from boot program prompt. You will here be guided through a session, things with ^^^^ under is typed in by the user, comments are within /* */. Nboot : edlabel ^^^^^^^ 11700+576+43200 start 0x0 With this program you can modify everything in the on-disk disklabel. To do something useful you must know the exact geometry of your disk, and have ideas about how you want your partitions to be placed on disk. Some hints: The a partition should be at least ~20000 blocks, the b (swap) is depending on your use of the machine but it should almost never be less than ~32000 blocks. Disk geometry for most DEC disks can be found in the disktab file, and disknames is listed in the installation notes. Remember that disk names is given as disk(adapt, ctrl, disk, part) when using the installation tools. Label which disk? ra(1,0,0) /* DUB0 */ ^^^^^^^^^ getdisklabel: no disk label ra(1,0,0): no disk label (E)dit, (S)how, (D)efaults, (W)rite, (Q)uit) : e ^ First set disk type. Valid types are: 0 unknown 1 SMD 2 MSCP 3 old DEC 4 SCSI 5 ESDI 6 ST506 7 HP-IB 8 HP-FL 9 type 9 10 floppy 11 ccd 12 vnd Numeric disk type? [0] 2 /* All disks supported this far is MSCP */ Disk name? [] rd54 ^ /* You must know what type your disk is */ badsect? [n] ^^^^ /* No badsectoring yet */ ecc? [n] /* ECC is automatic, don't care */ removable? [n] /* Removable or not, like RA60 */ Interleave? [0] 1 /* All MSCP disks is seen like 1 interleave */ rpm? [0] 3600 ^ /* 3600 rpm is normal */ trackskew? [0] /* don't care */ cylinderskew? [0] /* don't care */ headswitch? [0] /* don't care */ track-to-track? [0] /* don't care */ drivedata 0? [0] /* don't care */ drivedata 1? [0] /* don't care */ drivedata 2? [0] /* don't care */ drivedata 3? [0] /* don't care */ drivedata 4? [0] /* don't care */ bytes/sector? [0] 512 /* Probably only size on VAX systems */ ^^^ sectors/track? [0] 17 /* You must know this, check disktab file */ ^^ tracks/cylinder? [0] 15 /* You must know this, check disktab file */ ^^ sectors/cylinder? [0] 255 /* sectors/track * tracks/cylinder */ ^^^ cylinders? [0] 1221 /* You must know this, check disktab file */ ^^^^ a partition: offset? [0] /* Partition sizes are set by you. */ size? [0] 20000 /* Take default sizes from disktab or */ b partition: offset? [0] 20000 /* calculate your own partition sizes */ size? [0] 20000 c partition: offset? [0] size? [0] 311200 d partition: offset? [0] size? [0] e partition: offset? [0] 40000 size? [0] 271200 f partition: offset? [0] size? [0] g partition: offset? [0] size? [0] h partition: offset? [0] size? [0] (E)dit, (S)how, (D)efaults, (W)rite, (Q)uit) : s /* Show what you've typed */ ^ disk type 2 (MSCP), rd54: interleave 1, rpm 3600, trackskew 0, cylinderskew 0 headswitch 0, track-to-track 0, drivedata: 0 0 0 0 0 bytes/sector: 512 sectors/track: 17 tracks/cylinder: 15 sectors/cylinder: 255 cylinders: 1221 8 partitions: size offset a: 20000, 0 b: 20000, 20000 c: 311200, 0 d: 0, 0 e: 271200, 40000 f: 0, 0 g: 0, 0 h: 0, 0 (E)dit, (S)how, (D)efaults, (W)rite, (Q)uit) : w /* Write label to disk */ This program does not (yet) write bootblocks, only disklabel. Remember to write the bootblocks from the miniroot later with the command "disklabel -B <diskname>". (E)dit, (S)how, (D)efaults, (W)rite, (Q)uit) : q -- Ragge -------------------- End included text ---------------------------------- After you've finished writing labels (and you've exited from the 'edlabel' program), you can halt your VAX ("Break" key, CTRL/P, or "Halt" button) and boot off the installation tape again (remember: B/3).

It might be a good idea to start the 'edlabel' program once more and enter the 's' (for "show") command, just to verify that the label was written correctly to disk. Once you've done this you need to halt your VAX again and boot off the installation tape once more (still using B/3).

A note about partition sizes (in a message from Ragge):

-------------------- Begin included text -------------------------------- Anyway, I have a couple of NetBSD/vax, and I usually set up them like this: psi# df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/hp1a 15199 6404 8035 44% / /dev/hp1d 7319 0 6953 0% /tmp /dev/hp1e 7591 411 6800 6% /var /dev/hp1f 426263 86481 318468 21% /usr This layout will do on most common systems, like MicroVAX (RD54). A root partition on about 10-15 MB, swap on 16-30 MB, separate /tmp on 7MB, var on 7MB and rest /usr. -- Ragge -------------------- End included text ---------------------------------- Now you're ready to go to the next section...

3.10 How do I use 'copy' to install the miniroot?

A: When you boot off the installation tape you will (after a few minutes) see a prompt like this:

Nboot
:

Here you enter "copy" and press return. You will see some more booting messages and finally enter the 'copy' program itself.

Here is some information taken from Ragge's README.copy file, found in the root directory of the NetBSD/VAX distribution, about using 'copy' (slightly edited by me for clarity. Sorry, Ragge!):

-------------------- Begin included text -------------------------------- $NetBSD: README.copy,v 1.1 1995/09/16 12:00:20 ragge Exp $ How to use copy ------------------ Copy is a standalone program that can copy multiple volumes from disk/tape to disk/tape. Mostly it is used to copy the miniroot filesystem onto the swap partition during initial installation. You will here be guided through a session, things with ^^^^ under is typed in by the user, comments are within /* */. This is an installation from TK50. Nboot : copy ^^^^ 10480+468+34868 start 0x0 copy: This program will read miniroot from tape/floppy/disk and install this miniroot onto disk. Specify the device to read from as xx(C,N,0), where xx is the device-name, C is controller-number and N is the unit-number, e.g. "tms(0,0,1)" for the first file on the first TMSCP-tape (TK50), /* MUA0 */ "ra(0,2,1)" for the third MSCP-disk/floppy (RX33/RX50) /* DUA2, b partition */ device to read from ? tms(0,0,1) /* Tape 0, file 1 e.g. MUA0 */ ^^^^^^^^^^ /* tms(0,0,0) if you're copying from a separate tape (e.g. VMS written tape). */ Specify number of blocks to transfer. Usually this is sizeof(miniroot) / 512. It's safe to transfer more blocks than just the miniroot. The transfer-size must be smaller than memory-size minus 1MB. number of blocks ? 4096 /* Miniroot size is 4096 block */ ^^^^ If your miniroot is split into volumes, then you must specify the number of blocks per volume. (e.g. 800 blocks per RX50, 2400 blocks per RX33) number of blocks per volume ? [4096] Make sure unit tms(0,0,1) is online and holds the proper volume. Then type 'g' to Go or 'a' to Abort. OK to go on ? [g/a] g /* g == go, a == abort */ ^ Reading ... Reading of miniroot done. (4096 blocks read) Now specify the device to write miniroot to as xx(C,N,1) where xx is the drive type, C is controller-number and N is the drive-number. For example: ra(0,0,1) refers to MSCP drive #0, b partition /* DUA0 */ Root disk ? : ra(0,0,1) /* Actually DUA0, b partition (swap) */ ^^^^^^^^^ Initializing partition ... done. (4096 blocks written.) Halt the machine and reboot from distribution media, giving b partition as part to mount as root. Ex: : ra(0,0,1) for DUA0, ra(1,1,1) for DUB1 Halt/Reboot the machine NOW. ?02 EXT HLT PC = 001005F3 >>> -- Ragge -------------------- End included text ---------------------------------- After you've finished copying miniroot you can halt your VAX ("Break" key, CTRL/P, or "Halt" button) and boot off the installation tape again (remember: B/3).

Now you're ready to go to the section on booting the miniroot from disk...

3.11 When I run 'copy' it says it's copying to the "a" partition. What's going on?

A: You're trying to install V1.0A. Don't. Get version 1.2 from the nearest ftp archive. If you absolutely have to install V1.0A please note the following:

As Ragge said:

"This is a typo in the copy program. Don't care about that."

3.12 How do I boot the miniroot from disk?

A: When you boot off the installation tape you will (after a few minutes) see a prompt like this:

Nboot
:

Now you enter the disk on which you installed the miniroot system and the name of the kernel to boot (always "netbsd" at this stage). If this was the b partition on DUA0 you would enter: ra(0,0,1)netbsd

Likewise, for the b partition on DUB1 you would enter: ra(1,1,1)netbsd

Like this:

Nboot
: ra(0,0,1)netbsd
You will see some booting messages and then you will be prompted for the device to mount as root (actually the device to read the root partition into memory from). It will look like this:

Root device?

Enter the name of the disk you copied the miniroot system onto on the form used by the "normal" NetBSD/VAX environment but with an asterisk ("*") instead of partition letter: ra0* for DUA0, ra2* for DUA2. The dialog will then look something like this:

Root device? ra0*
After all that you will get a second prompt:

Enter pathname of shell or RETURN for sh:

Just press return. You will now be in a normal single user shell.

You are ready to continue the installation. First you will have to create file systems on the partitions you created with 'edlabel', then you will have to write boot blocks to the disk you install the root (/) partition on (normally the same disk you've been working on all along).

3.13 How do I use 'newfs' to create filesystems?

A: You enter the command 'newfs <devicename>', where devicename is the partition you want to create a filesystem on.

Examples:


# newfs /dev/rra0a
for creating a filesystem on partition a on DUA0, and:


# newfs /dev/rra2e
for creating a filesystem on partition e on DUA2.

Remember that you are now running the normal NetBSD/VAX environment and you will have to use the "normal" device names (see section 3.6). You should use the raw-device (rra, not ra).

Note that you do not have to create a filesystem in partition b (the swap partition), in fact if you do you will wipe out the very miniroot filesystem that you are currently running from!

3.14 How do I use 'disklabel' to write boot blocks?

A: You enter the command 'disklabel -B <devicename>', where devicename is the name of your root disk (normally the same disk you've been working on all along). To write boot blocks to DUA0 you would enter:


#disklabel -B ra0
In this special case you can enter just the disk name without the partition letter, disklabel automatically writes to the c partition of the raw device for your disk (in this case /dev/rra0c). For more information on NetBSD/VAX devicenames, please see section 3.6.

Also take a look at section 3.15 if the above command fails...

3.15 Where is the 'raboot' boot image?

A: You're trying to install V1.0A. Don't. Get version 1.1A from the nearest ftp archive. If you absolutely have to install V1.0A please note the following:

raboot is not there! ;-) Here are Ragge's instructions on how to find it:

------------------- Begin included message ------------------------------- Date: Sun, 22 Oct 1995 22:17:42 +0100 (MET) From: Anders Magnusson <ragge@ludd.luth.se> To: "Holger B. Austinat" <hba1@cec.wustl.edu> Cc: port-vax@NetBSD.ORG Subject: Re: Problem with writing bootblock > > Last night we installed the miniroot on a MicroVaxII on an RD54 drive in > the swap partition (ra0b). We then wanted to create the bootblock on the > first partition (ra0a), but got the following error: > > #disklabel -B ra0a > disklabel: /usr/mdec/aboot: No such file or directory > Yes, I know. The file raboot wasn't in the miniroot distribution. :-/ But you can either get it from some ftp server in arch/vax/misc subdir or create it out of the bootable tape (If you used TK50 for installation). In that case, first remount your miniroot writable, then use dd to get it from tape: # mount -u /dev/ra0b / # cd /usr/mdec # dd if=/dev/rmt8 of=raboot bs=512 count=16 Then you have your bootblocks. -- Ragge -------------------- End included message --------------------------------

3.16 How do I install the rest of NetBSD/VAX?

A: You have several options. You can install from tape (but not TU58 yet!), via ftp or via NFS from another machine.

First you will need to mount the partitions you created with 'newfs':

Mount the root partition (all examples use DUA0 (ra0) as the install disk):

# mount /dev/ra0a /mnt
If you want to put /usr on a different partition you will have to mount that as well. First create the /usr directory on the new root partition (now temporarily mounted on /mnt):
# mkdir /mnt/usr
Next mount the new /usr partition onto your new root partition (partition e used as /usr in this example, you can use any partition you like except a (used already as root), b (swap) and c (the entire disk), provided you set up the partition with sufficient space when you ran 'edlabel'):
# mount /dev/ra0e /mnt/usr
You will need to put a kernel and boot loader on your new root partition (note that the kernel should be called "netbsd", not "gennetbsd" when you copy it to your new root partition):
# cp /gennetbsd /mnt/netbsd
# cp /boot /mnt/boot
(The above section is based on information from David Brownlee <david@mono.org>)

Next step is to install the distribution binaries to your new partitions.

To install from tape:

First you will have to write the distribution tar files to tape. The following example is from DEC MIPS/Ultrix, check your documentation for variations on your system:

You will have to 'gunzip' the files first:

# gunzip bin.tar.gz
# gunzip etc.tar.gz
and so on...

Then use 'dd' to copy the files to tape:

# dd if=bin.tar of=/dev/nrmt0h bs=512
# dd if=etc.tar of=/dev/nrmt0h bs=512
  ...
Unload the tape and load it into your VAX. Go to the directory where the new root partition is mounted (/mnt if you followed the previous example):
# cd /mnt
Extract the files from tape:
# tar --unlink -xpvf /dev/nrmt8
Note the "n" in nrmt8, for norewind.

Repeat for each tar file. Also see Bertram Barth's notes below on using the "--unlink" option with 'tar'. Note that not all flavors of 'tar' accept the "--unlink" option, check the documentation for your system.

To install from the net using ftp or NFS:

The following is from a message from Bertram Barth <bertram@ifib.uni-karlsruhe.de>:

------------------- Begin included message ------------------------------- Date: Tue, 20 Feb 1996 16:51:18 +0100 From: Bertram Barth <bertram@ifib.uni-karlsruhe.de> To: Gunnar Helliesen <gunnar@bitcon.no> Subject: First beta of FAQ ready! > There is one specific procedure that I have never tried myself and would > like a rundown on: How do you ftp the rest of the distribution from the > miniroot system? I'll need every step, including the ifconfig command(s), > the route command(s) and everything else needed to get ftp (and NFS!) > working. [I've never checked the route-part of this since I don't have a router in my local network. But that's the way it works in NetBSD/i386] Let's assume you've rebooted your VAX from miniroot and you have a local network with ip-addresses 111.222.33.???. In order to use the VAX's Ethernet device you need to assign an IP-address to it: /sbin/ifconfig <if-name> inet <ip-address> <if-name> is the name of the ethernet-interface, eg. "de0" on 11/750 or "qe0" on an MicroVAX II (for the first/only interface). <ip-address> is the dotted quad describing the ip-address you want to assign to your VAX. Thus to assign an ip-address of 111.222.33.44 to the DEQNA on a MicroVAX II you'd use: ifconfig qe0 inet 111.222.33.44 Now it should be possible to reach (ping/ftp/telnet/...) all the hosts in your local network. To reach hosts outside your local network from the VAX you need to have a router in your network (eg. 111.222.33.1) and to tell the VAX to use this router with the comand: route add default 111.222.33.1 Now you can use ftp or nfs to access the rest of the distribution. FTP: change to a big enough directory (eg. /mnt/usr/tmp, you will have to mkdir it) and "get" the distribution files in binary(!) mode. NFS: make sure that the server exports the directory holding the distribution files to your VAX. (on the server: showmount -e) Assuming your nfs-server has ip-address 111.222.33.4 and holds the distribution files in /a/b/c, on the VAX use mount 111.222.33.4:/a/b/c /mnt2 BOTH: Now change into the directory holding the distribution files and extract/install the files for each set, eg. cat bin* | gunzip | (cd /mnt; tar --unlink -xpvf -) cat etc* | gunzip | (cd /mnt; tar --unlink -xpvf -) ... [IMPORTANT NOTE] Don't forget the "--unlink" option! miniroot holds shared binaries (ie. one large file and many links to that file). Thus before installing a file which was a link to the shared binary before, it's neccessary to remove the link first and then write the new file. Without the "--unlink" option the links would stay unchanged and the shared binary would be replaced (many times) by one of the tools/files being links to the shared binary. Thus all but the last of the tools in the shared binary would NOT work. Now you've installed the complete distribution. As the next step you should edit the configuration files (/etc/hosts, /etc/netstart, /etc/fstab, /etc/hostname.<if-name>, /etc/myname, /etc/mygate, ...) according to your needs and reboot the machine in order to see if it all worked ... Ciao, bertram -------------------- End included message -------------------------------- Next, if you haven't already done so, create the special device files on your new root partition. Change directory to /dev on your new root partition. If you followed the examples above that should be /mnt/dev.

Run MAKEDEV to create all standard devices:

# ./MAKEDEV std
Then create your disk(s) and tape(s):
# ./MAKEDEV ra0
# ./MAKEDEV tms0
(The above creates special files for disk DUA0 and tape MUA0. Repeat for any other disks or tapes you might have in your system).

Before you boot your newly installed system you should create an fstab file (remember to put it in /mnt/etc). This is not as easy as it might sound, the 'vi' editor is not yet available and the 'ed' editor won't start up because /tmp and /var/tmp are currently read-only. This leaves you with two choices:

Mount the miniroot system with write access:

# mount -u /dev/ra0b /
(substituting ra0b with whatever disk/partition you installed the miniroot system in) and fire up the 'ed' editor.

Or, you can use another system to create the file:

# ifconfig qe0 inet 111.222.33.44
(of course substituting the IP address with a valid address for your network). See also the message from Bertram Barth in section 3.16 regarding accessing the network from the miniroot system. Now you can create the file on a remote system and ftp or NFS copy it to /mnt/etc/fstab.

Regardless of method the fstab file should look something like this:

/dev/ra0a                       /               ffs     rw 1 1
/dev/ra0e                       /usr            ffs     rw 1 3
Depending on how much physical RAM you've got in your machine it might be a good idea not to include the swap partition in fstab just yet. You might need the miniroot system in the swap partition again... ;-)

That's all! You're now ready to boot your installed system. See section 3.18 for more information.

3.17 Where is the netbsd kernel?

A: The /netbsd kernel is not included in the binary snapshot distribution. You will have to copy the /gennetbsd kernel from the tape (or from the miniroot filesystem) to /netbsd on your new root (/) partition. Remember to copy the file /boot as well.

3.18 How do I boot the installed system?

A: You enter the command 'B <devicename>' from the console prompt (>>> ) where devicename is the disk you installed NetBSD/VAX on.

Example:


>>> B DUA0
to boot NetBSD/VAX from DUA0. Note that you do not need the /3 qualifier this time...

3.19 I made it so far, now what?

A: This document is not intended to be a general Unix system manager's handbook, but here are some tips:

Setting up the network:

Take a look in /etc/netstart to see how things are done. You will need to create a hostname.<iface> file, where iface is the name of your network interface ('qe0' for a DEQNA on a QBUS machine, 'de0' for a DEUNA on a UNIBUS machine).

On a uVAX II with a DEQNA hostname.qe0 would look like this:

inet myvax.mydomain.dom
This requires the /etc/hosts file to be set up correctly:

#
127.0.0.1               localhost
#
111.222.33.44           myvax.mydomain.dom myvax
#
Some other files you will have to create/modify: (with examples)

/etc/myname (the name of your machine)

myvax.mydomain.dom
/etc/mygate (your network's default gateway)

111.222.33.1
/etc/defaultdomain (your domain)

mydomain.dom
/etc/resolv.conf (your network's DNS setup)

nameserver 111.222.33.10
nameserver 111.222.33.11
domain mydomain.dom
lookup bind yp file
Setting up swap:

When you're satisfied that your new system is working correctly and you won't need the miniroot again you can set up your system to swap on the b partition of your install disk (ra0b if you followed the examples in this document). Edit /etc/fstab and include the swap partition:

/dev/ra0b                       none            swap    sw 0 0
Enter the 'swapon' command to start swapping (or reboot the machine):

# swapon -a

3.20 An entirely different approach to installing...

Some people are more creative than others. Kevin Zachmann <zach@acsu.Buffalo.EDU> has made the most out of his hardware:

------------------- Begin included message ------------------------------- From zach@acsu.Buffalo.EDUWed Mar 20 06:45:21 1996 Date: Wed, 28 Feb 1996 19:53:28 -0500 (EST) From: Kevin Zachmann <zach@acsu.Buffalo.EDU> To: Gunnar Helliesen <gunnar@bitcon.no> Subject: Re: Great Web Page Sorry about the delay. This would have gone out earlier today if I hadn't inadvertently deactivated my account. Here's what I've got: How to install without a tk50 nor a network. I was faced with this dilema and didn't like the answer of "it can't be done". If you've got some other equipment, it can be. Obviously you need another source of getting the data to the drives. For me it was an unsupported (by NetBSD) 9track drive, a disk with VMS and a spare drive. Yeah, that's 3 disks and a 9track, plus an external source of writing the tapes. I would suspect that similar techniques could be used with only 2 disks if you had a PC running NetBSD or Ultrix on it now. I don't know enough about the drives and the hookups for PC operations. Somebody? might be able to confirm that nothing has changed in the superblocks between PC and Vaxen. So how does one go about doing it? First tapes. ------------ Well there are some facts that I didn't know that I know now. o VMS writes disks in 512 byte blocks only. o VMS reads tapes into unstructured variable length record files. o You can't pull a file off tape to just anywhere, and try to write it to the disk. You also can't pull an arbitrary block size file off a tape and write it the way you want. o I don't know much about VMS (but I guess I'd be labeled 'dangerous') o You can't boot from an MS device. msa0: (the TSV05 compatible controllers) are not bootable devices... But then I don't have a boot-prom card which I believe exists. So... what you need to do is write the tapes at a speed you can read in 512 byte blocks. Yes painful, but for me on a unix system this means using dd if=foo bs=512 of=/dev/foobar Oh, and gunzip the files first! VMS doesn't know what to do with a gzipped file, and you don't have NetBSD running to do it either! You need to prepare the target file on the VMS system. The solution to the variable length record is not in the writing of the tape, but in the overwriting of an existing file. Copy a file like sysboot.exe to some name you want to use ( like boot.fs ). Then issue copy/over mua0: boot.fs (msa0: for me) That copies your tape file onto a 512 byte fixed-record file. You can confirm this, and that you chose the right image to copy in the first place by issuing dir/full boot.fs It'll tell you the file is a record-structured 512 byte/record file. Viola! your image is now on your VMS disk in a usable format. Now booting. ------------ Who says you have to use a miniroot? :-) I found that copying boot.fs from the VMS system to my target NetBSD system drive works great! Use the commands: mount/foreign dua1: copy/contig boot.fs dua1: dismount dua1: You have now bypassed edlable, copy, and the miniroot! :-) Didn't even need to write a floppy! (Which is also possible to do, and I've done so. As I recall... use the same process but use the floppy drive, you don't need to copy sysboot.exe to the floppy, you are going to write the entire floppy in one fell swoop.) The nice thing about the boot.fs file that was provided, it contains the label information, or if it doesn't NetBSD does a great job of assuming it. I've not used edlabel yet, and it's 6 months and running. The rest of the system ---------------------- Ahh. This was the really painful part. This is also the reason for needing a third drive. Failures: I'm including my attempts, since someone might benefit from them. So I thought I could copy the tar images to ra0h, boot my NetBSD root and untar directly into a new filesystem at ra0g. (So I lied. I might have tried to use disklabel or something, I know I had no success but I persevered anyway. I couldn't tell you how to use it if my life depended on it.) Anyway this won't work. VMS 4.5 knows nothing about partitions. It uses the drive as one big block, and creates it's own swapfile in the general filespace. Later versions (5.x) might understand partitions, I don't know. Ok, what if we put the root on ra0g, and copy usr to ra0a. That would at least prove it were possible, and then we can putz with disk partitions. Nope. Shot down because NetBSD's generic kernel expects to find root at /dev/ra0a. Editing the fstab won't help. (Some people might recognize my questions/attempts to do this). Of course if someone can build a custom kernel for you, you can do anything you want! Success! Enter the spare drive. An rd51 pulled from a Pro. (VMS actually said that it backed it up, or at least copied it from disk to tape!) A larger spare drive would prevent a lot of grief, but I didn't have one. The steps: 1) Unpack the image you want to transfer, and put it on tape. 2) Pull it off tape onto a fixed-record-legnth file. 3) Copy it to your spare drive, just like the root was copied. 4) shutdown VMS, swap drives, boot NetBSD in single user mode. 5) Mount root writable (mount -w /) and mount /usr 5) Pull the image off the scratch drive. This is easiest done with dd if=/dev/ra1a bs=512 | pax -r Use -rv if you want to watch but remember it takes longer Oh, and be sure you're at root of the tar image to extract. (If you're pulling /sbin, be in /. If you're doing /usr/sbin, then / is the *wrong* place to be. Use pax with no option to get the listing of the tar image if you have no choice). 6) sync the drive, and halt. Swap back to your VMS drive and goto 1 By swapping drives several dozen times I've installed the entire binary distribution to my destination drive. I haven't given up VMS just yet because my 9track isn't working right with NetBSD. I don't want to isolate my machine entirely by having a system which doesn't have any way of getting data to it (like a PC with no floppy drive, no cdrom, no network and no tape drives!) Ultrix Notes, or 'what you should be able to do with a better starting point'. ------------ I don't have ultrix, but you should be able to prune this down to 2 disks and an ultrix supported tape drive. Why? Because ultrix understands disk partitions (after all it is a Unix...). You should be able to extract files from tape to your ultrix drive, and then dd them to the 'h' partition as I wanted to. From there booting NetBSD and unpacking from the h partition to the g partition should be a breeze. I'd be happy to entertain any questions about this whole proceedure. Zach zach@acsu.buffalo.edu -------------------- End included message --------------------------------

3.21 Can I netboot my VAXen from a Unix server?

A: Yes you can. Brian D. Chase <brianc@carpediem.com> has written a very nice HOWTO about netbooting VAXen via MOP from Unix machines:

http://www.carpediem.com/~brianc/projects/vaxen/

In addition, Vincent J. Arkesteijn <vincent@mat002102.student.utwente.nl> outlined this procedure in a message to the port-vax list:

------------------- Begin included message ------------------------------- Hi, > It would be very good if some Linux guy could try to install this > and document every step needed, so that it can be put up on the FAQ. > > -- Ragge After some trial and error, I managed to boot my vs2000 from a linux box. I have it up to and including starting the kernel. First, you need mopd to send the bootfile to the vax. On ftp://ftp.stacken.kth.se/pub/OS/NetBSD/mopd/mopd-linux-2.5.3.tar.gz you can find a mopd which compiles without any problems. Then, you create /tftpboot/mop/. In that directory, you put the file ftp://ftp.netbsd.org/pub/NetBSD/arch/vax/snapshot/boot.mopformat Now, you need to know the ethernet address of the vax. On the boot prompt of the vax, you type 'test 50'. On the line starting with 'ID', you can see the ethernet address. Then, you make a symlink in /tftpboot/mop xxxxxxxxxxxx.SYS -> boot.mopformat (with xx your ethernet address, without any dashes or colons). Now, you can start mopd with 'mopd eth0'. After loading the boot-file, the vax will send a rarp request to find out it's ip number. To be able to answer this request, linux has to have rarp enabled in the kernel. This involves reconfiguring, recompiling and installing the linux kernel. Then, linux must know which ip address to give to a certain ethernet-address. For this, you use /sbin/rarp. I put the line '/sbin/rarp -s VjAX1 08:00:2b:0c:c0:9b' in /etc/rc.d/rc.inet1 (VjAX1 is the name of the vax, as declared in /etc/hosts, and the long number is the eternet address of my vax). After RARPing, the vax wants to know where it can find its root and swap fs. It can be told via bootparam. This was the hardest part. After some unsucessfull tries with the rpc.bootparamd supplied with Linux-Xkernel-2.0a.tar.gz (which is a rather complete package to use old sun3's as an X-terminal with a linux server), the bootparamd in the NetKit-0.09 did compiled wihout problems. You van find this at ftp://ftp.uk.linux.org/pub/linux/Networking/base/NetKit-0.09.tar.gz (or on any sunsite or funet mirror). First go to the rpcgen directory and type make, then go to the rpc.bootparamd directory and type make. The bootparamd needs a configuration file, /etc/bootparams. Mine looks like this: VjAX1 root=bla:/mnt_vax/NetBSD/root swap=bla:/mnt_vax/NetBSD/swap (with bla the name of thelinux box). root should contain some root fs, but now only contains the kernel, named netbsd, which is the same as ftp://ftp.netbsd.org/pub/NetBSD/arch/vax/snaphost/netbsd.GENERIC Of course, for the vax to be able to nfs-mount its root and swap, the linux box has to have an nfs server running. You do this by putting a line like /mnt_vax VjAX1 (rw, no_root_squash) in your /etc/exports and starting /usr/sbin/rpc.portmap, /usr/sbin/rpc.mountd and /usr/sbin/rpc.nfsd. Now, your vax should be able to boot NetBSD. With my setup, the kernel stops with warning: no /dev/console init: not found panic: no init Stopped at 0x80009a2d: ret db> because I only have the kernel in the root fs. I don't have time right now to make enough space and install the whole root fs, but I think it should work without any further problems. Good luck and have fun. Vincent. -- %! v.j.arkesteijn@student.utwente.nl pa3gog@pi8daz.#twe.nld.eu gsave 12 setlinewidth newpath 72 72 moveto 468 216 rlineto -468 216 rlineto 468 216 rlineto 306 612 moveto 0 -216 rlineto stroke showpage grestore -------------------- End included message --------------------------------

Top of next chapter, Table of contents of next chapter.
Table of contents of this chapter, General table of contents.