NetBSD-5.0.2/distrib/notes/common/xfer

.\"	$NetBSD: xfer,v 1.63.2.1 2009/04/25 23:16:34 snj Exp $
.\"
.\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.
.\" ---------- MD instructions on setting up boot media
.
.if \n[acorn26] \{\
To boot
.Nx ,
you will need the bootloader
.Pq Ic boot26
and the kernel you wish to boot on a RISC OS file system somewhere.
.Ic boot26
can boot gzipped kernels, so there's no need to gunzip it.
.Pp
.\} \" \n[acorn26]
.
.if \n[arc] \{\
You will need to create a CD with an install kernel on it or have
a FAT partition and working other OS (Windows NT) which can write
install files into it.
.Pp
.\} \" \n[arc]
.
.if \n[cats] \{\
You will need to create a CD with an install kernel on it or have another
machine available to allow net booting.
.Pp
.\} \" \n[cats]
.
.if \n[hp700] \{\
To boot
.Nx ,
you will need a server running the appropriate netboot protocol with a
Logical Interchange Format (LIF) volume of the kernel you wish to boot, or
the
.Pa netinstall.lif
volume available in the
.Pa hp700/installation
directory of the
.Nx
distribution.
.Pp
Booting from CD is not currently available.
.Pp
.\} \" \n[hp700]
.
.if \n[i386] \{\
If you are not booting off a CD-ROM, you will need to have some floppy
disks to boot off;
either three 1.44 MB floppies or one 1.2 MB floppy.
.Pp
Use
.Pa boot1.fs
and
.Pa boot2.fs
for VGA installation.
.Pa boot-com1.fs
and 
.Pa boot-com2.fs
are available if you wish to use a serial console.
.Pp
If you are using a
.Ul
system to write the floppy images to
disks, you should use the
.Xr dd
command to copy the file system image(s)
(.fs file) directly to the raw floppy disk.
It is suggested that you read the
.Xr dd 1
manual page or ask your system administrator to determine the correct
set of arguments to use; it will be slightly different from system to
system, and a comprehensive list of the possibilities is beyond the
scope of this document.
.Pp
If you are using
.Tn MS-DOS
to write the floppy image(s) to floppy disk, you should use the
.Ic rawrite
utility, provided in the
.Pa i386/installation/misc
directory of the
.Nx
distribution.
It will write a file system image (.fs file) to a floppy disk.
A
.Ic rawrite32
is also available that runs under
.Tn MS Windows .
.Pp
.\} \" \n[i386]
.
.if \n[hp300]:\n[macppc] \{\
You should wait to decide where to put the
.Nx
distribution sets until you have figured out how you are going to boot
your system.
Refer back to this section after you have done so.
.Pp
.\}
.if \n[macppc] \{\
.(Note
Some
.Tn Mac OS
.Ic ftp
clients default to downloading files in
.Sq ASCII
mode.
This will render the
.Nx
files useless.
Make sure to set your ftp program to download in
.Sq binary
mode.
.Note)
.Pp
.\} \" \n[macppc]
.
.if \n[ews4800mips]:\n[news68k]:\n[newsmips] \{\
.(Note
.Nx*M
\*V
.if \n[ews4800mips] \{\
does not support framebuffers other than onboard ones on
EWS4800/350, EWS4800/360AD and EWS4800/360ADII so
you have to use serial console on installation procedure
if your machine doesn't have supported framebuffers listed above.
.\} \" \n[ews4800mips]
.if \n[news68k] \{\
does not support any framebuffers (yet) so
you have to use serial console on installation procedure.
.\} \" \n[news68k]
.if \n[newsmips] \{\
does not support any framebuffers other than NWB-253 on NWS-3470D and
XA on NWS-5000 (yet) so
you have to use serial console on installation procedure
if your machine doesn't have supported framebuffers listed above.
.\} \" \n[newsmips]
.Note)
.Pp
You will need to have
.if \n[ews4800mips] two 1.44 MB floppy disks
.if \n[news68k] a 1.44 MB floppy disk
.if \n[newsmips] two 1.44 MB floppy disks
to boot off.
You must put the boot floppy image onto this disk, which contains
software to install
.Nx
system.
.Pp
If you are using a
.Ul
system (such as
.if \n[ews4800mips] \{\
.Tn EWS-UX
.\} \" \n[ews4800mips]
.if \n[news68k]:\n[newsmips] \{\
.Tn NEWS-OS
.\} \" \n[news68k]:\n[newsmips]
or other
.Nx
machines) to write the floppy images to disks, you should use the
.Xr dd 1
command to copy the file system image(s)
(.fs file(s)) directly to the raw floppy disk.
It is suggested that you read the
.Xr dd 1
manual page or ask your system administrator to determine the correct
set of arguments to use; it will be slightly different from system to
system, and a comprehensive list of the possibilities is beyond the
scope of this document.
.Pp
If you have an i386 machine which runs
.Tn MS-DOS
and use it to write the floppy image(s) to floppy disk,
you can use the
.Ic rawrite
utility, provided in the
.Pa i386/installation/misc
directory of the
.Nx
distribution.
It will write a file system image (.fs file) to a floppy disk.
A
.Ic rawrite32
is also available that runs under
.Tn MS Windows .
.Pp
Though
.Nx*M
uses the floppy disk to boot for the initial
installation, the
.Nx*M
kernel does not support the
floppy device.
Some other machines or systems are still required to write floppy images
even after
.Nx*M
has been installed.
.Pp
If your machine doesn't have any SCSI disks, or the SCSI interface
on your machine is not supported, it can still run
.Nx*M
diskless.
No file transfer is needed, and all you have to do is to prepare files on
the server.
More information about diskless setups can be found at
.Lk http://www.NetBSD.org/docs/network/netboot/
.Pp
.if \n[ews4800mips] \{\
The PROM uses the ordinary tftp protocol, so
you can load bootloader via network.
The PROM also supports tape boot but
.Nx*M
does not support it currently.
.Pp
After the boot floppy or diskless server is prepared, just set
boot device on the PROM menu which can be invoked by pressing ESC key
right after hardware checks.
.\} \" \n[ews4800mips]
.if \n[news68k] \{\
The
.Tn NEWS
PROM also supports tape boot and network boot, but
.Nx*M
does not support them currently.
.Pp
After the boot floppy is prepared, just type
.Ic "bo fh"
on the PROM prompt to boot it.
.Pp
.\} \" \n[news68k]
.if \n[newsmips] \{\
On NWS-3xxx machines, the PROM also supports network boot but it uses
an unusual protocol which is not supported by
.Nx*M .
On NWS-5000 machines, the PROM uses the ordinary tftp protocol, so
you can load bootloader via network by
.Ic "bo tftp()"
command on the PROM prompt.
.Pp
The
.Tn NEWS
PROM also supports tape boot, but
.Nx*M
does not support that currently.
.Pp
After the boot floppy is prepared, just type
.Ic "bo fd"
(NWS-5000) or
.Ic "bo fh"
(NWS-3xxx) on the PROM prompt to boot it.
.\} \" \n[newsmips]
.Pp
.\} \" \n[ews4800mips]:\n[news68k]:\n[newsmips]
.
.if \n[pmax] \{\
First-time installation on a bare machine is not supported, because most
DECstations do not have any suitable load device.
Some versions of the DECstation PROM are buggy and will not boot via
.Tn TFTP
and bootp; other versions are buggy and do not boot via
.Tn MOP .
.Pp
The only DECstation with a floppy-disk drive is the Personal DECstation,
and that device is not supported as a boot device.
.Pp
The recommended installation procedure is to boot an install kernel
via
.Tn TFTP ,
or to use a
.Dq helper
system to write a miniroot diskimage onto a disk, move that
disk to the target installation system, and then boot the miniroot.
.Pp
.\} \" \n[pmax]
.
.if \n[vax] \{\
Installing on a
.Sq bare
machine requires some bootable
device; either a tape, CD-ROM or floppy drive or a NFS server together
with a machine that can act as a MOP loader, such as another
machine running
.Nx .
.Nx*M
can use both BOOTP/DHCP and
BOOTPARAMS for netboot installations.
.Pp
.\} \" \n[vax]
.
.if \n[x68k] \{\
You will have to prepare the `ramdisk-root' installation system.
There are two ways to invoke the
.Nx
installation system;
.Pp
.(bullet -compact -offset indent
Use the
.Pa loadbsd.x
utility to boot
.Nx
from
.Tn Human68k
.It
Make a boot floppy which contains the installation system
.bullet)
.Pp
If you choose the first method,
you have to put the compressed installation kernel
.Pa netbsd-INSTALL.gz ,
the
.Pa loadbsd.x
utility and the
.Pa gzip.x
utility to a disk accessible from Human68k.
These files can be found in the
.Pa x68k/binary/kernel
directory or
.Pa x68k/installation/misc
directory of the
.Nx
distribution.
The
.Pa netbsd-INSTALL
file needs to be uncompressed from
.Pa netbsd-INSTALL.gz
using the provided
.Ic gzip.x
program with the
.Fl d
switch. 
.Pp
To invoke the installation system, just type
.Pp
.Dl Ic "gzip.x -d netbsd-INSTALL.gz"
.Dl Ic "loadbsd.x netbsd-INSTALL"
.Pp
from the
.Tn Human68k
command line.
.Pp
If you choose the second method, you have to make the boot floppy
from the floppy image
.Pa sysinst.fs .
The image file can be found in
.Pa x68k/installation/floppy
directory of the
.Nx
distribution.
.Pp
If you are using a
.Ul
system to write the floppy image to
disks, you should use the
.Pa dd
command to copy the file system images (.fs files) directly to the raw
floppy disks.
It is suggested that you read the
.Xr dd 1
manual page or
ask your system administrator to determine the correct set of
arguments to use; it will be slightly different from system to system,
and a comprehensive list of the possibilities is beyond the scope of
this document.
.Pp
If you are using
.Tn Human68k
to write the floppy images to disks, you should use the
.Ic rawrite
utility, provided in the
.Pa x68k/installation/misc
directory of the
.Nx
distribution.
PC versions can be found in
.Pa i386/installation/misc .
It will write the file system images (.fs files) to disks.
.Pp
To use the boot floppy, insert the floppy to your floppy drive 0,
and reboot your computer with OPT.1 key pressed.
.Pp
If you have less than 5MB of memory, you have to use the
`floppy-root' installation system instead of the above
`ramdisk-root' installation system.
`Floppy-root' installation
system is composed of two floppies, `kern' and `inst'.
They are made from the floppy images
.Pa kern.fs
and
.Pa inst.fs
respectively, both of which are found in
.Pa installation/floppy
directory of the
.Nx
distribution.
The
.Pa inst.fs
file needs to be uncompressed from
.Pa inst.fs.gz
using the provided
.Ic gzip.x
program with the
.Fl d
switch. 
See above how to write the images to floppies.
.Pp
To start the `floppy-root' installation system, insert the `kern' floppy
to your floppy drive 0, and reboot your computer with OPT.1 key pressed.
When you are prompted that `Insert file system floppy and press return.',
replace the `kern' floppy with `inst' floppy and press return key.
.Pp
Once booted, the `floppy-root' installation system is identical with
the `ramdisk-root' installation system, except that the former constantly
accesses the floppy disk.
Floppy disks are relatively unreliable media and cause some warning messages
to report access errors, most of which are corrected and can be ignored.
With the latter installation system the floppy disk is not used once the
system has booted off and can be removed from the drive.
.Pp
.(Note
The `floppy-root' installation system cannot be used to install
.Nx*M
on a machine with less than 5MB of memory.
.Note)
.Pp
.\} \" \n[x68k]
.
.if !\n[hp700]:\n[x68k] \{\
Note that if you are installing or upgrading from writable media,
it can be write-protected if you wish.
These systems mount a root image from inside the kernel, and will not
need to write to the media.
If you booted from a floppy, the floppy disk may be removed from
the drive after the system has booted.
.Pp
.\} \" \n[x68k]
.
.\" --------- MI instructions for getting distribution off installation medium
.
Installation is supported from several media types, including:
.Pp
.(bullet -offset indent -compact
.
.if \n[amiga] \{\
.Tn AmigaDOS
.It
.\} \" \n[amiga]
.
CD-ROM / DVD
.
.It
.Tn MS-DOS No floppy
.
.It
FTP
.
.if \n[x68k] \{\
.It
Magneto-Optical (M-O) or other removable SCSI disk
.\} \" \n[x68k]
.
.It
Remote NFS partition
.
.It
Tape
.
.It
Existing
.Nx
.if \n[macppc] \{\
or
.Tn MacOS X
UFS
.\} \" \n[macppc]
partitions, if performing an upgrade
.
.bullet)
.Pp
.
The steps necessary to prepare the distribution sets for installation
depend upon which installation medium you choose.
The steps for the various media are outlined below.
.if \n[sparc64] \{\
.(Note
If you are installing the 32-bit sparc distribution sets, you will need to 
rename
.Pa sparc/binary/sets/kern-GENERIC_SUN4U.tgz
to
.Pa kern-GENERIC.tgz
since the \*M installation tools would otherwise attempt to install the 
kernel for 32-bit sparc computers which does not boot on \*M systems.
.Note)
.\}
.
.(tag MS-DOS\ floppy
.
.if \n[amiga] \{\
.It Em AmigaDOS partition
To install
.Nx
from an
.Tn AmigaDOS
partition, you need to get the
.Nx
distribution sets you wish to install on your system on to an
.Tn AmigaDOS
partition.
.Pp
Note where you place the files as you will need this later.
.Pp
Once you have done this, you can proceed to the next
step in the installation process, preparing your hard disk.
.\} \" \n[amiga]
.
.It Em CD-ROM / DVD
.if \n[amiga] \{\
To install
.Nx
from a CD-ROM drive, make sure it is a SCSI CD-ROM on a SCSI bus currently
supported by
.Nx
(refer to the supported hardware list) or an ATAPI CD-ROM connected to the
A1200 or A4000 internal IDE connector.
If it is a SCSI CD-ROM on a non-supported SCSI bus like Blizzard-3 SCSI
or Apollo SCSI you must first copy the distribution sets to an
.Tn AmigaDOS
partition as described above.
.Pp
If your SCSI CD-ROM is connected to a supported SCSI host adapter,
or it is an ATAPI cd-rom connected to the A1200/A4000 internal IDE
connector, simply put the CD into the drive before installation.
.Pp
.\} \" \n[amiga]
Find out where the distribution set files are on the CD-ROM or DVD.
Likely locations are
.Pa binary/sets
and
.Pa \*M/binary/sets .
.Pp
Proceed to the instructions on installation.
.
.It Em MS-DOS floppy
.Nx
does not include split distribution sets for installation by floppy.
However, they can be created on a separate machine using the
.Xr split 1
command, running e.g.
.Ic split -b 235k base.tgz base.
to split the
.Pa base.tgz
file from
.Pa \*M/binary/sets
into files named
.Pa base.aa ,
.Pa base.ab ,
and so on.
Repeat this for all
.Pa set_name.tgz
files, splitting them into
.Pa set_name. Ns Ar xx
files. 
Count the number of
.Pa set_name. Ns Ar xx
files that make up the
distribution sets you want to install or upgrade.
.ie \n[i386] \{\
You will need one fifth that number of 1.2 MB floppies, or one sixth that
number of 1.44 MB floppies.
You should only use one size of floppy for the install or upgrade
procedure; you can't use some 1.2 MB floppies and some 1.44 MB floppies.
.\} \" \n[i386]
.el \{\
You will need one sixth that number of 1.44 MB floppies.
.\} \" ! \n[i386]
.Pp
Format all of the floppies with
.Tn MS-DOS .
Do
.Em not
make any of them bootable
.Tn MS-DOS
floppies, i.e. don't use
.Li format /s
to format them.
(If the floppies are bootable, then the
.Tn MS-DOS
system files that make them bootable will take up some space, and you
won't be able to fit the distribution set parts on the disks.)
If you're using floppies that are formatted for
.Tn MS-DOS
by their manufacturers, they probably aren't bootable, and you can use
them out of the box.
.Pp
Place all of the
.Pa "set_name." Ns Ar xx
files on the
.Tn MS-DOS
disks.
.Pp
Once you have the files on
.Tn MS-DOS
disks, you can proceed to the next step in the installation or upgrade process.
If you're installing
.Nx
from scratch, go to the section on preparing your hard disk, below.
If you're upgrading an existing installation, go directly to the
section on upgrading.
.
.It Em FTP
The preparations for this installation/upgrade method are
easy; all you need to do is make sure that there's an FTP
site from which you can retrieve the
.Nx
distribution when you're about to
install or upgrade.
If you don't have DHCP available on your network,
you will need to know the numeric IP address of that site, and,
if it's not on a network directly connected to the machine
on which you're installing or upgrading
.Nx ,
you need to know the numeric IP address of the router closest
to the
.Nx
machine.
Finally, you need to know the numeric IP address of the
.Nx
machine itself.
If you don't have access to a functioning nameserver during
installation, the IPv4 address of
.Sy ftp.NetBSD.org
is
.Li 204.152.190.13
and the IPv6 address is
.Li 2001:4f8:3:7:230:48ff:fe31:43f2
(as of April, 2009).
.Pp
Once you have this information, you can proceed to the next
step in the installation or upgrade process.
If you're installing
.Nx
from scratch, go to the section on preparing your hard disk, below.
If you're upgrading an existing installation, go directly to
the section on upgrading.
.
.if \n[x68k] \{\
.It Em M-O disk
To install
.Nx
from a device such as a removable SCSI disk or a magneto-optical disk,
the media
.Em must
be of the
.Tn IBM
.Em Super-floppy
format.
The
.Tn Human68k
format is not recognized by this release of the
.Nx*M .
If you have a
.Tn MS-DOS
or
.Tn MS Windows
machine with an M-O drive connected, use it.
If you don't, and if you have a program to handle
.Tn IBM
format M-O for
.Tn Human68k ,
copy all the files in the subdirectory
.Pa x68k/binaries
and
.Em "change their names to upper case".
.\} \" \n[x68k]
.
.It Em NFS
Place the
.Nx
distribution sets you wish to install into a
directory on an NFS server, and make that directory mountable
by the machine on which you are installing or upgrading
.Nx .
This will probably require modifying the
.Pa /etc/exports
file on the NFS server and resetting its mount daemon (mountd).
(Both of these actions will probably require superuser
privileges on the server.)
.Pp
You need to know the numeric IP address of the NFS server,
and, if you don't have DHCP available on your network and
the server is not on a network directly connected to
the machine on which you're installing or upgrading
.Nx ,
you need to know the numeric IP address of the router closest
to the
.Nx
machine.
Finally, you need to know the numeric IP address of the
.Nx
machine itself.
.Pp
Once the NFS server is set up properly and you have the
information mentioned above, you can proceed to the next step
in the installation or upgrade process.
If you're installing
.Nx
from scratch, go to the section on preparing your hard disk, below.
If you're upgrading an existing installation, go directly to the
section on upgrading.
.
.It Em Tape
To install
.Nx
from a tape, you need to make a tape that
contains the distribution set files, in
.Sq tar
format.
.if \n[pmax]:\n[vax] \{\
.(Note
the tape devices with which
.Nx*M
is believed to work is the
.Tn DEC
TK-50.
This is a very slow device.
Installation via disk or network is recommended if possible.
.Note)
.\} \" \n[pmax]:\n[vax]
.Pp
If you're making the tape on a
.Ul
system, the easiest way
to do so is probably something like:
.Pp
.Dl # Ic "tar -cf" Ar "tape_device dist_directories"
.Pp
where
.Ar tape_device
is the name of the tape device that
describes the tape drive you're using; possibly
.Pa /dev/rst0 ,
or something similar, but it will vary from system to system.
(If you can't figure it out, ask your system administrator.)
In the above example,
.Ar dist_directories
are the
distribution sets' directories, for the distribution sets you
wish to place on the tape.
For instance, to put the
.Sy kern-GENERIC, base, No and Sy etc
distributions on tape (in
order to do the absolute minimum installation to a new disk),
you would do the following:
.Pp
.Dl # Ic "cd \&.../NetBSD-\*V"
.Dl # Ic "cd \*M/binary"
.Dl # Ic "tar -cf" Ar tape_device Ic "kern-GENERIC base etc"
.Pp
.(Note
You still need to fill in
.Ar tape_device No in the example.
.Note)
.Pp
Once you have the files on the tape, you can proceed to the
next step in the installation or upgrade process.
If you're installing
.Nx
from scratch, go to the section on preparing your hard disk, below.
If you're upgrading an existing installation, go directly to the section
on upgrading.
.
.tag)