install revision 1.4
1	$NetBSD: install,v 1.4 1998/08/23 12:42:21 hubertf Exp $	
2
3Installing NetBSD is a relatively complex process, but if you have
4this document in hand and are careful to read and remember the
5information which is presented to you by the install program, it
6shouldn't be too much trouble.
7
8Before you begin, you should know the geometry of your hard disk, i.e.
9the sector size (note that sector sizes other than 512 bytes are not
10currently supported), the number of sectors per track, the number of
11tracks per cylinder (also known as the number of heads), and the
12number of cylinders on the disk.  The NetBSD kernel will try to
13discover these parameters on its own, and if it can it will print them
14at boot time.  If possible, you should use the parameters it prints.
15(You might not be able to because you're sharing your disk with
16another operating system, or because your disk is old enough that the
17kernel can't figure out its geometry.)
18
19If NetBSD will be sharing the disk with Human68k or another operating
20system, you should have already completed the section of these notes
21that instructed you on how to prepare your hard disk.  You should know
22the size of the NetBSD area of the disk and its offset from the
23beginning of the disk.  You will need this information when setting up
24your NetBSD partitions.
25
26You should now be ready to install NetBSD.  It might be handy for you
27to have a pencil, some paper, and a calculator handy.
28
29The following is a walk-through of the steps you will take while
30getting NetBSD installed on your hard disk.  If any question has a
31default answer, it will be displayed in brackets ("[]") after the
32question.  If you wish to stop the installation, you may hit Control-C
33at any time, but if you do, you'll have to begin the installation
34process again from scratch.
35
36	Boot your machine using of the appropriate kernel-copy floppy.
37	If the boot prompt does not appear in a reasonable amount of
38	time, you either have a bad boot floppy or a hardware problem.
39	Try writing the kernel-copy floppy image to a different disk,
40	and using that.  If it still doesn't work, NetBSD probably
41	can't be run on your hardware.  This can probably be
42	considered a bug, so you might want to report it.  If you do,
43	please include as many details about your system configuration
44	as you can.
45
46	It will take a while to load the kernel from the floppy,
47	probably around a minute or so.  After its loaded, you will be
48	presented with the message:
49		"Insert file system floppy"
50	If you do not see that message after a reasonable time has
51	elapsed, or the spinning cursor has stopped and nothing
52	further has happened, either your boot floppy is bad or you
53	are having hardware problems, and should proceed as outlined
54	above.
55
56	Once you have reached that prompt, remove the kernel-copy
57	floppy from the floppy drive.  Make sure that the installation
58	disk (the "inst12" floppy) is writable, insert it into the
59	floppy drive, and hit any key.
60
61	You will then be presented with the NetBSD kernel boot
62	messages.  You will want to read them, to determine your
63	disk's name and geometry.  Its name will be something like
64	"sd0" or "wd0" and the geometry will be printed on a line that
65	begins with its name.  As mentioned above, you will need your
66	disk's geometry when creating NetBSD's partitions.  You will
67	also need to know the name, to tell the install tools what
68	disk to install on.
69
70	While booting, you will probably see several warnings.  You
71	should be warned that no swap space is present, and that
72	init(8) cannot find /etc/rc.  Do not be alarmed, these are
73	completely normal.  When you reach the prompt asking you for a
74	shell name, just hit return.
75
76	You will be presented with a welcome message and a prompt,
77	asking if you wish to proceed with the installation process.
78	If you wish to proceed, enter "y" and hit return.
79
80	You will be asked what type of disk driver you have.  The
81	valid options are listed by the install program, to make sure
82	you get it right.  If you are SURE that it does, reply
83	affirmatively.  Otherwise, the install program will
84	automatically reserve space for bad144 tables.
85
86	The install program will then tell you which disks of that
87	type it can install on, and ask you which it should use.
88	Reply with the name of your disk.
89
90	You will then be asked to name your disk's disklabel.  The
91	default response is "mywd" or "mysd" depending on the type of
92	your disk, and for most purposes it will be OK.  If you choose
93	to name it something different, make sure the name is a single
94	word and contains no special characters.  You don't need to
95	remember this name.
96
97	You will be prompted for your disk's geometry information,
98	i.e. the number of bytes per sector, cylinders on the disk,
99	tracks per cylinder (heads), and sectors per track.  Enter
100	them when they are requested.  If you make a mistake, hit
101	Control-C and when you get to the shell prompt, restart the
102	install process by running the "install" command.  Once you
103	have entered this data, the install program will tell you the
104	total size of your disk, in both sectors, and cylinders.
105	Remember this number; if you're installing on the whole disk,
106	you'll need it again soon.
107
108	When describing your partitions, you will have the option of
109	entering data about them in units of disk sectors or
110	cylinders.  If you choose to enter the information in units of
111	sectors, remember that, for optimal performance, partitions
112	should begin and end on cylinder boundaries.  You will be
113	asked about which units you wish to use, and you should reply
114	with "c" for cylinders, or "s" for sectors.
115
116	You will be asked for the size of the NetBSD portion of the
117	disk.  If you're installing on the whole disk, reply with the
118	size of the disk, as printed earlier by the install program.
119	If you're using only part of the disk, reply with the size
120	that you specified in the partition editor.  (Don't forget to
121	enter the size in the units you specified in the last step!)
122
123	If you are not installing on the whole disk, you will be asked
124	fro the offset of the NetBSD partition from the beginning of
125	the disk.  Reply with the appropriate offset (again, in
126	whichever units you specified), as determined by how you
127	set up your disk using the partition editor.
128
129	You will be asked to enter the size of your NetBSD root
130	partition.  It should be at least 13M, but if you are going to
131	be doing development, 14-16M is a more desirable size.  This
132	size should be expressed in units of sectors or cylinders,
133	depending on which you said you wanted to use.
134
135	Next, you will be asked for the size of your swap partition.
136	You should probably allocate twice as much swap space as you
137	have real memory.  Systems that will be heavily used should
138	have more swap space allocated, and systems that will be
139	lightly used can get by with less.  If you want the system to
140	be able to save crash dumps when it panics, you will need at
141	least as much swap space as you have RAM.  Again, this number
142	should be expressed in units of sectors or cylinders, as
143	appropriate.
144
145	The install program will then ask you for information about
146	the rest of the partitions you want on your disk.  For most
147	purposes, you will want only one more partition, "/usr".
148	(Machines used as servers will probably also want /var as a
149	separate partition.  That can be done with these installation
150	tools, but is not covered here.)  The install program will
151	tell you how much space there is left to be allocated in the
152	NetBSD area of the disk, and, if you only want one more
153	partition ("/usr"), you should enter it at the prompt when the
154	installer asks you how large the next partition should be.
155	It will then ask you for the name of the mount point for that
156	partition.  If you're doing a basic installation, that is
157	"/usr".
158
159	YOU ARE NOW AT THE POINT OF NO RETURN.  Nothing has been
160	written to your disk yet, but if you confirm that you want to
161	install NetBSD, your hard drive will be modified, and its
162	contents may be scrambled at the whim of the install program.
163	This is especially likely if you have given the install
164	program incorrect information.  If you are sure you want to
165	proceed, enter "yes" at the prompt.
166
167	The install program will now label your disk and make the file
168	systems you specified.  The filesystems will be initialized to
169	contain NetBSD bootstrapping binaries and configuration files.
170	It will also create an /etc/fstab for your system, and mount
171	all of the file systems under /mnt. (In other words, your root
172	partition will be mounted on /mnt, your /usr partition on
173	/mnt/usr, and so on.)  There should be no errors in this
174	section of the installation.  If there are, restart from the
175	beginning of the installation process.
176
177	You will be placed at a shell prompt ("#").  The remaining
178	tasks are to copy the kernel from the kernel copy floppy to
179	the hard drive's root filesystem and install the distribution
180	sets.  The flow of installation differs depending on your
181	hardware resources, and on what media the distribution sets
182	reside.
183
184	To install from floppy:
185		If you only have only one floppy drive, the order of
186		installation is different.  Follow the directions in
187		the "Kernel installation" section which will help you
188		install a kernel on the hard drive and then boot off
189		the hard drive, then continue with the rest of the
190		process described here to install the distribution
191		sets from floppy:
192
193		The first thing you should do is pick a temporary
194		directory where the distribution files can be stored.
195		To do this, enter the command "Set_tmp_dir", and enter
196		the name of the temporary directory.  (Don't forget
197		that if your disk is still mounted under /mnt; you
198		should probably pick a directory under /mnt/usr.)
199
200		After you have picked a temporary directory, enter the
201		"Load_fd" command, to load the distribution sets from
202		your floppies.
203
204		You will be asked which floppy drive to use.  Enter
205		"0" (zero) if you're using the first floppy drive
206		(i.e. what DOS would call "A:"), or enter "1" if
207		you're using the second.  (Remember that you CANNOT
208		use the floppy drive that you booted from.  If you
209		booted from "A:", you must load from "B:".)
210
211		You will be prompted to insert a floppy into the drive,
212		to have its contents copied to your hard disk.  Do so,
213		and hit return to begin copying.  When that is done,
214		read the remainder of the floppies that contain the
215		distribution sets that you want to install, one by
216		one.  When the last is read, and you are being
217		prompted for another, hit Control-C.
218
219		Run the "Extract" command once for each distribution
220		set you wish to install.  For instance, if you wish to
221		install the "base12" distribution set, followed by the
222		"man12" distribution set, and finally the "etc12"
223		distribution set, use the commands:
224			Extract base12
225			Extract man12
226			Extract etc12
227
228		For each extraction, it will ask you if the extraction
229		should be verbose.  If you reply affirmatively, it
230		will print out the name of each file that's being
231		extracted.
232
233		(Note: if you know that you will be running low on
234		disk space when installing NetBSD, you can load and
235		extract one distribution set at a time.  To do this,
236		load only the floppies which contain the files for the
237		first distribution set, extract them, and then change
238		to the temporary directory and remove them with the
239		command "rm set_name.??".)
240
241		Once you are finished extracting all of the sets that
242		you wish to install, you should proceed to the
243		instructions below (after the last install medium
244		type-specific instructions), that explain how you
245		should configure your system.
246
247	To install from tape:
248		The first thing you should do is pick a temporary
249		directory where the distribution files can be stored.
250		To do this, enter the command "Set_tmp_dir", and enter
251		the name of the temporary directory.  (Don't forget
252		that your disk is mounted under /mnt; you should
253		probably pick a directory under /mnt/usr.)  The
254		default is /mnt/usr/distrib.
255
256		After you have picked a temporary directory, enter the
257		"Load_tape" command, to load the distribution sets from
258		tape.
259
260		You will be asked which tape drive to use.  The
261		default is "rst0", which is correct if you're using
262		the SCSI tape drive with the lowest SCSI ID number.
263		(For the SCSI tape drive with the next lowest SCSI ID
264		number, you should use "rst1", and so on.)
265
266		You will be prompted to hit return when you have
267		inserted the tape into the tape drive.  When you do,
268		the contents of the tape will be extracted into the
269		temporary directory, and the names of the files being
270		extracted will be printed.
271
272		After the tape has been extracted, to go the directory
273		containing the first distribution set you wish to
274		install.  (Depending on how you made the tape, it's
275		probably a subdirectory of the temporary directory you
276		specified above.)  Once there, run the "Set_tmp_dir"
277		command again, and accept its default answer by
278		hitting return at the prompt.
279
280		Use the "Extract" command to extract the distribution
281		set.  For instance, if you're extracting the "base12"
282		set, use the command:
283			Extract base12
284		You will be asked if you wish the extraction to be
285		verbose.  If you reply affirmatively, the name of each
286		file being extracted will be printed.
287
288		Repeat the previous two steps for each distribution
289		set you wish to install.  Change to the set's
290		directory, run "Set_tmp_dir", and then run
291		"Extract <set_name>" to extract the set.
292
293		Once you are finished extracting all of the sets that
294		you wish to install, you should proceed to the
295		instructions below (after the last install medium
296		type-specific instructions), that explain how you
297		should configure your system.
298
299	To install via FTP or NFS:
300		The first thing you should do is pick a temporary
301		directory where the distribution files can be stored.
302		To do this, enter the command "Set_tmp_dir", and enter
303		the name of the temporary directory.  (Don't forget
304		that your disk is mounted under /mnt; you should
305		probably pick a directory under /mnt/usr.)  The
306		default is /mnt/usr/distrib.
307
308		Configure the SLIP interface, with the following
309		command sequence:
310
311		slattach -h -s <speed> tty00
312		ifconfig sl0 <my_ipaddr> <peer_ipaddr>
313
314		where "<speed>" is the network speed, and "<my_ipaddr>"
315		is the numeric IP address of the machine you are going
316		to install NetBSD/x68k, while "<peer_ipaddr>" is the
317		address of the peer machine connected with your machine.
318		You might have to configure the peer SLIP interface
319		with similar sequence (depending on the peer system).
320
321		For instance, the sequence
322
323		slattach -h -s 38400 tty00
324		ifconfig sl0 192.168.0.1 192.168.0.10
325
326		configures the SLIP interface for the network between
327		your machine (with IP address 192.168.0.1) and the peer
328		(192.168.0.10) with speed 38400 bps.  Note that IP
329		addresses 192.168.*.* are the private IP addresses 
330		described in RFC 1597.
331
332		If you are NFS-mounting the distribution sets, mount
333		them on the temporary directory with a command like:
334
335		mount -t nfs <serv_ipaddr>:<dist_dir> <tmp_dir>
336
337		where <serv_ipaddr> is the server's numeric IP address,
338		<dist_dir> is the path to the distribution files on
339		the server, and <tmp_dir> is the name of the local
340		temporary directory.
341
342		Once this is done, proceed as if you had loaded the
343		files from tape, changing to the appropriate
344		directories, running "Set_tmp_dir", and running
345		"Extract" as appropriate.
346
347		If you are retrieving the distribution sets using ftp,
348		change into the temporary directory, and execute the
349		command:
350
351		ftp <serv_ipaddr>
352
353		where <serv_ipaddr> is once again the server's numeric
354		IP address.  Get the files with FTP, taking care to
355		use binary mode when transferring the files.
356
357		Once you have all of the files for the distribution
358		sets that you wish to install, you can proceed using
359		the instructions above, as if you had installed from a
360		floppy.  (Note that as with the floppy install, if
361		you're short on disk space, you can transfer only one
362		set at a time, extract it, then delete it, to save
363		space.)
364
365	Once you have finished extracting all of the distribution sets
366	that you wish to install, and are back at the "#" prompt, you
367	are ready to configure your system.  The configuration utility
368	expects that you have installed the "base12" and "etc12"
369	distribution sets.  If you have not, you will not be able to
370	run it successfully (nor will you have a functional system, in
371	any case).  To configure your newly-installed NetBSD system,
372	run the command "Configure".  It will ask you for the system's
373	host name, domain name, and other network configuration
374	information.  It will set up your configuration files and make
375	the device nodes for the newly-installed system.
376
377Kernel Installation:
378
379	Enter "halt" at the prompt to halt the system.  When the
380	system is halted, remove the "inst12" floppy from the floppy
381	drive, and replace it with the NetBSD _VER kernel-copy floppy
382	that you previously booted from.  Reboot with that floppy.
383	with that floppy.
384
385	Once again, you will be prompted to insert a file system
386	floppy.  DO NOT replace the kernel-copy floppy, just hit any
387	key.
388
389	Again, While booting, you may see several warnings.  You may
390	be warned that no swap space is present, that init(8) cannot
391	find /etc/rc, and that one or more databases with names like
392	"pwd.db" cannot be found.  Do not be alarmed, as, again, these
393	are completely normal.  Hit return at the prompt asking you
394	for a shell name.
395
396	You will be presented with a shell prompt, at which you should
397	enter the "copy_kernel" command.  It will ask you what
398	partition to copy the kernel to, and you should reply with the
399	name of your root partition (e.g. sd0a or wd0a).
400
401	You will be asked if you are sure that you want to copy the
402	kernel.  Reply affirmatively, and it will check the file
403	system on your root partition, mount it, and copy the kernel.
404	Once the kernel is copied, you should use "halt" to halt the
405	system.
406
407	Once the system is halted, remove the kernel-copy floppy from
408	the floppy disk drive, and hit any key to reboot.
409
410Congratulations, you have successfully installed NetBSD _VER. 
411