File:  [NetBSD Developer Wiki] / wikisrc / guide / inst.mdwn
Revision 1.5: download - view: text, annotated - select for diffs
Fri Jun 19 19:18:31 2015 UTC (5 years, 3 months ago) by plunky
Branches: MAIN
CVS tags: HEAD
replace direct links to manpages on netbsd.gw.com with templates

    1: **Contents**
    2: 
    3: [[!toc levels=3]]
    4: 
    5: # Installing NetBSD: Preliminary considerations and preparations
    6: 
    7: ## Preliminary considerations
    8: 
    9: ### Dual booting
   10: 
   11: It is possible to install NetBSD together with other operating systems on one
   12: hard disk.
   13: 
   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
   18: an existing partition.
   19: 
   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
   22: tools (GNU Parted, FIPS, pfdisk) available for this.
   23: 
   24: You can also install NetBSD on a separate hard disk.
   25: 
   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
   29: hard disk. This removes the risk of damage to the existing operating system.
   30: 
   31: ### NetBSD on emulation and virtualization
   32: 
   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
   37: minimized.
   38: 
   39: Information about NetBSD as a Xen host and guest system is available on the
   40: [NetBSD/xen web page](http://www.NetBSD.org/ports/xen/).
   41: 
   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
   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: 
   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
   57: your port):
   58: 
   59:     ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-6.1/port/INSTALL.html
   60: 
   61: ### Partitions
   62: 
   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
   66: BIOS partitions (the partitions defined in the hard disk partition table).
   67: 
   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
   74: disk layout through the disklabel.
   75: 
   76: ![Partitions](/guide/images/part.gif)
   77: 
   78: *Note*: The meaning of partitions `c` and `d` is typical of the i386 port. On
   79: most other ports, `c` represents the whole disk.
   80: 
   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
   85: not to, you should let sysinst perform this step.
   86: 
   87: ### Hard disk space requirements
   88: 
   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
   92: than enough space for a full installation of the base system.
   93: 
   94: ### Network settings
   95: 
   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
   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: 
  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
  111: tested and works flawlessly!
  112: 
  113: ### Preparing the installation media
  114: 
  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
  119: partitions, makes the disk bootable and creates the necessary file systems.
  120: 
  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
  125: filesystem.
  126: 
  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).
  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: 
  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
  135: server near you.
  136: 
  137: #### Booting the install system from CD
  138: 
  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
  142: boot from CD-ROM before hard drives, insert the disc, and reboot the computer.
  143: 
  144: #### Booting the install system from floppy
  145: 
  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`
  153: document.
  154: 
  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
  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.
  163:  3. Run the `..\MISC\RAWRITE` program (or extract `..\MISC\RAWR32.ZIP` if
  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
  166: 	`Destination drive` is `A`:
  167: 
  168: To create a boot floppy in a Unix environment, the
  169: [[!template id=man name="dd" section="1"]]
  170: command can be used: For example:
  171: 
  172:     # cd i386/installation/floppy
  173:     # dd if=boot.fs of=/dev/fd0a bs=36b
  174: 
  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
  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
  187:  * Your network information (only if you will be fetching distribution sets via
  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