1 .\" $NetBSD: postinstall,v 1.73 2009/04/25 01:33:12 snj Exp $
3 .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 .\" POSSIBILITY OF SUCH DAMAGE.
27 Once you've got the operating system running, there are a few
28 things you need to do in order to bring the system into a properly
30 The most important steps are described below.
35 If you or the installation software haven't done any configuration of
39 the system will drop you into single user mode on first reboot with the
42 .Dl /etc/rc.conf is not configured. Multiuser boot aborted.
44 and with the root file system
47 When the system asks you to choose a shell, simply press
52 If you are asked for a terminal type, respond with
59 for a local console, or whatever is appropriate for your serial console.
65 (or whatever is appropriate for your terminal type)
70 the correct terminal type as discussed in the
71 .Sx Once you've booted the diskimage
75 .ie \n[sparc]:\n[sparc64] \{\
78 for a local console, or whatever is appropriate for your serial
79 console (some systems display garbage with a
81 terminal type, you may need to use
87 (or whatever is appropriate for your terminal type)
94 You may need to type one of the following commands to get your delete key
95 to work properly, depending on your keyboard:
96 .Dl # Ic "stty erase '^h'"
97 .Dl # Ic "stty erase '^?'"
98 At this point, you need to configure at least
102 You will need to mount your root file system read/write with:
103 .Dl # Ic "/sbin/mount -u -w /"
106 directory and take a look at the
109 Modify it to your tastes, making sure that you set
110 .Li rc_configured=YES
111 so that your changes will be enabled and a multi-user boot can
113 Default values for the various programs can be found in
114 .Pa /etc/defaults/rc.conf ,
115 where some in-line documentation may be found.
116 More complete documentation can be found in
119 When you have finished editing
124 leave the single-user shell and continue with the multi-user boot.
126 Other values that may need to be set in
128 for a networked environment are
132 You may also need to add an
138 where your on-board, NuBus or PDS interface may be
147 where your on-board interfaces may be one of
155 .el along the lines of
160 .if \n[acorn26] .ds IFname ei0
161 .if \n[acorn32] .ds IFname ei0
162 .if \n[amd64] .ds IFname wm0
163 .if \n[arc] .ds IFname sn0
164 .if \n[cats] .ds IFname tlp0
165 .if \n[evbarm] .ds IFname fxp0
166 .if \n[hp700] .ds IFname ie0
167 .if \n[hpcmips] .ds IFname ne0
168 .if \n[hpcsh] .ds IFname ne0
169 .if \n[i386] .ds IFname wm0
170 .if \n[landisk] .ds IFname re0
171 .if \n[mac68k] .ds IFname sn0
172 .if \n[macppc] .ds IFname mc0
173 .if \n[next68k] .ds IFname xe0
174 .if \n[prep] .ds IFname pcn0
175 .if \n[sandpoint] .ds IFname tlp0
176 .if \n[sgimips] .ds IFname sq0
177 .if \n[shark] .ds IFname cs0
178 .if \n[sparc64] .ds IFname hme0
179 .if \n[x68k] .ds IFname ne0
180 .if \n[xen] .ds IFname xennet0
182 .Dl ifconfig_\*[IFname]="inet 192.0.2.123 netmask 255.255.255.0"
189 .Dl ifconfig_\*[IFname]="inet myname.my.dom netmask 255.255.255.0"
191 To enable proper hostname resolution, you will also want to add an
193 file or (if you are feeling a little more adventurous) run
199 for more information.
200 Instead of manually configuring network and naming service,
201 DHCP can be used by setting
208 that may require modification or setting up include
212 .Pa /etc/nsswitch.conf .
215 .Pa /etc/mailer.conf ,
216 .Pa /etc/nsswitch.conf ,
218 .Pa /etc/wscons.conf .
222 For Digital DNARD machines you will need to edit
224 and change the console terminal type from vt100 to pc3.
228 Select the proper terminal devices
230 You will have to edit the
233 If you don't have a Milan, you must disable the
236 For the Milan, you will have to disable the
239 This is easy, just change 'on' to 'off' on the corresponding lines.
245 facility to work with the a.out and elf kernel images supplied with
246 \*M installations you will need to set
247 .Li savecore_flags="-z -N /netbsd"
249 .if \n[sparc]:\n[sparc64] \{\
251 Select the proper terminal devices
253 If you are using a serial console, you will have to edit the
257 .if \n[sparc64] sun-ss5
258 to the appropriate terminal type, such as vt220.
263 After reboot, you can log in as
266 Unless you've set a password in
269 is no initial password.
270 You should create an account for yourself (see below) and protect it and the
272 account with good passwords.
273 By default, root login from the network is disabled (even via
275 One way to become root over the network is to log in as a different
276 user that belongs to group
288 command to add accounts to your system.
296 if you want to edit the password database.
301 If you installed the X Window System, you may want to read the
302 chapter about X in the NetBSD Guide:
303 .Lk http://netbsd.org/docs/guide/en/chap-x.html
305 Also, you may want to read through the
309 .Lk http://www.NetBSD.org/ports/hp300/faq.html#x11
314 Some systems are capable of supporting a color X Server in either thousands
315 or millions of colors.
316 The \*M port does not support resolution switching at this time.
317 If your system is capable of running the color X Server it can be
318 installed at this point and the Booter options can be
319 modified to match the resolution depth.
324 Installing third party packages
326 If you wish to install any of the software freely available for
328 systems you are strongly advised to first check the
330 package system, pkgsrc.
331 pkgsrc automatically handles any changes necessary to make the
334 This includes the retrieval and installation of any other
335 packages on which the software may depend.
338 More information on the package system is available at
339 .Lk http://www.NetBSD.org/docs/software/packages.html
341 A list of available packages suitable for browsing is at
342 .Lk ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/README.html
344 Precompiled binaries can be found at
345 .Lk ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/
349 You can install them with the following commands under
353 .Ic # PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/\*M/\*V/All
354 .Ic # export PKG_PATH
355 .Ic # pkg_add -v tcsh
356 .Ic # pkg_add -v bash
357 .Ic # pkg_add -v perl
358 .Ic # pkg_add -v apache
360 .Ic # pkg_add -v firefox
366 then replace the first two lines with the following:
369 .Ic # setenv PKG_PATH ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/\*M/\*V/All
372 Some mirror sites don't mirror the
375 If you would like to use such mirrors, you could also try the
376 .Pa /pub/NetBSD/packages/current-packages/NetBSD/\*M/\*V/All
377 directory, which may have the same contents.
380 The above commands will install the Tenex-csh and Bourne Again shells,
381 the Perl programming language, Apache web server, KDE desktop
382 environment and the Firefox web browser
383 as well as all the packages they depend on.
387 command will complain about a version mismatch of packages with a message
389 .Dl Warning: package `foo' was built for a different version of the OS:
390 .Dl NetBSD/i386 M.N (pkg) vs. NetBSD/i386 \*V (this host) ,
391 This warning is harmless if the formal major release numbers are the same
392 between the pkg and your host.
393 Please refer to the NetBSD release glossary and graphs at
394 .Lk http://www.NetBSD.org/releases/release-map.html
395 for more information about NetBSD's release numbering scheme.
398 The framework for compiling packages can be obtained by
400 .Lk ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc.tar.gz
401 It is typically extracted into
403 (though other locations work fine) with the commands:
406 .Dl # Ic "tar -zxpf pkgsrc.tar.gz"
408 After extracting, see the
410 file in the extraction directory (e.g.,
411 .Pa /usr/pkgsrc/doc/pkgsrc.txt )
412 for more information.
418 .Pa /etc/mail/aliases
419 to forward root mail to the right place.
425 .Pa /etc/postfix/main.cf
426 file will almost definitely need to be adjusted.
427 If you prefer a different MTA, then install it using
428 pkgsrc or by hand and adjust
429 .Pa /etc/mailer.conf .
433 to run any local daemons you use.
437 files are documented in section 5 of the manual; so just invoking
439 .Dl # Ic man 5 Ar filename
441 is likely to give you more information on these files.