The Lumber Cartel, local 42 (Canadian branch)
 |   |   |   |   |   |   | 
 
 

Library - Xen - How-to - NetBSD 5 installation

As of the time of this writing, NetBSD 5 is currently in the BETA development stage.  We found that at least one version prior to 2008-Dec-29 exhibited major disk I/O throughput problems, so to avoid this make sure that your BETA version is dated after 2008-Dec-29. [CDROM]

What you will need

You will need the following:

  • One computer system with working CD-writer hardware, a working network card, and nearly 1 GB of free disk space (this will be your client computer)
  • Two blank, writeable CDs
  • Software that can read a .ISO file and write it to a blank, writeable CD
  • VNC Viewer software, such as TightVNC or UltraVNC
  • A second computer system with working CD-reader hardware, a working network card, a 64-bit Intel or AMD processor with VT support, and an empty hard disk with a capacity of at least 40 GBs (this will be your server computer, which NetBSD will be installed on)

Download the NetBSD 5 installation CD, which includes some other files

The first step in the installation process is to obtain an ISO image of NetBSD 5.  The most recent version can be found on NetBSD's official FTP site:

ftp://ftp.netbsd.org/pub/NetBSD-daily/netbsd-5/

You will likely find several directories.  If the newest one is incomplete (because it's in the process of being compiled), you can always use the penultimate version.

Next, download the files listed below.  Where you see an asterisk ("*"), download all files and subdirectories from that point.  This will ensure that you have all the needed sources as well (the ISO is the installation CD, and has everything you need to install NetBSD 5 without any kernel customizations):

  1. iso/amd64cd.iso
  2. source/sets/*

Write data to the blank CDs

Be sure to label your CDs accurately!  Most people don't do this, which often leads to confusion, and a lot of wasted time and effort.

For your first CD, use your CD writer software to "burn" the ISO image to the first CD, which will be your NetBSD 5 installation CD (label the cover with the release date as well; the numeric sub-directory name after "netbsd-5/" is recommended).

For your second CD (only needed if you plan to build and compile a custom kernel {typically not needed in test environments}), use your CD writer software to "burn" the source files onto it so that you can access them from your NetBSD system.  Alternatively, instead of writing to a second CD, you can transfer these files via FTP if you know how to set this up (this is beyond the scope of this installation guide).

Installation and basic configuration

Insert the NetBSD installation CD into your server computer and boot from it.  For complete installation instructions, see The NetBSD Guide, but during the installation make sure you don't enable softdep (it's not needed with NetBSD 5 and may cause some problems for your DomU in Xen).  We also recommend using FFSv2 instead of FFSv1.  For disk space allocation, ensure that your file system (be it / or something else) where you plan to place your Xen DomU's virtual hard disk has at least 30 GBs of free disk space.

Edit the following files after the installation is complete and you've successfully logged in with the root account for the very first time (assumptions are underlined, and will probably need to be altered to suit your network and system configurations):

echo inet 10.1.1.1/24 > /etc/ifconfig.wm0
This defines your system's IP address
 
echo netbsd.example.com > /etc/myname
If your system doesn't have a hostname, then it will suffer from amnesia (as you probably noticed before logging in)
 
echo 10.1.1.1 netbsd.example.com >> /etc/hosts
Host definitions save a lot of time and hassle because your system will consult this list before resorting to a DNS query
 
echo 10.1.1.8 > /etc/mygate
In order to communicate with other hosts on the internet, your system will need to know which host to use as the router
 
echo nameserver 10.1.1.8 > /etc/resolv.conf
For most small networks, the internet router also acts as a DNS server
 
/etc/rc.d/network restart
This command effectively "turns on" your network access, after this has completed you should be able to ping other hosts on the network by name or IP address

Configuring the Secure Shell Daemon (sshd)

An important server management tool is SSH, which is trivially easy to configure on NetBSD:

echo sshd=YES >> /etc/rc.conf
By default, the SSH daemon is disabled for security reasons (there are many SSH attackers on the internet, as you will no doubt see in your sshd log files if you leave it open on the internet)
 
echo PermitRootLogin yes >> /etc/ssh/sshd_config
This is not recommended, but can be handy as a temporary measure until you set up other accounts (after which point you should remove it from the sshd_config file); DO NOT develop the habit of logging in as "root" because, in addition to the potential security risks, mistakes can be very costly
 
/etc/rc.d/sshd start
This command starts the SSH daemon

Your installation is complete.  If you need to restart the system, DO NOT use the "reboot" command because it doesn't sycnhronize disk writes; use "shutdown -r now" instead.

[Previous] [Index] [Next]

 
 
[Home] [Profile] [Glossary] [Library] [Resources] [Tools] [FAQ] [Site map] [Contact us]

Copyright © Inter-Corporate Computer & Network Services, Inc.  All rights reserved.
All trademarks are the property of their respective owners.