1Installing NetBSD is a relatively complex process, but if you have 2this document in hand it shouldn't be too much trouble. 3 4You need a SunOS machine to install NetBSD. You also need at 5least 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 14All these pieces, except "/boot", are supplied in the NetBSD/sparc 15distribution. 16 17You need to format and partition the disk using SunOS (since 18NetBSD/sparc uses SunOS disk labels.) Give yourself adequate 19partition 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 27BTW, These are not recommended sizes. They simply match the first 28(tiny) disk that NetBSD/sparc ran on. 29 30Use 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 38NOTE: If you are able to, there is a performance benefit from 39newfs'ing using NetBSD. If you newfs using the NetBSD newfs command, 40be sure to use the -O flag for your / partition, so that newfs will 41use the 4.3BSD filesystem format, rather than the new 4.4BSD filesystem 42format. If you forget, you will not be able to boot -- the SunOS boot 43blocks do not understand the extended 4.4BSD filesystem format. 44 45Mount 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 53Place a standard SunOS "/boot" program in /mnt (your new root 54partition), and use the SunOS command "installboot" to make it work. 55The 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 60You can now extract the provided "*.tar.gz files onto your disk. The 61provided 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 70This script NEEDS gzip and gtar (GNU gzip and GNU tar) on your 71execution path! The tar files are in a "new format" that includes 72directory information, and SunOS tar will not read them. Statically 73linked versions of these programs for SunOS are supplied in the 74distribution. 75 76After the files have been extracted, repair /mnt/etc/fstab to match 77your actual disk layout. (Minus the "/mnt" component of each path, of 78course :-) 79 80The install script copies the kernel called "netbsd.id3_scsi" to 81/mnt/netbsd. Two sample kernels are supplied: "netbsd.first_scsi" 82and "netbsd.id3_scsi". An explanation follows: 83 84Unlike SunOS and the OpenBOOT ROM, NetBSD numbers scsi drives 85sequentially as it finds them. The drive with the lowest scsi-id will 86be called sd0, the next one sd1, etc. 87 88SunOS 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 99If you have two drives, NetBSD and the OpenBOOT ROM will likely 100disagree. The "netbsd.id3_scsi" kernel gets around this problem by 101hard-wiring scsi-id#3 to sd0. The remaining drives will be 102dynamically mapped to other sd* numbers. If you have more than one 103drive you will want to use this kernel. 104 105If you know what you are doing the other kernel, "netbsd.first_scsi" 106will do the standard NetBSD probe ordering. 107 108Your OpenBOOT ROM may need some setup. make sure you boot from `new 109command mode'. If your machine comes up and gives you a `>' prompt 110instead of `ok', type: 111 112 >n 113 ok setenv sunmon-compat? false 114 ok 115 116This is needed because netbsd cannot handle the old-mode yet, and will 117firework on you. 118 119Also, you cannot use the security modes of the sparc OpenBOOT ROM. 120 121 ok setenv security-mode none 122 123Now try a reboot. (If needed, swap your scsi id's first). Initially 124I'd suggest you "boot sd()netbsd -bs", then try multiuser after that. 125if you boot single-user the NetBSD incantation to make the root 126filesystem read-write is 127 128 netbsd# mount -u /dev/sd0a / 129 130The OpenBOOT ROM normally tries to load a file called "vmunix". You 131can 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 137Newer versions of the OpenBOOT ROM will require this syntax instead: 138 139 ok setenv boot-file netbsd 140 ok setenv boot-device /sbus/esp/sd@0,0 141 142 143Congratulations, you have successfully installed NetBSD 1.0. When you 144reboot into NetBSD, you should log in as "root" at the login prompt. 145There is no initial password, but if you're using the machine in a 146networked environment, you should create yourself an account and 147protect it and the "root" account with good passwords. 148 149Some of the files in the NetBSD 1.0 distribution might need to be 150tailored for your site. In particular, the /etc/sendmail.cf file will 151almost definitely need to be adjusted, and other files in /etc will 152probably need to be modified. If you are unfamiliar with UN*X-like 153system administration, it's recommended that you buy a book that 154discusses it. 155