Annotation of wikisrc/guide/exinst.mdwn, revision 1.3
1.3 ! jdf 1: **Contents**
! 3: [[!toc levels=3]]
1.1 jdf 5: # Example installation
7: ## Introduction
9: This chapter will guide you through the installation process. The concepts
10: presented here apply to all installation methods. The only difference is in the
11: way the distribution sets are fetched by the installer. Some details of the
12: installation differ depending on the NetBSD release: The examples from this
13: chapter were created with NetBSD 5.0.
15: ### Note
17: The following install screens are just examples. Do not simply copy them, as
18: your hardware and configuration details may be different!
20: ## The installation process
22: The installation process is divided logically in two parts. In the first part
23: you create a partition for NetBSD and write the disklabel for that partition. In
24: the second part you decide which distribution sets (subsets of the operating
25: system) you want to install and then extract the files into the newly created
28: ## Keyboard layout
1.2 jdf 30: [[!table data="""
31: US | IT | DE | FR
32: `-` | `'` | `ß` | `)`
33: `/` | `-` | `-` | `!`
34: `=` | `ì` | `'` | `-`
35: `:` | `ç` | `Ö` | `M`
36: `;` | `ò` | `ö` | `m`
37: `#` | `£` | `§` | `3`
38: `"` | `°` | `Ä` | `%`
39: `*` | `(` | `(` | `8`
40: `(` | `)` | `)` | `9`
41: `)` | `=` | `=` | `0`
42: `'` | `à` | `ä` | `ù`
43: `` ` `` | `\` | `^` | `@`
44: `\` | `ù` | `#` | `` ` ``
1.1 jdf 46:
47: The NetBSD install program sysinst allows you to change the keyboard layout
48: during the installation. If for some reason this does not work for you, you can
49: use the map in the following table.
51: ## Starting the installation
53: To start the installation of NetBSD, insert your chosen boot media (CD/DVD, USB
54: drive, floppy, etc.) and reboot the computer. The kernel on the installation
55: medium will be booted and start displaying a lot of messages on the screen about
56: hardware being detected.
58: ![Selecting the language](/guide/images/exinst_language.png)
59: **Selecting the language**
61: When the kernel has booted you will find yourself in the NetBSD installation
62: program, sysinst, shown in the previous figure. From here on you should follow
63: the instructions displayed on the screen, using the `INSTALL` document as a
64: companion reference. You will find the INSTALL document in various formats in
65: the root directory of the NetBSD release. The sysinst screens all have more or
66: less the same layout: the upper part of the screen shows a short description of
67: the current operation or a short help message, and the rest of the screen is
68: made up of interactive menus and prompts. To make a choice, use the cursor keys,
69: the `Ctrl+N` (next) and `Ctrl+P` (previous) keys, or press one of the letters
70: displayed left of each choice. Confirm your choice by pressing the Return key.
72: Start by selecting the language you prefer to use for the installation process.
74: The next screen will allow you to select a suitable keyboard type:
76: ![Selecting a keyboard type](/guide/images/exinst_keyboard.png)
77: **Selecting a keyboard type**
79: This will bring you to the main menu of the installation program:
81: ![The sysinst main menu](/guide/images/exinst_main.png)
82: **The sysinst main menu**
84: Choosing the *Install NetBSD to hard disk* option brings you to the next screen
85: , where you need to confirm that you want to continue the installation:
87: ![Confirming to install NetBSD](/guide/images/exinst_confirm.png)
88: **Confirming to install NetBSD**
90: After choosing *Yes* to continue, sysinst displays a list of one or more disks
91: and asks which one you want to install NetBSD on. In the example given in the
92: following figure, there are two disks, and NetBSD will be installed on `wd0`,
93: the first IDE disk found. If you use SCSI or external USB disks, the first will
94: be named `sd0`, the second `sd1` and so on.
96: ![Choosing a hard disk](/guide/images/exinst_select_disk.png)
97: **Choosing a hard disk**
99: The installer will then ask whether you want to do a full, minimal or custom
100: installation. NetBSD is broken into a collection of distributions sets. *Full
101: installation* is the default and will install all sets; *Minimal installation*
102: will only install a small core set, the minimum of what is needed for a working
103: system. If you select *Custom installation* you can select which sets you would
104: like to have installed. This step is shown here:
106: ![Full or custom installation](/guide/images/exinst_install-type.png)
107: **Full or custom installation**
109: If you choose to do a custom installation, sysinst will allow you to choose
110: which distribution sets to install, as shown in the following figure. At a
111: minimum, you must select a kernel and the *Base* and *System (/etc)* sets.
113: ![Selecting distribution sets](/guide/images/exinst_sets.png)
114: **Selecting distribution sets**
116: ## MBR partitions
118: The first important step of the installation has come: the partitioning of the
119: hard disk. First, you need to specify whether NetBSD will use a partition
120: (suggested choice) or the whole disk. In the former case it is still possible to
121: create a partition that uses the whole hard disk (see below) so we recommend
122: that you select this option as it keeps the BIOS partition table in a format
123: which is compatible with other operating systems.
125: ![Choosing the partitioning scheme](/guide/images/exinst_mbr.png)
126: **Choosing the partitioning scheme**
128: The next screen shows the current state of the MBR partition table on the hard
129: disk before the installation of NetBSD. There are four primary partitions, and
130: as you can see, this example disk is currently empty. If you do have other
131: partitions you can leave them around and install NetBSD on a partition that is
132: currently unused, or you can overwrite a partition to use it for NetBSD.
137: Deleting a partition is simple: after selecting the partition, a menu with
138: options for that partition will appear (see below). Change the partition kind to
139: *Delete partition* to remove the partition. Of course, if you want to use the
140: partition for NetBSD you can set the partition kind to *NetBSD*.
142: You can create a partition for NetBSD by selecting the partition you want to
143: install NetBSD to. The partition names `a` to `d` correspond to the four primary
144: partitions on other operating systems. After selecting a partition, a menu with
145: options for that partition will appear, as shown here:
147: ![Partition options](/guide/images/exinst_fdisk-type.png)
148: **Partition options**
150: To create a new partition, the following information must be supplied:
152: * the type (kind) of the new partition
153: * the first (start) sector of the new partition
154: * the size of the new partition
156: Choose the partition type *NetBSD* for the new partition (using the `type`
157: option). The installation program will try to guess the *start* position based
158: on the end of the preceding partition. Change this value if necessary. The same
159: thing applies to the `size` option; the installation program will try to fill in
160: the space that is available until the next partition or the end of the disk
161: (depending on which comes first). You can change this value if it is incorrect,
162: or if you do not want NetBSD to use the suggested amount of space.
164: After you have chosen the partition type, start position, and size, it is a good
165: idea to set the name that should be used in the boot menu. You can do this by
166: selecting the *bootmenu* option and providing a label, e.g., `NetBSD`. It is a
167: good idea to repeat this step for other bootable partitions so you can boot both
168: NetBSD and a Windows system (or other operating systems) using the NetBSD
169: bootselector. If you are satisfied with the partition options, confirm your
170: choice by selecting *Partition OK*. Choose *Partition table OK* to leave the MBR
171: partition table editor.
173: If you have made an error in partitioning (for example you have created
174: overlapping partitions) sysinst will display a message and suggest that you go
175: back to the MBR partition editor (but you are also allowed to continue). If the
176: data is correct but the NetBSD partition lies outside the range of sectors which
177: is bootable by the BIOS, sysinst will warn you and ask if you want to proceed
178: anyway. Doing so may lead to problems on older PCs.
180: *Note*: This is not a limitation of NetBSD. Some old BIOSes cannot boot a
181: partition which lies outside the first 1024 cylinders. To fully understand the
182: problem you should study the different type of BIOSes and the many addressing
183: schemes that they use (*physical CHS*, *logical CHS*, *LBA*, ...). These topics
184: are not described in this guide.
186: On modern computers (those with support for *int13 extensions*), it is possible
187: to install NetBSD in partitions that live outside the first 8 GB of the hard
188: disk, provided that the NetBSD boot selector is installed.
190: Next, sysinst will offer to install a boot selector on the hard disk. This
191: screen is shown here:
193: ![Installing the boot selector](/guide/images/exinst_bootselect.png)
194: **Installing the boot selector**
196: At this point, the *BIOS partitions* (called *slices* on BSD systems) have been
197: created. They are also called *PC BIOS partitions*, *MBR partitions* or *fdisk
200: *Note*: Do not confuse the *slices* or *BIOS partitions* with the *BSD
201: partitions*, which are different things.
203: ## Disklabel partitions
205: Some platforms, like PC systems (amd64 and i386), use DOS-style MBR partitions
206: to separate file systems. The MBR partition you created earlier in the
207: installation process is necessary to make sure that other operating systems do
208: not overwrite the diskspace that you allocated to NetBSD.
210: NetBSD uses its own partition scheme, called a *disklabel*, which is stored at
211: the start of the MBR partition. In the next few steps you will create a
213: and set the sizes of the NetBSD partitions, or use existing partition sizes, as
214: shown here:
216: ![Edit partitions?](/guide/images/exinst_disklabel.png)
217: **Edit partitions?**
219: When you choose to set the sizes of the NetBSD partitions you can define the
220: partitions you would like to create. The installation program will generate a
221: disklabel based on these settings. This installation screen is shown here:
223: ![Setting partition sizes](/guide/images/exinst_disklabel-change.png)
224: **Setting partition sizes**
226: The default partition scheme of just using a big `/` (root) file system (plus
227: swap) works fine with NetBSD, and there is little need to change this. The
228: previous figure shows how to change the size of the swap partition to 600 MB.
229: Changing `/tmp` to reside on a *RAM disk*
230: ([mfs(8)](http://netbsd.gw.com/cgi-bin/man-cgi?mfs+8+NetBSD-5.0.1+i386)) for
231: extra speed may be a good idea. Other partition schemes may use separate
232: partitions for `/var`, `/usr` and/or `/home`, but you should use your own
233: experience to decide if you need this.
235: The next step is to create the disklabel and edit its partitions, if necessary,
236: using the disklabel editor (see below). If you predefined the partition sizes in
237: the previous step, the resulting disklabel will probably fit your wishes. In
238: that case you can complete the process immediately by selecting *Partition sizes
241: ![The disklabel editor](/guide/images/exinst_disklabel-partitions.png)
242: **The disklabel editor**
244: There are two reserved partitions, `c`, representing the NetBSD partition, and
245: `d`, representing the whole disk. You can edit all other partitions by using the
246: cursor keys and pressing the return key. You can add a partition by selecting an
247: unused slot and setting parameters for that partition. The partition editing
248: screen is shown below:
250: ![Disklabel partition editing](/guide/images/exinst_disklabel-partition-editor.png)
251: **Disklabel partition editing**
253: ## Setting the disk name
255: After defining the partitions in the new disklabel, the last item is to enter a
256: name for the NetBSD disk as shown bwlow. This can be used later to distinguish
257: between disklabels of otherwise identical disks.
259: ![Naming the NetBSD disk](/guide/images/exinst_diskname.png)
260: **Naming the NetBSD disk**
262: ## Last chance!
264: The installer now has all the data it needs to prepare the disk. Nothing has
265: been written to the disk at this point, and now is your last chance to abort the
266: installation process before actually writing data to the disk. Choose *no* to
267: abort the installation process and return to the main menu, or continue by
268: selecting *yes*.
270: ![Last chance to abort](/guide/images/exinst_last-chance.png)
271: **Last chance to abort**
273: ## The disk preparation process
275: After confirming that sysinst should prepare the disk, it will run
277: to create the NetBSD partition layout and
278: [newfs(8)](http://netbsd.gw.com/cgi-bin/man-cgi?newfs+8+NetBSD-5.0.1+i386) to
279: create the file systems on the disk.
281: After preparing the NetBSD partitions and their filesystems, the next question
282: (shown in the next figure) is which *bootblocks* to install. Usually you will
283: choose the default of *BIOS console*, i.e., show boot messages on your
284: computer's display.
286: If you run a farm of machines without monitor, it may be more convenient to use
287: a serial console running on one of the serial ports. The menu also allows
288: changing the serial port's baud rate from the default of 9600 baud, 8 data bits,
289: no parity and one stopbit.
291: ![Selecting bootblocks](/guide/images/exinst_bootblocks.png)
292: **Selecting bootblocks**
294: ## Choosing the installation media
296: At this point, you have finished the first and most difficult part of the
299: The second half of the installation process consists of populating the file
300: systems by extracting the distribution sets that you selected earlier (base,
301: compiler tools, games, etc). Before unpacking the sets, sysinst asks what
302: information you would like to see during that process, as shown below. You can
303: choose between a progress bar, a display of the name of each extracted file, or
306: ![Choosing the verbosity of the extraction process](/guide/images/exinst_verbosity.png)
307: **Choosing the verbosity of the extraction process**
309: Now sysinst needs to find the NetBSD sets and you must tell it where to find
310: them. The menu offers several choices, as shown below. The options are explained
311: in detail in the `INSTALL` documents.
313: ![Installation media](/guide/images/exinst_medium.png)
314: **Installation media**
316: ### Installing from CD-ROM or DVD
318: When selecting *CD-ROM / DVD*, sysinst asks the name of the CD-ROM or DVD device
319: and the directory in which the set files are stored, see below. The device is
320: usually `cd0` for the first CD-ROM or DVD drive, regardless of whether it is IDE
321: or SCSI (or even USB or FireWire).
323: ![CD-ROM/DVD installation](/guide/images/exinst_cdrom.png)
324: **CD-ROM/DVD installation**
326: ### The CD-ROM/DVD device name
328: If you don't know the name of the CD-ROM/DVD device, you can find by doing the
331: 1. Press Ctrl-Z to pause sysinst and go to the shell prompt.
333: 2. Type the command:
335: # dmesg
337: This will show the kernel startup messages, including the name of the CD-ROM device, for example *cd0*.
339: 3. If the display scrolls too quickly, you can also use **more**:
341: # dmesg | more
343: 4. Go back to the installation program with the command:
345: # fg
347: ### Installing from an unmounted file system
349: The next figure shows the menu to install NetBSD from an unmounted file system.
350: It is necessary to specify the device (*Device*), the file system of the device
351: (*File system*) and the path to the install sets (*Set directory*). The setting
352: for the *Base directory* is optional and can be kept blank.
354: In the following example the install sets are stored on a *MSDOS* file system,
355: on partition `e` on the device `sd0`.
357: ![Mounting a file system](/guide/images/exinst_mount.png)
358: **Mounting a file system**
360: It is usually necessary to specify the device name and the partition. The
361: following figure shows how to specify device `sd0` with partition `e`.
363: ![Mounting a partition](/guide/images/exinst_mount-partition.png)
364: **Mounting a partition**
366: In the next figure, the file system type is specified. It is `msdos` but it
367: could also be the NetBSD file system `ffs` or `ext2fs`, a Linux file system. The
368: *Base directory item is left blank and the binary sets are stored under `/sets`.
369: Choosing *Continue* will start the extraction of the sets.
372: ![Accessing a MSDOS file system](/guide/images/exinst_mount-msdos.png)
373: **Accessing a MSDOS file system**
375: ### Installing via FTP
377: If you choose to install from a local network or the Internet via FTP, sysinst
378: will configure the system's network connection, download the selected set files
379: to a temporary directory, and then extract them.
381: NetBSD currently supports installation via ethernet, USB ethernet or wireless,
382: and wireless LAN. Installation via DSL (PPP over Ethernet) is not supported
383: during installation.
385: The first step shown in the next figure further below consists of selecting
386: which network card to configure. sysinst will determine a list of available
387: network interfaces, present them and ask which one to use.
389: *Note*: The exact names of your network interfaces depend on the hardware you
390: use. Example interfaces are `wm` for Intel Gigabit interfaces, `ne` for NE2000
391: and compatible ethernet cards, and `ath` for Atheros based wireless cards. This
392: list is by no means complete, and NetBSD supports many more network devices.
394: To get a list of network interfaces available on your system, interrupt the
395: installation process by pressing `Ctrl+Z`, then enter
397: # ifconfig -a
398: ne2: flags=8822<UP,BROADCAST,NOTRAILERS,SIMPLEX,MULTICAST> mtu 1500
399: address: 00:06:0d:c6:73:d5
400: media: Ethernet autoselect 10baseT full-duplex
401: status: active
402: inet 0.0.0.0 netmask 0xffffff00 broadcast 0.0.0.0
403: inet6 fe80::206:dff:fec6:73d5%ne2 prefixlen 64 scopeid 0x1
404: lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33196
405: inet 127.0.0.1 netmask 0xff000000
406: inet6 ::1 prefixlen 128
407: inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
408: ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
409: ppp1: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
410: sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
411: sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
412: strip0: flags=0 mtu 1100
413: strip1: flags=0 mtu 1100
415: To get more information about all the devices found during system startup,
416: including network devices, type
418: # dmesg | more
420: You can return to the NetBSD installation by typing
422: # fg
424: ![Which network interface to configure](/guide/images/exinst_ftp-if.png)
425: **Which network interface to configure**
427: Next, you have a chance to set your network medium.
429: *Note*: It is unlikely that you will need to enter anything other than the
430: default here. If you experience problems like very slow transfers or timeouts,
431: you may, for example, force different duplex settings for ethernet cards. To get
432: a list of supported media and media options for a given network device (ne2, for
433: example), escape from sysinst by pressing `Ctrl+Z`, then enter:
435: # ifconfig -m ne2
436: ne2: flags=8822<UP,BROADCAST,NOTRAILERS,SIMPLEX,MULTICAST> mtu 1500
437: address: 00:03:0d:c6:73:d5
438: media: Ethernet 10baseT full-duplex
439: status: active
440: supported Ethernet media:
441: media 10baseT
442: media 10baseT mediaopt full-duplex
443: media 10base2
444: media autoselect
446: The various values printed after `media` may be of interest here, including
447: keywords like `autoselect` but also including any `mediaopt` settings.
449: Return to the installation by typing:
451: # fg
453: The next question will be whether you want to perform DHCP autoconfiguration as
454: shown in the figure below. Answer *Yes* if you have a DHCP *Dynamic Host
455: Configuration Protocol* (DHCP) running somewhere on your network, and sysinst
456: will fetch a number of defaults from it. Answer *No* to enter all the values
459: We will assume you answered *No* and go into all the questions asked in detail.
461: ![Using DHCP for network configuration](/guide/images/exinst_ftp-dhcp.png)
462: **Using DHCP for network configuration**
464: The image below shows the questions asked for the network configuration. The
465: values to be entered are:
467: * *Your DNS Domain:* -- This is the name of the domain you are in.
468: * *Your hostname:* -- The name by which other machines can usually address your
469: computer. Not used during installation.
470: * *Your IPv4 number:* -- Enter your numerical Internet Protocol address in
471: *dotted quad* notation here, for example, 192.168.1.3
472: * *IPv4 Netmask:* -- The netmask for your network, either given as a hex value
473: (`0xffffff00`) or in dotted-quad notation (`255.255.255.0`).
474: * *IPv4 gateway:* -- Your router's (or default gateway's) IP address. Do not
475: use a hostname here!
476: * *IPv4 name server:* -- Your (first) DNS server's IP address. Again, don't use
477: a hostname.
479: ![Entering and configuring network data](/guide/images/exinst_ftp-cfg.png)
480: **Entering and configuring network data**
482: After answering all of your network configuration info, it will be displayed,
483: and you will have a chance to go back and make changes.
485: ![Confirming network parameters](/guide/images/exinst_ftp-cfgok.png)
486: **Confirming network parameters**
488: sysinst will now run a few commands (not displayed in detail here) to configure
489: the network: flushing the routing table, setting the default route, and testing
490: if the network connection is operational.
492: Now that you have a functional network connection, you must tell the installer
493: how to get the distribution sets, as shown in the next figure.
495: When you are satisfied with your settings (the defaults work most of the time),
496: choose *Get Distribution* to continue.
498: ![Defining the FTP settings](/guide/images/exinst_ftp-src.png)
499: **Defining the FTP settings**
501: ### Installing via NFS
503: If you want to install NetBSD from a server in your local network, NFS is an
504: alternative to FTP.
506: *Note*: Using this installation method requires the ability to set up an NFS
507: server, a topic which is not discussed here.
509: As shown below, you must specify the IP address of the NFS server with "Host",
510: the "Base directory" that is *exported* by the NFS server, and the "Set
511: directory", which contains the install sets.
513: ![NFS install screen](/guide/images/exinst_nfs.png)
514: **NFS install screen**
516: The following image shows an example: Host `192.168.1.50` is the NFS server that
517: provides the directory `/home/username/Downloads` The NetBSD install sets are
518: stored in the directory `/home/username/Downloads/sets` on the NFS server.
519: Choose *Continue* to start the installation of the distribution sets.
521: ![NFS example](/guide/images/exinst_nfs-example.png)
522: **NFS example**
524: ## Extracting sets
526: After the method for obtaining distribution sets has been chosen, and (if
527: applicable) after those sets have been transferred, they will be extracted into
528: the new NetBSD file system.
530: After extracting all selected sets, sysinst will create device nodes in the
531: `/dev` directory and then display a message saying that everything went well.
533: Another message will let you know that the set extraction is now completed, and
534: that you will have an opportunity to configure some essential things before
535: finishing the NetBSD installation:
537: ![Extraction of sets completed](/guide/images/exinst_extraction-complete.png)
538: **Extraction of sets completed**
540: ## System configuration
542: The first thing you can configure is your timezone. It is *Universal Time
543: Coordinated* (UTC) by default, and you can use the two-level menu of
544: continents/countries and cities shown below to select your timezone with the
545: Return key. Next, press `x` followed by Return to exit timezone selection.
547: ![Selecting the system's time zone](/guide/images/exinst_timezone.png)
548: **Selecting the system's time zone**
550: At this point, you are given the option to choose a password encryption scheme.
551: While *DES* is the standard algorithm used on most Unix systems, *MD5*,
552: *Blowfish*, and *SHA1* allow longer passwords than DES, which only uses the
553: first eight characters of the password that is entered. DES is still useful for
554: interoperability with other operating systems.
556: ![Selecting a password encryption scheme](/guide/images/exinst_cipher.png)
557: **Selecting a password encryption scheme**
559: After choosing the password cipher you are asked if you want to set the root
560: password. It is recommended to set a root password at this point for security
563: ![Set a root password?](/guide/images/exinst_passwd.png)
564: **Set a root password?**
566: When you agree to set a root password, sysinst will run the
568: utility for you. Please note that the password is not echoed.
570: ![Setting root password](/guide/images/exinst_passwd2.png)
571: **Setting root password**
573: The next menu allows you to choose which command line interpreter - also known
574: as a `shell` - will be used for the root account. The default is the classic
575: *Bourne shell*,
576: [sh(1)](http://netbsd.gw.com/cgi-bin/man-cgi?sh+1+NetBSD-5.0.1+i386). Other
577: choices are the *Korn shell*
578: ([ksh(1)](http://netbsd.gw.com/cgi-bin/man-cgi?ksh+1+NetBSD-5.0.1+i386)) and the
579: *C shell*
580: ([csh(1)](http://netbsd.gw.com/cgi-bin/man-cgi?csh+1+NetBSD-5.0.1+i386)). If,
581: upon reading this, you don't have some idea of which shell you prefer, simply
582: use the default, as this is a highly subjective decision. Should you later
583: change your mind, root's shell can always be changed.
585: ![Choosing a shell](/guide/images/exinst_shell.png)
586: **Choosing a shell**
588: ## Finishing the installation
590: At this point the installation is finished.
592: ![Installation completed](/guide/images/exinst_completed.png)
593: **Installation completed**
595: After passing the dialog that confirms the installation, sysinst will return to
596: the main menu. Remove any installation media (CD, floppy, etc.) and choose
597: *Reboot the computer* to boot your new NetBSD installation.
599: ![Reboot to finish installation](/guide/images/exinst_reboot.png)
600: **Reboot to finish installation**
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb