Annotation of wikisrc/guide/inst.mdwn, revision 1.4

1.4     ! jdf         1: **Contents**
        !             2: 
        !             3: [[!toc levels=3]]
        !             4: 
1.1       jdf         5: # Installing NetBSD: Preliminary considerations and preparations
                      6: 
                      7: ## Preliminary considerations
                      8: 
                      9: ### Dual booting
                     10: 
1.2       jdf        11: It is possible to install NetBSD together with other operating systems on one
1.1       jdf        12: hard disk.
                     13: 
1.2       jdf        14: If there is already an operating system on the hard disk, think about how you
                     15: can free some space for NetBSD; if NetBSD will share the disk with other
                     16: operating systems you will probably need to create a new partition (which you
                     17: will do with sysinst). Often times this will not be possible unless you resize
1.1       jdf        18: an existing partition.
                     19: 
1.2       jdf        20: Unfortunately, it is not possible to resize an existing partition with sysinst,
                     21: but there are some commercial products (like Partition Magic) and some free
1.1       jdf        22: tools (GNU Parted, FIPS, pfdisk) available for this.
                     23: 
                     24: You can also install NetBSD on a separate hard disk.
                     25: 
1.2       jdf        26: *Advice*: Unless you are comfortable with setting up a partitioning scheme for
                     27: two or more operating systems, and unless you understand the risk of data loss
                     28: if you should make a mistake, it is recommended that you give NetBSD its own
1.1       jdf        29: hard disk. This removes the risk of damage to the existing operating system.
                     30: 
                     31: ### NetBSD on emulation and virtualization
                     32: 
1.2       jdf        33: It is possible to install and run NetBSD on top of other operating systems
                     34: without having to worry about partitioning. Emulators or virtualization
                     35: environments provide a quick and secure way to try out NetBSD. The host
                     36: operating system remains unchanged, and the risk of damaging important data is
1.1       jdf        37: minimized.
                     38: 
