<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter. Énstalling NetBSD: Preliminary considerations and preparations</title>
<link rel="stylesheet" type="text/css" href="/global.css">
<meta name="generator" content="DocBook XSL Stylesheets VX.X.X">
<link rel="home" href="index.html" title="The NetBSD Guide">
<link rel="up" href="part-install.html" title="Part ÉI. Óystem installation and related issues">
<link rel="prev" href="part-install.html" title="Part ÉI. Óystem installation and related issues">
<link rel="next" href="chap-exinst.html" title="Chapter. Åxample installation">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">Chapter. Énstalling NetBSD: Preliminary considerations and preparations</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="part-install.html">Prev</a>/td>
<th width="60%" align="center">Part ÉI. Óystem installation and related issues</th>
<td width="20%" align="right">a accesskey="n" href="chap-exinst.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="chap-inst"></a>Chapter. Énstalling NetBSD: Preliminary considerations and preparations</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="sect1"><a href="chap-inst.html#chap-inst-considerations">2.1. Preliminary considerations</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="chap-inst.html#chap-inst-dualboot">2.1.1. Dual booting</a></span></dt>
<dt><span class="sect2"><a href="chap-inst.html#chap-inst-virtual">2.1.2. NetBSD on emulation and virtualization</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="chap-inst.html#chap-Install-preps">2.2. Install preparations</a></span></dt>
<dd><dl>
<dt><span class="sect2"><a href="chap-inst.html#chap-inst-installdoc">2.2.1. The INSTALL document</a></span></dt>
<dt><span class="sect2"><a href="chap-inst.html#chap-inst-install-partition">2.2.2. Partitions</a></span></dt>
<dt><span class="sect2"><a href="chap-inst.html#chap-inst-install-disk-space-requirements">2.2.3. Hard disk space requirements</a></span></dt>
<dt><span class="sect2"><a href="chap-inst.html#chap-inst-network-settings">2.2.4. Network settings</a></span></dt>
<dt><span class="sect2"><a href="chap-inst.html#chap-inst-backup">2.2.5. Backup your data and operating systems!</a></span></dt>
<dt><span class="sect2"><a href="chap-inst.html#chap-inst-bootmedia">2.2.6. Preparing the installation media</a></span></dt>
</dl></dd>
<dt><span class="sect1"><a href="chap-inst.html#chap-inst-checklist">2.3. Checklist</a></span></dt>
</dl>
</div>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="chap-inst-considerations"></a>2.1. Ðreliminary considerations</h2></div></div></div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="chap-inst-dualboot"></a>2.1.1. Äual booting</h3></div></div></div>
<p>It is possible to install NetBSD together with other operating
systems on one hard disk.</p>
<p>If there is already an operating system on the hard disk, think
about how you can free some space for NetBSD; if NetBSD will share
the disk with other operating systems you will probably need to
create a new partition (which you will do with
<span class="application">sysinst</span>). Often times this will not be
possible unless you resize an existing partition.</p>
<p>Unfortunately, it is not possible to resize an existing partition
with <span class="application">sysinst</span>, but there are some
commercial products (like
<span class="application">Partition Magic</span>)
and some free tools (<span class="application">GNU Parted</span>,
<span class="application">FIPS</span>, <span class="application">pfdisk</span>)
available for this.</p>
<p>You can also install NetBSD on a separate hard disk.</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Advice</h3>
<p>Unless you are comfortable with setting up a partitioning
scheme for two or more operating systems, and unless you
understand the risk of data loss if you should make a mistake,
it is recommended that you give NetBSD its own hard disk. This
removes the risk of damage to the existing operating system.</p>
</div>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="chap-inst-virtual"></a>2.1.2. ÎetBSD on emulation and virtualization</h3></div></div></div>
<p>It is possible to install and run NetBSD on top of other
operating systems without having to worry about partitioning.
Emulators or virtualization environments provide a quick and secure
way to try out NetBSD. The host operating system remains unchanged,
and the risk of damaging important data is minimized.</p>
<p> Information about NetBSD as a Xen
host and guest system is available on the
<a class="ulink" href="http://www.NetBSD.org/ports/xen/" target="_top">NetBSD/xen web
page</a>.</p>
<p>The
<a class="ulink" href="http://www.NetBSD.org/ports/emulators.html" target="_top">NetBSD on
emulated hardware</a> web page provides detailed information
about various emulators and the supported NetBSD platforms. It
should also be noted that NetBSD runs as a VMware guest.</p>
</div>
</div>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="chap-Install-preps"></a>2.2. Énstall preparations</h2></div></div></div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="chap-inst-installdoc"></a>2.2.1. Ôhe INSTALL document</h3></div></div></div>
<p>The first thing to do before installing NetBSD is to read the
release information and installation notes in one of the
<code class="filename">INSTALL</code> files: this is the official
description of the installation procedure, with platform-specific
information and important details. It is available in HTML, PostScript,
plain text, and an enhanced text format to be used with
<span class="application">more</span>. These
files can be found in the root
directory of the NetBSD release (on the install CD or on the FTP
server). For example, the i386 install instructions are available on
<a class="ulink" href="//ftp.NetBSD.org/pub/NetBSD/NetBSD-7.1/i386/INSTALL.html" target="_top">
ftp.NetBSD.org/pub/NetBSD/NetBSD-7.1/i386/INSTALL.html</a>
</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="chap-inst-install-partition"></a>2.2.2. Ðartitions</h3></div></div></div>
<p>The terminology used by NetBSD for partitioning is different
from the typical DOS/Windows terminology; in fact, there are two
partitioning schemes involved when running NetBSD on a typical PC.
NetBSD installs in one of the four primary BIOS partitions (the
partitions defined in the hard disk partition table).</p>
<p>Within a BIOS partition (also called <span class="emphasis"><em>slice</em></span>)
NetBSD defines its BSD partitions using a
<span class="emphasis"><em>disklabel</em></span>: these partitions can be seen only by
NetBSD and are identified by lowercase letters (starting with
<span class="quote">“<span class="quote">a</span>”</span>).
For example, wd0a refers to the <span class="quote">“<span class="quote">a</span>”</span> partition of the first
IDE disk (wd0) and sd0a refers to the <span class="quote">“<span class="quote">a</span>”</span> partition of the
first SCSI disk. In <a class="xref" href="chap-inst.html#fig-part" title="Figure.1. Ðartitions">Figure.1, “Partitions”</a> there are two
primary BIOS partitions, one used by DOS and the other by NetBSD.
NetBSD describes the disk layout through the disklabel.</p>
<div class="figure">
<a name="fig-part"></a><p class="title"><b>Figure.1. Ðartitions</b></p>
<div class="figure-contents"><div class="mediaobject"><img src="../images/part.gif" alt="Partitions"></div></div>
</div>
<br class="figure-break"><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>The meaning of partitions <span class="quote">“<span class="quote">c</span>”</span> and <span class="quote">“<span class="quote">d</span>”</span>
is typical of the i386 port.
On most other ports, <span class="quote">“<span class="quote">c</span>”</span> represents the whole disk.
</p>
</div>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>If NetBSD shares the hard disk with another operating system
(like in the previous example) you will want to install a
<span class="emphasis"><em>boot manager</em></span>, i.e., a program which lets you
choose which OS to start at boot time.
<span class="application">sysinst</span> can do this for you and
will ask if you want to install one. Unless you have specific
reasons not to, you should let sysinst perform this step.</p>
</div>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="chap-inst-install-disk-space-requirements"></a>2.2.3. Èard disk space requirements</h3></div></div></div>
<p>The exact amount of space required for a given NetBSD installation
varies depending on the platform being used and which distribution sets
are selected. In general, if you have 1GB of free space on your hard
drive, you will have more than enough space for a full installation
of the base system.
</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="chap-inst-network-settings"></a>2.2.4. Îetwork settings</h3></div></div></div>
<p>If you plan to fetch distribution sets over the network (not
necessary if you downloaded a full-size install ISO) and do not use
DHCP, write down your basic network settings. You will need:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>Your IP address (example: 192.168.1.7)</p></li>
<li class="listitem"><p>the netmask (example: 255.255.255.0)</p></li>
<li class="listitem"><p>the IP address of your default gateway
(example: 192.168.1.1)</p></li>
<li class="listitem"><p>the IP address of the DNS server you use
(example: 145.253.2.75)</p></li>
</ul></div>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="chap-inst-backup"></a>2.2.5. Âackup your data and operating systems!</h3></div></div></div>
<p>Before you begin the installation, make sure that you have
a reliable backup of any operating systems and data on the used
hard disk. Mistakes in partitioning your hard disk can lead to data loss.
Existing operating systems may become unbootable.
"Reliable backup" means that the backup and restore procedure is
tested and works flawlessly!</p>
</div>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="chap-inst-bootmedia"></a>2.2.6. Ðreparing the installation media</h3></div></div></div>
<p>The NetBSD installation system consists of two parts. The first
part is the installation kernel. This kernel contains the NetBSD
install program <span class="application">sysinst</span> and it is booted
from a CD (or DVD), memory card, USB flash drive, or floppy disk.
The <span class="application">sysinst</span> program will
prepare the disk: it separates the disk space into partitions, makes
the disk bootable and creates the necessary file systems.</p>
<p>The second part of the install system is made up of the binary
distribution sets: the files of the NetBSD operating system.
The installer needs to have access to the distribution sets.
<span class="application">sysinst</span> will usually fetch these files
from the CD or DVD you burned, but it can also get them via FTP,
NFS, or local filesystem.</p>
<p>The NetBSD Project provides
<a class="ulink" href="https://cdn.NetBSD.org/pub/NetBSD/NetBSD-7.1/images/" target="_top">
complete install media</a> for every supported hardware architecture.
This is usually in the form of bootable CD images (<code class="filename">.iso</code>
files).</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>Please see the <a class="ulink" href="https://NetBSD.org/mirrors/#iso" target="_top">
list of mirrors</a> and choose a local server near
you for downloads</p>
</div>
<div class="sect3">
<div class="titlepage"><div><div><h4 class="title">
<a name="chap-inst-bootmedia-usb"></a>2.2.6.1. Âooting the install system from USB</h4></div></div></div>
<p>To use a bootable NetBSD install USB (on amd64, i386)
download the <code class="filename">img.gz</code> file for your hardware
architecture, decompress and copy the image to a USB. For example
on a Unix-like system you may use:</p>
<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>gunzip NetBSD-7.1-amd64-install.img.gz</code></strong>
<code class="prompt">#</code> <strong class="userinput"><code>dd if=NetBSD-7.1-amd64-install.img of=/dev/<em class="replaceable"><code>your-usb</code></em> bs=2m</code></strong>
</pre>
<p>
<code class="filename">your-usb</code> may be
<code class="filename">/dev/rsd0d</code> (NetBSD),
<code class="filename">/dev/sda</code> (Linux).</p>
<div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Caution</h3>
<p>Selecting the wrong device in
<span class="command"><strong>dd</strong></span> may destroy your current system. Double
check it isn't mounted and is your USB stick. It should appear at
the bottom of <span class="command"><strong>dmesg</strong></span> on connect, for example,
if you see:
</p>
<pre class="screen">sd0 at scsibus0 target 0 lun 0: [...], disk removable</pre>
<p>
on NetBSD, you will want to select
<code class="filename">/dev/rsd0d</code>.</p>
</div>
</div>
<div class="sect3">
<div class="titlepage"><div><div><h4 class="title">
<a name="chap-inst-bootmedia-cdrom"></a>2.2.6.2. Âooting the install system from CD</h4></div></div></div>
<p>To use a bootable NetBSD install CD
download the <code class="filename">iso</code> file for your hardware
architecture and burn it to a CD or DVD. You will need to handle
this step alone, as burning programs vary widely. Ensure that
your computer is set up to boot from CD-ROM before hard drives,
insert the disc, and reboot the computer.</p>
</div>
<div class="sect3">
<div class="titlepage"><div><div><h4 class="title">
<a name="chap-inst-bootmedia-floppy"></a>2.2.6.3. Âooting the install system from floppy</h4></div></div></div>
<p>If you need to create installation floppies, you need to
copy floppy images to a diskette. The floppy images are available
on the NetBSD FTP servers or on a NetBSD install CD.
To perform this operation in DOS you can use the
<span class="application">rawrite</span> program in the
<code class="filename">i386/installation/misc</code> directory. For
Windows, there's a version in <code class="filename">rawr32.zip</code>.
The image files are
<code class="filename">i386/installation/floppy/boot1.fs</code> and
<code class="filename">i386/installation/floppy/boot2.fs</code> for
installation of a <span class="quote">“<span class="quote">normal</span>”</span> PC.
The other floppies that are available are described in more detail
in the <code class="filename">INSTALL</code> document.</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>Before you write the boot images to floppies, you
should always check that the floppies are good: this simple step
is often overlooked, but can save you a lot of trouble!</p>
</div>
<p>The procedure to write floppies is:</p>
<div class="procedure"><ol class="procedure" type="1">
<li class="step"><p>Format the floppy.</p></li>
<li class="step"><p>Go to the <code class="filename">I386\INSTALLATION\FLOPPY</code> directory
of the CD-ROM.</p></li>
<li class="step"><p>Run the
<span class="command"><strong><code class="filename">..\MISC\RAWRITE</code></strong></span>
program (or extract <code class="filename">..\MISC\RAWR32.ZIP</code>
if you're on a Windows system, and run the RAWRITE32 program
in that file). Usually the <span class="quote">“<span class="quote">Source file</span>”</span>s are
<code class="filename">BOOT1.FS</code> and
<code class="filename">BOOT2.FS</code> and the
<span class="quote">“<span class="quote">Destination drive</span>”</span> is A:</p></li>
</ol></div>
<p>To create a boot floppy in a Unix environment, the
<span class="command"><strong>dd</strong></span> command can be used:
For example:</p>
<pre class="screen"><code class="prompt">#</code> <strong class="userinput"><code>cd i386/installation/floppy</code></strong>
<code class="prompt">#</code> <strong class="userinput"><code>dd if=boot.fs of=/dev/fd0a bs=36b</code></strong></pre>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>A 1440K floppy contains 1474560 bytes and is made up of 80
cylinders, 2 tracks, 18 sectors and 512 bytes per sector, i.e., 80 *
2 * 18 = 2880 blocks.
Thus <code class="option">bs=36b</code> copies one cylinder (18 * 2 blocks) at
a time and repeats the operation 80 times instead of 2880.</p>
</div>
</div>
</div>
</div>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="chap-inst-checklist"></a>2.3. Ãhecklist</h2></div></div></div>
<p>This is the checklist about the things that should be clear
and on-hand now:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>Available disk space</p></li>
<li class="listitem"><p>Bootable medium with the install system</p></li>
<li class="listitem"><p>CD/DVD or server with the distribution sets</p></li>
<li class="listitem"><p>Your network information (only if you will be fetching
distribution sets via the network and do not use DHCP)</p></li>
<li class="listitem"><p>A working backup</p></li>
<li class="listitem"><p>A printout of the INSTALL document</p></li>
</ul></div>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="part-install.html">Prev</a>/td>
<td width="20%" align="center"><a accesskey="u" href="part-install.html">Up</a></td>
<td width="40%" align="right">a accesskey="n" href="chap-exinst.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Part ÉI. Óystem installation and related issues/td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> Ãhapter. Åxample installation</td>
</tr>
</table>
</div>
</body>
</html>