Front | Info | Lists | Newsfeeds | Study Guide | What is BSD? |
Quickly installing OpenBSD 3.3
By Jeremy C. Reed This article goes through the steps of an OpenBSD 3.3 installation. The installer is a text-based interface and, in most cases, is quick and easy to complete.
Getting a boot CDA free boot CD without distribution sets is available from OpenBSD servers, such as at ftp://ftp3.usa.openbsd.org/pub/OpenBSD/3.3/i386/cc33.iso. It is 3012608 bytes.
Starting installThe boot disk starts with a boot prompt, then a few seconds later it loads the kernel. After the kernel loads, you receive the choices to install, upgrade or to get a command line shell.Choose "i" to begin the installation. You can get to a shell by using "!" (exclamation mark) at most prompts. A value within brackets is a default answer; it can be selected by pressing enter. And you can abort by pressing CTRL-C (sometimes followed by pressing enter). Then you choose your terminal type. The standard "vt220" emulation is the default; so you can press enter to use it. The keyboard encoding table lets you choose the keyboard type, like a PC AT/XT or USB keyboard and then a table name, like be, br, de, dk, and other nationality codes. You can use the default "us" for standard keyboards used in the United States. Then the installer prints a note about that there will be significant data loss, the importance of backups, and you may need a calculator to do some math for partitioning. Type in "y" for yes to proceed.
Disk initializationThe installer will take advantage of special mount options for security for different partitions. It is suggested to create partitions for / (root), /tmp, /var, /usr, and /home. Also setup a swap partition too.The installer will show you your available disks and allow you to choose your root disk. (Note that disk names are like sd0 for the first SCSI disk or wd1 for the second IDE drive.) On i386 (IBM PC or Intel type) hardware, OpenBSD uses two partitioning schemes: one for BIOS standards using fdisk; and the other for BSD-style partitions using disklabel. The installer asks if you want to use the entire disk (and defaults to no). If you choose yes, then it will setup one fdisk-type partition of type A6 (OpenBSD) to use the entire disk. (This is usually the most common used method.) Then it will continue to the disklabel step.
fdisk At the fdisk prompt, type "help" for details or "manual" for documentation. Use "p" to print out the current partition setup. (Use "p m" to show the table in megabytes.) To change any of the settings, use "edit", like "edit 0" to modify the first partition. For OpenBSD, use "A6" as the ID type.To skip setting the partitions using cylinders, heads, and sectors (CHS) mode, press enter (for the default no). Then enter the offset where the partition will start at. Commonly this is "63" for the first partition on the disk. Then enter the size; you can follow a number with "m" for megabytes and "g" for gigabytes. You don't need to create separate partitions for each of your Unix filesystems -- disklabel explained later is used for that. Be sure to use "flag" to set your main root partition as bootable. To make one OpenBSD partition allocating entire disk, use "reinit". When finished, type "write" to save and "quit". (Use "exit" without "write" to exit without saving.)
disklabeldisklabel is used interactively to setup the various partitions for separate Unix filesystems. Use "?" to get help and "M" to print out the documentation. Use "p" to show the current disk label (and use "p m" to show in megabytes).You can use "d" to delete a partition, "a" to add and "m" to modify an existing label. Generally the "a" for add will know where to start at, but sometimes you may need to figure out what the offset is manually. Normally, partition "a" is for the main, root filesystem named "/". And partition "b" is for the system swap partition. When finished, use "w" to write the label to disk and then "q" to quit.
Creating filesystemsThe installer will tell you what it considers as the root filesystem (like wd0a) and the swap (like wd0b). (The root filesystem is the beginning of the hierarchy for mounting additional filesystems.) It will allow you to choose the directory names for each mount point. If you preset this earlier in the disklabel setup, then press enter for each default.Type "done" when finished choosing the mount point for each. Then it will display them and ask if you are sure to proceed. And then it will use newfs to construct a new filesystem on each of the file partitions. After a few moments or several minutes (depending on size and speed of disks), it will display the new mounts.
Network configurationThe installer will then ask for your computer's hostname (without the system/domain name parts).Network configuration is not needed for the installer when installing from CD. But when installing via the commonly-used FTP method, it is needed (or if you want a simple interface to set this up), so choose "y" (the default). It will list the available interfaces that the kernel detected and configured. Press enter for the default (like fxp0) or type one in. Then it will ask for the symbolic hostname, so just press enter to use the default hostname as set earlier. Then the installer will display the default media types for your network interface and ask if you want to change it. (Press enter for "n" if the defaults are fine.) Next it asks for your computer's IP address (or type "dhcp" for it to probe and configure using its DHCP client). Then enter your netmask (or press enter to use the default). After it is configured, it will say that no available interfaces are found; ignore that because it means that no additional interfaces are available. Next enter in your DNS domain name (as would be appended to the short system name). Then enter the IP address for your DNS name server and then choose "y" to use it. (You don't need DNS, but then you would have to use IP addresses for the remote FTP server.) For the default route, enter the IP address of the packet forwarding gateway router that is on your same network (as defined by your netmask earlier). (You can also choose "dhcp" to use the DHCP assigned gateway.) When finished, it will give you choices to use the simple line editor, ed, to edit the the /etc/hosts file and then you can do manual network configuration. (Choosing "y" for manual network configuration will escape you to the command line shell where you can use standard tools, like ifconfig and route to setup your networking. Tools for WaveLAN/IEEE and Aironet 4500/4800wireless networking devices are available too.)
Superuser PasswordThe installer will next ask for the root password for superuser access. It will prompt for it twice and will not display the input to the console.
Installation SetsThe base installation of OpenBSD is split up into gzipped tar files called "sets". The installer will ask where you will retrieve these sets; the choices are CD-ROM, local disk, ftp, http, nfs and tape device. For quick CD installs, enter "c" and for standard FTP install, use "f". (If using CD, it will ask for the directory where the sets are located on the disk.)
FTP installWhen using an ftp (or http) install, it will ask for your proxy URL. If you don't use a proxy, then use "none".Then it will ask for the FTP server hostname, or you can enter "y" to see a list of available FTP servers. (If you choose the list, then browse through it and enter the number you want when asked again; then it will ask again with your choice as the default so press enter.) Enter the server name of the FTP server you want to use, like ftp://ftp5.usa.openbsd.org/pub/OpenBSD. Then choose the default "y" if you want to use the passive FTP. Then it will ask for the directory on the server where sets are located. (You can usually use the default.) And then you can normally press enter to use the default login name (for anonymous FTP access).
Distribution setsThe installer will list the sets found in the directory previously selected. It will highlight some of the sets are defaulting for standard install. You can deselect the choices by typing an minus sign (-) followed by the complete filename, like "-games33.tgz" to unselect the games set.You can type the filename to select it or choose "all" to select all available sets. (The /bsd.rd kernel includes a ram disk image containing rescue utilities and the installation program which can be used to upgrade your system.) The base, etc, and bsd sets are required for normal (but limited) new installations. Administrators can create their own "site" tar.gz set which will be extracted last to overwrite configurations and add extra files. Also, the installer will run /install.site script as provided in that set for further customizations (in a chrooted environment for that new installed system). Type "done" when finished making your selections. And when all ready enter "y". Information about downloading each set will displayed, including showing the percentage retrieved, kilobytes, and total time (estimated to arrive and final actual time). Then you can select further sites to choose more sets, so type in "done" when finished.
More installation settingsThe installer asks if you expect to run the X Windowing System. Choose "y" if you want X to be able to access restricted memory -- this is normally needed.Then the installer will save configurations and generate a initial host.random file (which is used to seed the urandom and arandom devices at boot time). Then you can set your system's default time zone. Normally, the system's hardware clock would be set to UTC time (as in England) and the timezone would be used to report local time. You can press "?" to see a list; then type in the category and then choose a sub-category. Then it will set the local timezone. Next it creates device nodes and installs the master boot record boot blocks.
Installation finishedAfter it successfully installs the boot loader, the installer will say congratulations and exit, leaving you at a Unix command-line shell. You can type "reboot" or "halt" to exit.Be sure to eject your CD before rebooting.
RELATED INFO
DiscussionDiscuss this article below.
|
BSD Links · Advocacy· Drivers · Events · Flavours · FAQs · Guides · Programming · Security · Software · User Groups |