1.2       jdf        39: Information about NetBSD as a Xen host and guest system is available on the
1.1       jdf        40: [NetBSD/xen web page](http://www.NetBSD.org/ports/xen/).
                     41: 
1.2       jdf        42: The [NetBSD on emulated hardware](http://www.NetBSD.org/ports/emulators.html)
                     43: web page provides detailed information about various emulators and the supported
1.1       jdf        44: NetBSD platforms. It should also be noted that NetBSD runs as a VMware guest.
                     45: 
                     46: ## Install preparations
                     47: 
                     48: ### The INSTALL document
                     49: 
1.2       jdf        50: The first thing to do before installing NetBSD is to read the release
                     51: information and installation notes in one of the `INSTALL` files: this is the
                     52: official description of the installation procedure, with platform-specific
                     53: information and important details. It is available in HTML, PostScript, plain
                     54: text, and an enhanced text format to be used with more. These files can be found
                     55: in the root directory of the NetBSD release (on the install CD or on the FTP
                     56: server). For example (replacing `6.1` with your release number, and `port` with
1.1       jdf        57: your port):
                     58: 
                     59:     ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-6.1/port/INSTALL.html
                     60: 
                     61: ### Partitions
                     62: 
1.2       jdf        63: The terminology used by NetBSD for partitioning is different from the typical
                     64: DOS/Windows terminology; in fact, there are two partitioning schemes involved
                     65: when running NetBSD on a typical PC. NetBSD installs in one of the four primary
1.1       jdf        66: BIOS partitions (the partitions defined in the hard disk partition table).
                     67: 
1.2       jdf        68: Within a BIOS partition (also called *slice*) NetBSD defines its BSD partitions
                     69: using a *disklabel*: these partitions can be seen only by NetBSD and are
                     70: identified by lowercase letters (starting with `a`). For example, wd0a refers to
                     71: the `a` partition of the first IDE disk (wd0) and sd0a refers to the `a`
                     72: partition of the first SCSI disk. In the following figure, there are two primary
                     73: BIOS partitions, one used by DOS and the other by NetBSD. NetBSD describes the
1.1       jdf        74: disk layout through the disklabel.
                     75: 
                     76: ![Partitions](/guide/images/part.gif)
                     77: 
1.2       jdf        78: *Note*: The meaning of partitions `c` and `d` is typical of the i386 port. On
1.1       jdf        79: most other ports, `c` represents the whole disk.
                     80: 
1.2       jdf        81: *Note*: If NetBSD shares the hard disk with another operating system (like in
                     82: the previous example) you will want to install a *boot manager*, i.e., a program
                     83: which lets you choose which OS to start at boot time. sysinst can do this for
                     84: you and will ask if you want to install one. Unless you have specific reasons
1.1       jdf        85: not to, you should let sysinst perform this step.
                     86: 
                     87: ### Hard disk space requirements
                     88: 
1.2       jdf        89: The exact amount of space required for a given NetBSD installation varies
                     90: depending on the platform being used and which distribution sets are selected.
                     91: In general, if you have 1GB of free space on your hard drive, you will have more
1.1       jdf        92: than enough space for a full installation of the base system.
                     93: 
                     94: ### Network settings
                     95: 
1.2       jdf        96: If you plan to fetch distribution sets over the network (not necessary if you
                     97: downloaded a full-size install ISO) and do not use DHCP, write down your basic
1.1       jdf        98: network settings. You will need:
                     99: 
                    100:  * Your IP address (example: 192.168.1.7)
                    101:  * the netmask (example: 255.255.255.0)
                    102:  * the IP address of your default gateway (example: 192.168.1.1)
                    103:  * the IP address of the DNS server you use (example: 145.253.2.75)
                    104: 
                    105: ### Backup your data and operating systems!
                    106: 
1.2       jdf       107: Before you begin the installation, make sure that you have a reliable backup of
                    108: any operating systems and data on the used hard disk. Mistakes in partitioning
                    109: your hard disk can lead to data loss. Existing operating systems may become
                    110: unbootable. "Reliable backup" means that the backup and restore procedure is
1.1       jdf       111: tested and works flawlessly!
                    112: 
                    113: ### Preparing the installation media
                    114: 
1.2       jdf       115: The NetBSD installation system consists of two parts. The first part is the
                    116: installation kernel. This kernel contains the NetBSD install program sysinst and
                    117: it is booted from a CD (or DVD), memory card, USB flash drive, or floppy disk.
                    118: The sysinst program will prepare the disk: it separates the disk space into
1.1       jdf       119: partitions, makes the disk bootable and creates the necessary file systems.
                    120: 
1.2       jdf       121: The second part of the install system is made up of the binary distribution
                    122: sets: the files of the NetBSD operating system. The installer needs to have
                    123: access to the distribution sets. sysinst will usually fetch these files from the
                    124: CD or DVD you burned, but it can also get them via FTP, NFS, or local
1.1       jdf       125: filesystem.
                    126: 
1.2       jdf       127: The NetBSD Project provides complete install media for every supported hardware
                    128: architecture. This is usually in the form of bootable CD images (`.iso` files).
1.1       jdf       129: For example (replacing `6.1` with the release you want to install):
                    130: 
                    131:     ftp://ftp.NetBSD.org/pub/NetBSD/iso/6.1/
                    132: 
1.2       jdf       133: *Note*: To improve net flow, and especially download speed, you should have a
                    134: look at the [list of mirrors](http://NetBSD.org/mirrors/#iso) and choose a local
1.1       jdf       135: server near you.
                    136: 
                    137: #### Booting the install system from CD
                    138: 
1.2       jdf       139: To use a bootable NetBSD install CD download the `iso` file for your hardware
                    140: architecture and burn it to a CD or DVD. You will need to handle this step
                    141: alone, as burning programs vary widely. Ensure that your computer is set up to
1.1       jdf       142: boot from CD-ROM before hard drives, insert the disc, and reboot the computer.
                    143: 
                    144: #### Booting the install system from floppy
                    145: 
1.2       jdf       146: If you need to create installation floppies, you need to copy floppy images to a
                    147: diskette. The floppy images are available on the NetBSD FTP servers or on a
                    148: NetBSD install CD. To perform this operation in DOS you can use the rawrite
                    149: program in the `i386/installation/misc` directory. For Windows, there's a
                    150: version in `rawr32.zip`. The image files are `i386/installation/floppy/boot1.fs`
                    151: and `i386/installation/floppy/boot2.fs` for installation of a "normal" PC. The
                    152: other floppies that are available are described in more detail in the `INSTALL`
1.1       jdf       153: document.
                    154: 
1.2       jdf       155: *Note*: Before you write the boot images to floppies, you should always check
                    156: that the floppies are good: this simple step is often overlooked, but can save
1.1       jdf       157: you a lot of trouble!
                    158: 
                    159: The procedure to write floppies is:
                    160: 
                    161:  1. Format the floppy.
                    162:  2. Go to the `I386\INSTALLATION\FLOPPY` directory of the CD-ROM.
1.3       jdf       163:  3. Run the `..\MISC\RAWRITE` program (or extract `..\MISC\RAWR32.ZIP` if
1.2       jdf       164:     you're on a Windows system, and run the RAWRITE32 program in that file).
                    165:        Usually the `Source file`s are `BOOT1.FS` and `BOOT2.FS` and the
1.1       jdf       166:        `Destination drive` is `A`:
                    167: 
                    168: To create a boot floppy in a Unix environment, the
                    169: [dd(1)](http://netbsd.gw.com/cgi-bin/man-cgi?dd+1+NetBSD-current)
                    170: command can be used: For example:
                    171: 
                    172:     # cd i386/installation/floppy
                    173:     # dd if=boot.fs of=/dev/fd0a bs=36b
                    174: 
1.2       jdf       175: *Note*: A 1440K floppy contains 1474560 bytes and is made up of 80 cylinders, 2
                    176: tracks, 18 sectors and 512 bytes per sector, i.e., 80 \* 2 \* 18 = 2880 blocks.
                    177: Thus `bs=36b` copies one cylinder (18 \* 2 blocks) at a time and repeats the
1.1       jdf       178: operation 80 times instead of 2880.
                    179: 
                    180: ## Checklist
                    181: 
                    182: This is the checklist about the things that should be clear and on-hand now:
                    183: 
                    184:  * Available disk space
                    185:  * Bootable medium with the install system
                    186:  * CD/DVD or server with the distribution sets
1.2       jdf       187:  * Your network information (only if you will be fetching distribution sets via
1.1       jdf       188:    the network and do not use DHCP)
                    189:  * A working backup
                    190:  * A printout of the INSTALL document
                    191: 

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb