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