Home | History | Annotate | Line # | Download | only in sparc
install revision 1.4.2.1
      1      1.1  deraadt Installing NetBSD is a relatively complex process, but if you have
      2      1.1  deraadt this document in hand it shouldn't be too much trouble.
      3      1.1  deraadt 
      4      1.4       pk There are several ways to install NetBSD onto a disk. If your Sparcstation
      5      1.4       pk is hooked up in a network you can find find a server and arrange for a
      6      1.4       pk diskless setup which is a convenient way to install on a machine with
      7      1.4       pk a single disk attached. Alternatively, you could use SunOS (booted from
      8      1.4       pk a local disk) and install NetBSD onto a second disk. For the latter method,
      9      1.4       pk skip to the section "Installing from SunOS" below.
     10      1.4       pk 
     11  1.4.2.1       pk 
     12      1.4       pk Installing using a diskless setup.
     13      1.4       pk 
     14      1.4       pk First, you must setup a diskless client configuration on a server. Consult
     15      1.4       pk your server installation documents on how to proceed with this.
     16      1.4       pk Put all the *.tar.gz files you want to install into the root directory
     17      1.4       pk for your client on the server.
     18      1.4       pk 
     19      1.4       pk Next, unpack base.tar.gz on the server in the root directory for your machine.
     20  1.4.2.1       pk If you elect to you a separately NFS-mounted filesystem for `/usr' on your
     21  1.4.2.1       pk diskless setup, make sure the "./usr" base files in base.tar.gz end up
     22  1.4.2.1       pk in the correct location. One way to do this is to temporarily use a loopback
     23  1.4.2.1       pk mount on the server, re-routing <root>/usr to your server's exported
     24  1.4.2.1       pk NetBSD "/usr" directory. Also put the kernel into the root directory.
     25  1.4.2.1       pk 
     26      1.4       pk A few configuration files need to be edited:
     27      1.4       pk 
     28      1.4       pk 	<root>/etc/hosts
     29  1.4.2.1       pk 		Add the IP addresses of both server and client.
     30  1.4.2.1       pk 
     31      1.4       pk 	<root>/etc/myname
     32  1.4.2.1       pk 		This files contains the client's hostname; use the same
     33  1.4.2.1       pk 		name as in <root>/etc/hosts.
     34  1.4.2.1       pk 
     35      1.4       pk 	<root>/etc/fstab
     36  1.4.2.1       pk 		Enter the entries for the remotely mounted filesystems.
     37  1.4.2.1       pk 		For example:
     38  1.4.2.1       pk 			server:/export/root/client       /     nfs  rw 0 0
     39  1.4.2.1       pk 			server:/export/exec/sun4.netbsd  /usr  nfs  rw 0 0
     40  1.4.2.1       pk 
     41  1.4.2.1       pk Now you must populate the the `/dev' directory for your client. If you server
     42  1.4.2.1       pk runs SunOS 4.x, you can simply change your working directory to `<root>/dev'
     43  1.4.2.1       pk and run the MAKEDEV script: `sh MAKEDEV all'.
     44  1.4.2.1       pk 
     45  1.4.2.1       pk On SunOS 5.x systems, MAKEDEV can also be used, but there'll be error
     46  1.4.2.1       pk messages about unknown user and groups. These errors are inconsequential
     47  1.4.2.1       pk for the purpose of installing NetBSD. However, you may want to correct them
     48  1.4.2.1       pk if you plan to the diskless setup regularly. In that case, you may re-run
     49  1.4.2.1       pk MAKEDEV on your NetBSD machine once it has booted.
     50      1.4       pk 
     51      1.4       pk Boot your workstation from the server by entering the appropriate `boot'
     52      1.4       pk command at the monitor prompt. Depending on the PROM version in your machine,
     53      1.4       pk this command takes one of the following forms:
     54      1.4       pk 
     55      1.4       pk 	> b le()netbsd -s		# for sun4 monitors
     56      1.4       pk 	ok boot le()netbsd -s		# for version 1 OpenBOOT ROMs
     57      1.4       pk 	ok boot net netbsd -s		# for version 2 OpenBOOT ROMs
     58      1.4       pk 
     59      1.4       pk This will boot the NetBSD kernel in single-user mode.
     60      1.4       pk 
     61      1.4       pk [[
     62      1.4       pk NOTE: the latter two examples assume you operate the OpenBOOT ROM in
     63      1.4       pk "new command mode". If your machine comes up and gives you a `>' prompt
     64      1.4       pk instead of `ok', type:
     65      1.4       pk 
     66      1.4       pk     >n					# enter native OpenBOOT mode
     67      1.4       pk     ok setenv sunmon-compat? false	# make it permanent
     68      1.4       pk     ok
     69      1.4       pk ]]
     70      1.4       pk 
     71  1.4.2.1       pk If you use a diskless setup with a separately NFS-mounted /usr filesystem,
     72  1.4.2.1       pk mount /usr by hand now:
     73  1.4.2.1       pk 
     74  1.4.2.1       pk netbsd# mount /usr
     75  1.4.2.1       pk 
     76  1.4.2.1       pk At this point, it's worth checking the disk label and partition sizes on
     77  1.4.2.1       pk the disk you want to install NetBSD onto. NetBSD understands SunOS-style
     78  1.4.2.1       pk disklabels, so if your disk was previously used by SunOS there will be
     79  1.4.2.1       pk a usable label on it. Use `disklabel -e <disk>' (where <disk> is the
     80  1.4.2.1       pk device name assigned by the NetBSD kernel, e.g. `sd0') to view and
     81  1.4.2.1       pk modify the partition sizes. A comfortable size for the root filesystem
     82  1.4.2.1       pk partition is about 20MB; a good initial size for the swap partition is
     83  1.4.2.1       pk twice the amount of physical memory in your machine (though, unlike
     84  1.4.2.1       pk SunOS 4.x, there are no restrictions on the size of the swap partition
     85  1.4.2.1       pk that would render part of your memory unusable). A full binary installation
     86  1.4.2.1       pk takes about 60MB in `/usr'. Make all your partitions start and end on
     87  1.4.2.1       pk cylinder boundaries.
     88  1.4.2.1       pk 
     89  1.4.2.1       pk NOTE: if you are installing on a SCSI disk that does *not* have a SunOS
     90  1.4.2.1       pk or NetBSD label on it, you may still be able to use disklabel(8) but you'll
     91  1.4.2.1       pk have to create all partitions from scratch. If your disk is listed in
     92  1.4.2.1       pk `/etc/disktab', you may use the entry (which in most cases only defines
     93  1.4.2.1       pk a `c' partition to describe the whole disk) to put an initial label on
     94  1.4.2.1       pk the disk.
     95  1.4.2.1       pk 
     96  1.4.2.1       pk 
     97  1.4.2.1       pk If you are upgrading a NetBSD installation, start the upgrade script:
     98  1.4.2.1       pk 
     99  1.4.2.1       pk #netbsd ./upgrade.sh
    100  1.4.2.1       pk 
    101  1.4.2.1       pk else, start the installation procedure:
    102      1.4       pk 
    103      1.4       pk netbsd# ./install.sh
    104      1.4       pk 
    105      1.4       pk 
    106  1.4.2.1       pk These scripts will do most of the work of transferring the system from the
    107      1.4       pk tar files onto your disk. You will frequently be asked for confirmation
    108      1.4       pk before the script proceeds with each phase of the installation process.
    109      1.4       pk Occasionally, you'll have to provide a piece of information such as the
    110      1.4       pk name of the disk you want to install on or IP addresses and domain names
    111      1.4       pk you want to assign.
    112      1.4       pk 
    113      1.4       pk The installation script goes through the following phases:
    114      1.4       pk 
    115      1.4       pk 	- determination of the disk to install NetBSD on
    116      1.4       pk 	- checking of the partition information on the disk
    117      1.4       pk 	- creating and mounting the NetBSD filesystems
    118      1.4       pk 	- setup of IP configuration
    119      1.4       pk 	- extraction of the distribution tar files
    120      1.4       pk 	- installation of boot programs
    121      1.4       pk 
    122      1.4       pk 
    123      1.4       pk Now try a reboot.  (If needed, swap your scsi id's first).  Initially
    124      1.4       pk I'd suggest you "boot sd()netbsd -bs", then try multiuser after that.
    125      1.4       pk if you boot single-user the NetBSD incantation to make the root
    126      1.4       pk filesystem writable is
    127      1.4       pk 
    128      1.4       pk     netbsd# mount -u /dev/sd0a /
    129      1.4       pk 
    130      1.4       pk The Sun monitor normally tries to load a file called "vmunix". On
    131      1.4       pk OpenBOOT ROM systems you can change it to load NetBSD instead using
    132      1.4       pk the following commands:
    133      1.4       pk 
    134      1.4       pk On version 1 OpenBOOT ROMs:
    135      1.4       pk     >n
    136      1.4       pk     ok setenv boot-from sd(0,0,0)netbsd
    137      1.4       pk     ok
    138      1.4       pk 
    139      1.4       pk On version 2 OpenBOOT ROMs:
    140      1.4       pk     ok setenv boot-file netbsd
    141      1.4       pk     ok setenv boot-device /sbus/esp/sd@0,0
    142      1.4       pk 
    143      1.4       pk 
    144      1.4       pk Congratulations, you have successfully installed NetBSD 1.0.  When you
    145      1.4       pk reboot into NetBSD, you should log in as "root" at the login prompt.
    146      1.4       pk There is no initial password, but if you're using the machine in a
    147      1.4       pk networked environment, you should create yourself an account and
    148      1.4       pk protect it and the "root" account with good passwords.
    149      1.4       pk 
    150      1.4       pk Some of the files in the NetBSD 1.0 distribution might need to be
    151      1.4       pk tailored for your site.  In particular, the /etc/sendmail.cf file will
    152      1.4       pk almost definitely need to be adjusted, and other files in /etc will
    153      1.4       pk probably need to be modified.  If you are unfamiliar with UN*X-like
    154      1.4       pk system administration, it's recommended that you buy a book that
    155      1.4       pk discusses it.
    156      1.4       pk 
    157      1.4       pk 
    158      1.4       pk 
    159      1.4       pk Installing from SunOS.
    160      1.4       pk 
    161      1.1  deraadt You need a SunOS machine to install NetBSD.  You also need at
    162      1.1  deraadt least the following pieces:
    163      1.1  deraadt 
    164      1.1  deraadt     the *.tar.gz files you want to install (as a minimum, base.tar.gz)
    165      1.1  deraadt     gzip (GNU gzip) SunOS binary
    166      1.1  deraadt     gtar (GNU tar) SunOS binary
    167      1.1  deraadt     the "install.sh" script
    168      1.1  deraadt     a "/boot" file from a SunOS sun4c machine
    169      1.4       pk     a kernel, most likely "/netbsd"
    170      1.1  deraadt 
    171      1.1  deraadt All these pieces, except "/boot", are supplied in the NetBSD/sparc
    172      1.1  deraadt distribution.
    173      1.1  deraadt 
    174      1.1  deraadt You need to format and partition the disk using SunOS (since
    175      1.1  deraadt NetBSD/sparc uses SunOS disk labels.)  Give yourself adequate
    176      1.1  deraadt partition sizes.  Here is an example layout:
    177      1.1  deraadt 
    178      1.1  deraadt     partition    size   offset	  will be..
    179      1.1  deraadt     sd2a        28140        0	  /
    180      1.1  deraadt     sd2b        16170    28140	  swap
    181      1.1  deraadt     sd2c       204540        0	  `whole disk'
    182      1.1  deraadt     sd2g       160230    44310	  /usr
    183      1.1  deraadt 
    184      1.1  deraadt BTW, These are not recommended sizes.  They simply match the first
    185      1.1  deraadt (tiny) disk that NetBSD/sparc ran on.
    186      1.1  deraadt 
    187      1.1  deraadt Use SunOS to newfs the partitions which will have filesystems on them.
    188      1.1  deraadt (NetBSD's filesystem format is identical to SunOS).
    189      1.1  deraadt 
    190      1.1  deraadt     sunos# newfs /dev/rsd2a
    191      1.1  deraadt     [... lots of output]
    192      1.1  deraadt     sunos# newfs /dev/rsd2g
    193      1.1  deraadt     [... lots of output]
    194      1.1  deraadt 
    195      1.1  deraadt NOTE: If you are able to, there is a performance benefit from
    196      1.1  deraadt newfs'ing using NetBSD.  If you newfs using the NetBSD newfs command,
    197      1.1  deraadt be sure to use the -O flag for your / partition, so that newfs will
    198      1.1  deraadt use the 4.3BSD filesystem format, rather than the new 4.4BSD filesystem
    199      1.1  deraadt format.  If you forget, you will not be able to boot -- the SunOS boot
    200      1.1  deraadt blocks do not understand the extended 4.4BSD filesystem format.
    201      1.1  deraadt 
    202      1.1  deraadt Mount those partitions in a tree formation, under /mnt; ie:
    203      1.1  deraadt 
    204      1.1  deraadt     sunos# df
    205      1.1  deraadt     Filesystem            kbytes    used   avail capacity  Mounted on
    206      1.1  deraadt     [...]
    207      1.1  deraadt     /dev/sd2a              11501       0   11501     0%    /mnt
    208      1.1  deraadt     /dev/sd2g             179529       0  179529     0%    /mnt/usr
    209      1.1  deraadt 
    210      1.1  deraadt Place a standard SunOS "/boot" program in /mnt (your new root
    211      1.1  deraadt partition), and use the SunOS command "installboot" to make it work.
    212      1.1  deraadt The installboot man page says to do something like this:
    213      1.1  deraadt 
    214      1.1  deraadt     sunos# cp /boot /mnt/boot
    215      1.1  deraadt     sunos# /usr/mdec/installboot -vlt /mnt/boot /usr/mdec/bootsd /dev/rsd2a
    216      1.1  deraadt 
    217      1.1  deraadt You can now extract the provided "*.tar.gz files onto your disk.  The
    218      1.1  deraadt provided script, "install.sh" will help you:
    219      1.1  deraadt 
    220      1.1  deraadt     sunos# ls -FC
    221      1.1  deraadt     base.tar.gz      etc.tar.gz       man.tar.gz       secr.tar.gz
    222      1.1  deraadt     comp.tar.gz      games.tar.gz     misc.tar.gz      text.tar.gz
    223      1.1  deraadt     install.sh       netbsd.id3_scsi
    224      1.1  deraadt     sunos# ./install.sh
    225      1.1  deraadt     [...]
    226      1.1  deraadt 
    227      1.1  deraadt This script NEEDS gzip and gtar (GNU gzip and GNU tar) on your
    228      1.1  deraadt execution path!  The tar files are in a "new format" that includes
    229      1.1  deraadt directory information, and SunOS tar will not read them.  Statically
    230      1.1  deraadt linked versions of these programs for SunOS are supplied in the
    231      1.1  deraadt distribution.
    232      1.1  deraadt 
    233      1.1  deraadt After the files have been extracted, repair /mnt/etc/fstab to match
    234      1.1  deraadt your actual disk layout.  (Minus the "/mnt" component of each path, of
    235      1.1  deraadt course :-)
    236      1.1  deraadt 
    237      1.4       pk Now proceed to reboot the machine as described above in "Installing
    238      1.4       pk using a diskless setup".
    239