Home | History | Annotate | Line # | Download | only in sparc
install revision 1.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 You need a SunOS machine to install NetBSD.  You also need at
      5 least the following pieces:
      6 
      7     the *.tar.gz files you want to install (as a minimum, base.tar.gz)
      8     gzip (GNU gzip) SunOS binary
      9     gtar (GNU tar) SunOS binary
     10     the "install.sh" script
     11     a "/boot" file from a SunOS sun4c machine
     12     a kernel, most likely "netbsd.id3_scsi"
     13 
     14 All these pieces, except "/boot", are supplied in the NetBSD/sparc
     15 distribution.
     16 
     17 You need to format and partition the disk using SunOS (since
     18 NetBSD/sparc uses SunOS disk labels.)  Give yourself adequate
     19 partition sizes.  Here is an example layout:
     20 
     21     partition    size   offset	  will be..
     22     sd2a        28140        0	  /
     23     sd2b        16170    28140	  swap
     24     sd2c       204540        0	  `whole disk'
     25     sd2g       160230    44310	  /usr
     26 
     27 BTW, These are not recommended sizes.  They simply match the first
     28 (tiny) disk that NetBSD/sparc ran on.
     29 
     30 Use SunOS to newfs the partitions which will have filesystems on them.
     31 (NetBSD's filesystem format is identical to SunOS).
     32 
     33     sunos# newfs /dev/rsd2a
     34     [... lots of output]
     35     sunos# newfs /dev/rsd2g
     36     [... lots of output]
     37 
     38 NOTE: If you are able to, there is a performance benefit from
     39 newfs'ing using NetBSD.  If you newfs using the NetBSD newfs command,
     40 be sure to use the -O flag for your / partition, so that newfs will
     41 use the 4.3BSD filesystem format, rather than the new 4.4BSD filesystem
     42 format.  If you forget, you will not be able to boot -- the SunOS boot
     43 blocks do not understand the extended 4.4BSD filesystem format.
     44 
     45 Mount those partitions in a tree formation, under /mnt; ie:
     46 
     47     sunos# df
     48     Filesystem            kbytes    used   avail capacity  Mounted on
     49     [...]
     50     /dev/sd2a              11501       0   11501     0%    /mnt
     51     /dev/sd2g             179529       0  179529     0%    /mnt/usr
     52 
     53 Place a standard SunOS "/boot" program in /mnt (your new root
     54 partition), and use the SunOS command "installboot" to make it work.
     55 The installboot man page says to do something like this:
     56 
     57     sunos# cp /boot /mnt/boot
     58     sunos# /usr/mdec/installboot -vlt /mnt/boot /usr/mdec/bootsd /dev/rsd2a
     59 
     60 You can now extract the provided "*.tar.gz files onto your disk.  The
     61 provided script, "install.sh" will help you:
     62 
     63     sunos# ls -FC
     64     base.tar.gz      etc.tar.gz       man.tar.gz       secr.tar.gz
     65     comp.tar.gz      games.tar.gz     misc.tar.gz      text.tar.gz
     66     install.sh       netbsd.id3_scsi
     67     sunos# ./install.sh
     68     [...]
     69 
     70 This script NEEDS gzip and gtar (GNU gzip and GNU tar) on your
     71 execution path!  The tar files are in a "new format" that includes
     72 directory information, and SunOS tar will not read them.  Statically
     73 linked versions of these programs for SunOS are supplied in the
     74 distribution.
     75 
     76 After the files have been extracted, repair /mnt/etc/fstab to match
     77 your actual disk layout.  (Minus the "/mnt" component of each path, of
     78 course :-)
     79 
     80 The install script copies the kernel called "netbsd.id3_scsi" to
     81 /mnt/netbsd.  Two sample kernels are supplied: "netbsd.first_scsi"
     82 and "netbsd.id3_scsi". An explanation follows:
     83 
     84 Unlike SunOS and the OpenBOOT ROM, NetBSD numbers scsi drives
     85 sequentially as it finds them.  The drive with the lowest scsi-id will
     86 be called sd0, the next one sd1, etc.
     87 
     88 SunOS and the OpenBOOT ROM map according to this table:
     89 
     90     SCSI-ID ->	SunOS SD-UNIT
     91     0		sd3
     92     1		sd1
     93     2		sd2
     94     3		sd0
     95     4		sd4
     96     5		sd5
     97     6		sd6
     98 
     99 If you have two drives, NetBSD and the OpenBOOT ROM will likely
    100 disagree.  The "netbsd.id3_scsi" kernel gets around this problem by
    101 hard-wiring scsi-id#3 to sd0.  The remaining drives will be
    102 dynamically mapped to other sd* numbers.  If you have more than one
    103 drive you will want to use this kernel.
    104 
    105 If you know what you are doing the other kernel, "netbsd.first_scsi"
    106 will do the standard NetBSD probe ordering.
    107 
    108 Your OpenBOOT ROM may need some setup.  make sure you boot from `new
    109 command mode'.  If your machine comes up and gives you a `>' prompt
    110 instead of `ok', type:
    111 
    112     >n
    113     ok setenv sunmon-compat? false
    114     ok
    115 
    116 This is needed because netbsd cannot handle the old-mode yet, and will
    117 firework on you.
    118 
    119 Also, you cannot use the security modes of the sparc OpenBOOT ROM.
    120 
    121     ok setenv security-mode none
    122 
    123 Now try a reboot.  (If needed, swap your scsi id's first).  Initially
    124 I'd suggest you "boot sd()netbsd -bs", then try multiuser after that.
    125 if you boot single-user the NetBSD incantation to make the root
    126 filesystem read-write is
    127 
    128     netbsd# mount -u /dev/sd0a /
    129 
    130 The OpenBOOT ROM normally tries to load a file called "vmunix".  You
    131 can change it to load NetBSD instead using the following command:
    132 
    133     >n
    134     ok setenv boot-from sd(0,0,0)netbsd
    135     ok
    136 
    137 Congratulations, you have successfully installed NetBSD 1.0.  When you
    138 reboot into NetBSD, you should log in as "root" at the login prompt.
    139 There is no initial password, but if you're using the machine in a
    140 networked environment, you should create yourself an account and
    141 protect it and the "root" account with good passwords.
    142 
    143 Some of the files in the NetBSD 1.0 distribution might need to be
    144 tailored for your site.  In particular, the /etc/sendmail.cf file will
    145 almost definitely need to be adjusted, and other files in /etc will
    146 probably need to be modified.  If you are unfamiliar with UN*X-like
    147 system administration, it's recommended that you buy a book that
    148 discusses it.
    149