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