install revision 1.4
1Installing NetBSD is a relatively complex process, but if you have 2this document in hand it shouldn't be too much trouble. 3 4There are several ways to install NetBSD onto a disk. If your Sparcstation 5is hooked up in a network you can find find a server and arrange for a 6diskless setup which is a convenient way to install on a machine with 7a single disk attached. Alternatively, you could use SunOS (booted from 8a local disk) and install NetBSD onto a second disk. For the latter method, 9skip to the section "Installing from SunOS" below. 10 11Installing using a diskless setup. 12 13First, you must setup a diskless client configuration on a server. Consult 14your server installation documents on how to proceed with this. 15Put all the *.tar.gz files you want to install into the root directory 16for your client on the server. 17 18Next, unpack base.tar.gz on the server in the root directory for your machine. 19A few configuration files need to be edited: 20 21 <root>/etc/hosts 22 <root>/etc/myname 23 <root>/etc/fstab 24 25Boot your workstation from the server by entering the appropriate `boot' 26command at the monitor prompt. Depending on the PROM version in your machine, 27this command takes one of the following forms: 28 29 > b le()netbsd -s # for sun4 monitors 30 ok boot le()netbsd -s # for version 1 OpenBOOT ROMs 31 ok boot net netbsd -s # for version 2 OpenBOOT ROMs 32 33This will boot the NetBSD kernel in single-user mode. 34 35[[ 36NOTE: the latter two examples assume you operate the OpenBOOT ROM in 37"new command mode". If your machine comes up and gives you a `>' prompt 38instead of `ok', type: 39 40 >n # enter native OpenBOOT mode 41 ok setenv sunmon-compat? false # make it permanent 42 ok 43]] 44 45Start the installation procedure: 46 47netbsd# ./install.sh 48 49 50This script will do most of the work of transferring the system from the 51tar files onto your disk. You will frequently be asked for confirmation 52before the script proceeds with each phase of the installation process. 53Occasionally, you'll have to provide a piece of information such as the 54name of the disk you want to install on or IP addresses and domain names 55you want to assign. 56 57The installation script goes through the following phases: 58 59 - determination of the disk to install NetBSD on 60 - checking of the partition information on the disk 61 - creating and mounting the NetBSD filesystems 62 - setup of IP configuration 63 - extraction of the distribution tar files 64 - installation of boot programs 65 66 67Now try a reboot. (If needed, swap your scsi id's first). Initially 68I'd suggest you "boot sd()netbsd -bs", then try multiuser after that. 69if you boot single-user the NetBSD incantation to make the root 70filesystem writable is 71 72 netbsd# mount -u /dev/sd0a / 73 74The Sun monitor normally tries to load a file called "vmunix". On 75OpenBOOT ROM systems you can change it to load NetBSD instead using 76the following commands: 77 78On version 1 OpenBOOT ROMs: 79 >n 80 ok setenv boot-from sd(0,0,0)netbsd 81 ok 82 83On version 2 OpenBOOT ROMs: 84 ok setenv boot-file netbsd 85 ok setenv boot-device /sbus/esp/sd@0,0 86 87 88Congratulations, you have successfully installed NetBSD 1.0. When you 89reboot into NetBSD, you should log in as "root" at the login prompt. 90There is no initial password, but if you're using the machine in a 91networked environment, you should create yourself an account and 92protect it and the "root" account with good passwords. 93 94Some of the files in the NetBSD 1.0 distribution might need to be 95tailored for your site. In particular, the /etc/sendmail.cf file will 96almost definitely need to be adjusted, and other files in /etc will 97probably need to be modified. If you are unfamiliar with UN*X-like 98system administration, it's recommended that you buy a book that 99discusses it. 100 101 102 103Installing from SunOS. 104 105You need a SunOS machine to install NetBSD. You also need at 106least the following pieces: 107 108 the *.tar.gz files you want to install (as a minimum, base.tar.gz) 109 gzip (GNU gzip) SunOS binary 110 gtar (GNU tar) SunOS binary 111 the "install.sh" script 112 a "/boot" file from a SunOS sun4c machine 113 a kernel, most likely "/netbsd" 114 115All these pieces, except "/boot", are supplied in the NetBSD/sparc 116distribution. 117 118You need to format and partition the disk using SunOS (since 119NetBSD/sparc uses SunOS disk labels.) Give yourself adequate 120partition sizes. Here is an example layout: 121 122 partition size offset will be.. 123 sd2a 28140 0 / 124 sd2b 16170 28140 swap 125 sd2c 204540 0 `whole disk' 126 sd2g 160230 44310 /usr 127 128BTW, These are not recommended sizes. They simply match the first 129(tiny) disk that NetBSD/sparc ran on. 130 131Use SunOS to newfs the partitions which will have filesystems on them. 132(NetBSD's filesystem format is identical to SunOS). 133 134 sunos# newfs /dev/rsd2a 135 [... lots of output] 136 sunos# newfs /dev/rsd2g 137 [... lots of output] 138 139NOTE: If you are able to, there is a performance benefit from 140newfs'ing using NetBSD. If you newfs using the NetBSD newfs command, 141be sure to use the -O flag for your / partition, so that newfs will 142use the 4.3BSD filesystem format, rather than the new 4.4BSD filesystem 143format. If you forget, you will not be able to boot -- the SunOS boot 144blocks do not understand the extended 4.4BSD filesystem format. 145 146Mount those partitions in a tree formation, under /mnt; ie: 147 148 sunos# df 149 Filesystem kbytes used avail capacity Mounted on 150 [...] 151 /dev/sd2a 11501 0 11501 0% /mnt 152 /dev/sd2g 179529 0 179529 0% /mnt/usr 153 154Place a standard SunOS "/boot" program in /mnt (your new root 155partition), and use the SunOS command "installboot" to make it work. 156The installboot man page says to do something like this: 157 158 sunos# cp /boot /mnt/boot 159 sunos# /usr/mdec/installboot -vlt /mnt/boot /usr/mdec/bootsd /dev/rsd2a 160 161You can now extract the provided "*.tar.gz files onto your disk. The 162provided script, "install.sh" will help you: 163 164 sunos# ls -FC 165 base.tar.gz etc.tar.gz man.tar.gz secr.tar.gz 166 comp.tar.gz games.tar.gz misc.tar.gz text.tar.gz 167 install.sh netbsd.id3_scsi 168 sunos# ./install.sh 169 [...] 170 171This script NEEDS gzip and gtar (GNU gzip and GNU tar) on your 172execution path! The tar files are in a "new format" that includes 173directory information, and SunOS tar will not read them. Statically 174linked versions of these programs for SunOS are supplied in the 175distribution. 176 177After the files have been extracted, repair /mnt/etc/fstab to match 178your actual disk layout. (Minus the "/mnt" component of each path, of 179course :-) 180 181Now proceed to reboot the machine as described above in "Installing 182using a diskless setup". 183