OpenBSD Documentation and Frequently Asked Questions ---------------------------------------------------------------------------- This FAQ is supplemental documentation to the man pages, available both in the installed system and online. The FAQ covers the active release of OpenBSD, currently v3.7. There are likely features and changes to features in the development version (-current) of OpenBSD that are not covered in this FAQ. The FAQ in PDF and plain text form is available in the pub/OpenBSD/doc directory from the FTP mirrors, along with other documents. ---------------------------------------------------------------------------- 1 - Introduction to OpenBSD * 1.1 - What is OpenBSD? * 1.2 - On what systems does OpenBSD run? * 1.3 - Is OpenBSD really free? * 1.4 - Why might I want to use OpenBSD? * 1.5 - How can I help support OpenBSD? * 1.6 - Who maintains OpenBSD? * 1.7 - When is the next release of OpenBSD? * 1.8 - What is included with OpenBSD? * 1.9 - What is new in OpenBSD 3.7? * 1.10 - Can I use OpenBSD as a desktop system? * 1.11 - Why is/isn't ProductX included? 2 - Other OpenBSD Information Resources * 2.1 - Web Pages * 2.2 - Mailing Lists * 2.3 - Manual Pages * 2.4 - Reporting Bugs 3 - Obtaining OpenBSD * 3.1 - Buying an OpenBSD CD * 3.2 - Buying OpenBSD T-Shirts * 3.3 - Does OpenBSD provide an ISO image for download? * 3.4 - Downloading via FTP, HTTP or AFS * 3.5 - Obtaining Current Source Code 4 - OpenBSD 3.7 Installation Guide * 4.1 - Overview of the OpenBSD installation procedure. * 4.2 - Pre-installation checklist * 4.3 - Creating bootable OpenBSD install media * 4.4 - Booting OpenBSD install media * 4.5 - Performing an install * 4.6 - What files are needed for Installation? * 4.7 - How much space do I need for an OpenBSD installation? * 4.8 - Multibooting OpenBSD * 4.9 - Sending your dmesg to dmesg@openbsd.org after the install * 4.10 - Adding a file set after install * 4.11 - What is 'bsd.rd'? * 4.12 - Common installation problems * 4.13 - Customizing the install process * 4.14 - How can I install a number of similar systems? * 4.15 - How can I get a dmesg(8) to report an install problem? * 4.16 - Upgrading/reinstalling OpenBSD/i386 using bsd.rd-a.out. 5 - Building the System from Source * 5.1 - OpenBSD's Flavors * 5.2 - Why should I build my system from source? * 5.3 - Building OpenBSD from source * 5.4 - Building a release * 5.5 - Building X * 5.6 - Why do I need a custom kernel? * 5.7 - Building a custom kernel * 5.8 - Boot-time configuration * 5.9 - Using config(8) to change your kernel * 5.10 - Getting more verbose output during boot * 5.11 - Common Problems when Compiling and Building 6 - Networking * 6.1 - Before we go any further * 6.2 - Initial network setup * 6.3 - How do I filter and firewall with OpenBSD? * 6.4 - Dynamic Host Configuration Protocol (DHCP) * 6.5 - Point to Point Protocol * 6.6 - Tuning networking parameters * 6.7 - Using NFS * 6.9 - Setting up a bridge with OpenBSD * 6.10 - How do I boot using PXE? * 6.11 - The Common Address Redundancy Protocol (CARP) * 6.12 - Using OpenNTPD * 6.13 - What are my wireless networking options? 7 - Keyboard and Display Controls * 7.1 - How do I remap the keyboard? (wscons) * 7.2 - Is there console mouse support in OpenBSD? * 7.3 - How do I clear the console each time a user logs out? * 7.4 - Accessing the console scrollback buffer. (amd64, i386, some Alpha) * 7.5 - How do I switch consoles? (amd64, i386, Zaurus, some Alpha) * 7.6 - How can I use a console resolution of 80x50? (amd64, i386) * 7.7 - How do I use a serial console? * 7.8 - How do I blank my console? (wscons) * 7.9 - EVERYTHING I TYPE AT THE LOGIN PROMPT IS IN CAPS! 8 - General Questions * 8.1 - I forgot my root password... What do I do! * 8.2 - X won't start, I get lots of error messages * 8.4 - What is the ports tree? * 8.5 - What are packages? * 8.6 - Should I use Ports or Packages? * 8.8 - Is there any way to use my floppy drive if it's not attached during boot? * 8.9 - OpenBSD Bootloader (i386 amd64 specific) * 8.10 - Using S/Key on your OpenBSD system * 8.12 - Does OpenBSD support SMP? * 8.13 - I sometimes get Input/output error when trying to use my tty devices * 8.14 - What web browsers are available for OpenBSD? * 8.15 - How do I use the mg editor? * 8.16 - Ksh does not appear to read my .profile! * 8.17 - Why does my /etc/motd file get written over when I modified it? * 8.18 - Why does www.openbsd.org run on Solaris? * 8.19 - I'm having problems with PCI devices being detected * 8.20 - Antialiased and TrueType fonts in X * 8.21 - Does OpenBSD support any journaling filesystems? * 8.22 - Reverse DNS or Why is it taking so long for me to log in? * 8.23 - Why do the OpenBSD web pages not conform to HTML4/XHTML? * 8.24 - Why is my clock off by twenty-some seconds? * 8.25 - Why is my clock off by several hours? 9 - Migrating to OpenBSD * 9.1 - Tips for users of other Unix-like Operating Systems * 9.2 - Dual boot of Linux and OpenBSD * 9.3 - Converting your Linux (or other Sixth Edition-style) password file to BSD-style. * 9.4 - Running Linux binaries on OpenBSD * 9.5 - Accessing your Linux files from OpenBSD 10 - System Management * 10.1 - When I try to su to root it says that I'm in the wrong group * 10.2 - How do I duplicate a filesystem? * 10.3 - How do I start daemons with the system? (Overview of rc(8)) * 10.4 - Why do users get relaying access denied when they are remotely sending mail through my OpenBSD system? * 10.5 - I've set up POP, but I get errors when accessing my mail through POP. What can I do? * 10.6 - Why does Sendmail ignore /etc/hosts file? * 10.7 - Setting up a Secure HTTP Server using SSL(8) * 10.8 - I made changes to /etc/passwd with vi(1), but the changes didn't seem to take place. Why? * 10.9 - How do I add a user? or delete a user? * 10.10 - How do I create a ftp-only account? * 10.11 - Setting up user disk quotas * 10.12 - Setting up KerberosV Clients and Servers * 10.13 - Setting up an Anonymous FTP Server * 10.14 - Confining users to their home directories in ftpd(8). * 10.15 - Applying patches in OpenBSD. * 10.16 - Tell me about chroot() Apache? * 10.17 - I don't like the standard root shell! * 10.18 - What else can I do with ksh? 11 - Performance Tuning * 11.1 - Disk I/O * 11.2 - Hardware Choices * 11.3 - Why aren't we using async mounts? * 11.4 - Tuning your monitor resolution under X 12 - Platform-Specific Questions * 12.1 - General hardware notes * 12.2 - DEC Alpha * 12.3 - AMD 64 * 12.4 - CATS ARM development board * 12.5 - HP 9000 series 300, 400 * 12.6 - HPPA * 12.7 - i386 * 12.8 - Mac68k * 12.9 - MacPPC * 12.10 - MVME68k * 12.11 - MVME88k * 12.12 - SPARC * 12.13 - UltraSPARC * 12.14 - DEC VAX 13 - Multimedia * 13.1 - How do I configure my audio device? * 13.2 - Playing different kinds of audio * 13.3 - How can I play audio CDs in OpenBSD? * 13.4 - Can I use OpenBSD to record audio samples? * 13.5 - Tell me about Ogg Vorbis and MP3 encoding? * 13.6 - How can I playback video DVDs in OpenBSD? * 13.7 - How do I burn CDs and DVDs? * 13.8 - But I want my media files in format FOO. * 13.9 - Is it possible to play streaming media under OpenBSD? * 13.10 - Can I have Java and/or Flash plugins in my web browser? (i386 only) 14 - Disk Setup * 14.1 - Using OpenBSD's disklabel(8) * 14.2 - Using OpenBSD's fdisk(8) * 14.3 - Adding extra disks in OpenBSD * 14.4 - How to swap to a file * 14.5 - Soft Updates * 14.6 - How does OpenBSD/i386 boot? * 14.7 - What are the issues regarding large drives with OpenBSD? * 14.8 - Installing Bootblocks - i386 specific * 14.9 - Preparing for disaster: Backing up and Restoring from tape. * 14.10 - Mounting disk images in OpenBSD * 14.11 - Help! I'm getting errors with IDE DMA! * 14.13 - RAID options with OpenBSD * 14.14 - Why does df(1) tell me I have over 100% of my disk used? * 14.15 - Recovering partitions after deleting the disklabel * 14.16 - Can I access data on filesystems other than FFS? * 14.17 - Can I use a flash memory device with OpenBSD? PF User's Guide * Basic Configuration + Getting Started + Lists and Macros + Tables + Packet Filtering + Network Address Translation + Traffic Redirection (Port Forwarding) + Shortcuts For Creating Rulesets * Advanced Configuration + Runtime Options + Scrub (Packet Normalization) + Anchors + Packet Queueing and Prioritization + Address Pools and Load Balancing + Packet Tagging (Policy Filtering) * Additional Topics + Logging + Performance + Issues with FTP + Authpf: User Shell for Authenticating Gateways + Firewall Redundancy with CARP and pfsync * Example Rulesets + Firewall for Home or Small Office ---------------------------------------------------------------------------- Commonly Encountered Issues * Common Installation Problems * How do I upgrade my system? * Packet Filter * Should I use Ports or Packages? * How do I set up a multi-boot system? * Hard disk DMA errors * Wireless networking options ---------------------------------------------------------------------------- Recent Updates * FAQ 14 - Can I access data on filesystems other than FFS? - new * FAQ 14 - Can I use a flash memory device with OpenBSD? - new * FAQ revised for OpenBSD 3.7 * Upgrade Guide - new * FAQ 13 - Multimedia - new * FAQ 14 - Recovering partitions after deleting the disklabel - new * New and improved build-from-source instructions ---------------------------------------------------------------------------- The FAQ maintainers are Nick Holland and Joel Knight. Additional contributors to the FAQ include Steven Mestdagh, Eric Jackson, Wim Vandeputte and Chris Cappuccio. For information about and assisting in the translation of this FAQ and the rest of the OpenBSD website, see the translation page. Questions and comments regarding the FAQ may be directed to faq@openbsd.org. General questions about OpenBSD should be directed to the appropriate mail list. OpenBSD FAQ Copyright (C) 1998-2005 OpenBSD $OpenBSD: index.html,v 1.250 2005/10/19 01:10:21 nick Exp $ "If you don't find it in the index, look very carefully through the entire catalogue." Sears, Roebuck, and Co., Consumer's Guide, 1897 ============================================================================== 1 - Introduction to OpenBSD ------------------------------------------------------------------------------ Table of Contents * 1.1 - What is OpenBSD? * 1.2 - On what systems does OpenBSD run? * 1.3 - Is OpenBSD really free? * 1.4 - Why might I want to use OpenBSD? * 1.5 - How can I help support OpenBSD? * 1.6 - Who maintains OpenBSD? * 1.7 - When is the next release of OpenBSD? * 1.8 - What is included with OpenBSD? * 1.9 - What is new in OpenBSD 3.7? * 1.10 - Can I use OpenBSD as a desktop system? * 1.11 - Why is/isn't ProductX included? ------------------------------------------------------------------------------ 1.1 - What is OpenBSD? The OpenBSD project produces a freely available, multi-platform 4.4BSD-based UNIX-like operating system. Our goals place emphasis on correctness, security, standardization, and portability. OpenBSD supports binary emulation of most binaries from SVR4 (Solaris), FreeBSD, Linux, BSDI, SunOS, and HPUX. This FAQ specifically covers only the most recent release of OpenBSD, version 3.7. 1.2 - On what systems does OpenBSD run? OpenBSD 3.7 runs on the following platforms: * alpha - FTP only * amd64 - CD bootable * cats - FTP only * hp300 - FTP only * hppa - FTP only * i386 - CD bootable * luna88k - FTP only * mac68k - FTP only * macppc - CD bootable * mvme68k - FTP only * mvme88k - FTP only * sgi - FTP only * sparc - CD bootable * sparc64 - CD bootable * vax - on CD * zaurus - FTP only bootable means that OpenBSD will boot directly from the CD. The CD set will boot on several hardware platforms. See chapter 3 of this FAQ for details of obtaining OpenBSD on CD. Previous releases of OpenBSD also had a port for: * amiga - removed after the 3.2 release * sun3 - removed after the 2.9 release * arc - removed after the 2.3 release * pmax - removed after the 2.7 release People sometimes ask why we support so many "odd" machines. The short answer is, "because we want to". If enough skilled people (sometimes, "enough" is only one really skilled person!) wish to maintain support for a platform, it will be supported. There are practical benefits to keeping OpenBSD multi-platform: when new platforms come out, the code tree is relatively free of portability-breaking bugs and design flaws. The OpenBSD platforms include 32 bit and 64 bit processors, large and small endian machines, and many different designs. And yes, supporting "unusual" platforms has helped produced a higher-quality code base for more "common" platforms. 1.3 - Is OpenBSD really free? OpenBSD is all free. The binaries are free. The source is free. All parts of OpenBSD have reasonable copyright terms permitting free redistribution. This includes the ability to REUSE most parts of the OpenBSD source tree, either for personal or commercial purposes. OpenBSD includes NO further restrictions other than those implied by the original BSD license. Software which is written under stricter licenses cannot be included in the regular distribution of OpenBSD. This is intended to safeguard the free use of OpenBSD. For example, OpenBSD can be freely used for personal use, for academic use, by government institutions, by non-profit making organizations and by commercial organizations. OpenBSD, or parts of it, can also be freely incorporated into commercial products. For further reading on other popular licenses read: OpenBSD Copyright Policy. The maintainers of OpenBSD support the project largely from their own pockets. This includes the time spent programming for the project, equipment used to support the many ports, the network resources used to distribute OpenBSD to you, and the time spent answering questions and investigating users' bug reports. The OpenBSD developers are not independently wealthy and even small contributions of time, equipment, and resources make a big difference. 1.4 - Why might I want to use OpenBSD? New users frequently want to know whether OpenBSD is superior to some other free UNIX-like operating system. That question is largely unanswerable and is the subject of countless (and useless) religious debates. Do not, under any circumstances, ask such a question on an OpenBSD mailing list. Below are some reasons why we think OpenBSD is a useful operating system. Whether OpenBSD is right for you is a question that only you can answer. * OpenBSD runs on many different hardware platforms. * OpenBSD is thought of by many security professionals as the most secure UNIX-like operating system, as the result of a never-ending comprehensive source code security audit. * OpenBSD is a full-featured UNIX-like operating system available in source form at no charge. * OpenBSD integrates cutting-edge security technology suitable for building firewalls and private network services in a distributed environment. * OpenBSD benefits from strong ongoing development in many areas, offering opportunities to work with emerging technologies with an international community of programmers and end-users. 1.5 - How can I help support OpenBSD? We are greatly indebted to the people and organizations that have contributed to the OpenBSD project. They are acknowledged by name on the donations page. OpenBSD has a constant need for several types of support from the user community. If you find OpenBSD useful, you are strongly encouraged to find a way to contribute. If none of the suggestions below are right for you, feel free to propose an alternative by sending e-mail to donations@openbsd.org. * Buy an OpenBSD CD set. It includes the current full release of OpenBSD, and is bootable on many platforms. It also generates revenue to support the OpenBSD project, and reduces the strain on network resources used to deliver the distribution via the Internet. This inexpensive three-CD set includes full source. Remember, your friends need their own copy! * Donate money. The project has a constant need for cash to pay for equipment, network connectivity, and expenses relating to CD publishing. Manufacturing CDs requires an up-front out-of-pocket investment for the OpenBSD developers, without guaranteed return. Send e-mail to donations@openbsd.org to find out how to contribute. Even small donations make a profound difference. * Donate equipment and parts. The project has a constant need for general and specific hardware. Items such as IDE and SCSI disks, and various types of RAM are always welcome. For other types of hardware such as computer systems and motherboards, you should inquire as to current need. Write to donations@openbsd.org to arrange for shipment. * Donate your time and skills. Programmers who enjoy writing operating systems are naturally always welcome, but there are literally dozens of other ways that people can be useful. Follow mailing lists and help answer new-user questions. * Help maintain documentation by submitting new FAQ material (to faq@openbsd.org). Form a local user group and get your friends hooked on OpenBSD. Make a case to your employer for using OpenBSD at work. If you're a student, talk to your professors about using OpenBSD as a learning tool for Computer Science or Engineering courses. It's also worth mentioning one of the most important ways you should not try to "help" the OpenBSD project: do not waste your time engaging in operating system flame wars. It does not help the project to find new users and can cause substantial harm to important relationships that developers have with other developers. 1.6 - Who maintains OpenBSD? OpenBSD is maintained by a development team spread across many different countries. The project is coordinated by Theo de Raadt, located in Canada. 1.7 - When is the next release of OpenBSD? The OpenBSD team makes a new release every six months, with target release dates in May and November. More information on the development cycle can be found here. 1.8 - What is included with OpenBSD? OpenBSD is distributed with a number of third-party software products, including: * X.org 6.8.2, the X Window environment, with local patches. For i386, v3.3 XFree86 servers are also included for additional graphic chipset support. Installed with the x*.tgz install file sets. * GCC versions 2.95.3 and 3.3.5. GNU C Compiler. The OpenBSD team has added the Propolice stack protection technology, enabled by default, and used throughout the OpenBSD userland and by default on applications compiled on OpenBSD. Installed as part of the comp37.tgz file set. * Perl 5.8.6, with patches and improvements from the OpenBSD team. * Apache 1.3.29 web server. The OpenBSD team has added default chrooting, privilege revocation, and other security-related improvements. Also includes mod_ssl 2.8.16 and DSO support. * OpenSSL 0.9.7d, with patches and improvements from the OpenBSD team. * Groff 1.15 text processor. * Sendmail 8.13.3 mail server, with libmilter. * BIND 9.3.0 DNS server. OpenBSD has implemented many improvements in chroot operation and other security-related issues. * Lynx 2.8.5rel.2 text web browser. With HTTPS support added, plus patches from the OpenBSD team. * Sudo v1.6.8p6, allowing users to run individual commands as root. * Ncurses 5.2. * KAME IPv6. * Heimdal 0.6rc1 with patches * Arla 0.35.7 * OpenSSH 4.1 * gdb 6.1 As can be seen, the OpenBSD team often patches third-party products (typically) to improve the security or quality of the code. In some cases, the user will see no difference in operation, in other cases, there ARE operational differences which may impact some users. Keep these enhancements in mind before blindly adding different versions of the same software. You may get a bigger version number, but a less secure system. Of course, additional applications can be added through the OpenBSD packages and ports system. 1.9 - What is new in OpenBSD 3.7? The complete list of changes made to OpenBSD 3.6 to create OpenBSD 3.7 can be found here, however here are some changes the OpenBSD team anticipate will require or warrant some special note to people upgrading or installing OpenBSD 3.7 who are familiar with older versions: * Improved wireless support. Many current wireless network adapters are now supported in the GENERIC kernel. * Improvements to the OpenBSD/mac68k port, now uses the "normal" bsd.rd installer, and runs well on most Quadra-series systems with 68040 processor. * ccd now supports mirroring of disks. ccd(4) is in the GENERIC kernel, no custom kernel is needed. * CARP now supports "IP-less" interfaces, see carp(4) for details. * OpenBGPD has been joined by ospfd(8), a daemon which provides support for the Open Shortest Path First (OSPF) protocol. * Bash-style prompt expansions are now available in ksh(1), meaning there are even fewer reasons to install "bash" on your OpenBSD system. * X.org's X Window System has replaced XFree86. For the most part, operation will be similar. If you have an operational XF86Config file for your system, renaming it to xorg.conf will probably give you a fully functional X.org system. * New loadfirmware framework loadfirmware(9) has been added and allows firmware loading for devices, from the /etc/firmware directory. 1.10 - Can I use OpenBSD as a desktop system? This question is often asked in exactly this manner -- with no explanation of what the asker means by "desktop". The only person who can answer that question is you, as it depends on what your needs and expectations are. While OpenBSD has a great reputation as a "server" operating system, it can be and is used on the desktop. Many "desktop" applications are available through ports and packages. As with all operating system decisions, the question is: can it do the job you desire in the way you wish? You must answer this question for yourself. 1.11 - Why is/isn't ProductX included? People often ask why a particular product is or isn't included with OpenBSD. The answer is based on two things: the wishes of the developers and compatibility with the goals of the project. A product will not be included simply because it is "neat" -- it must also be "free" for use, distribution and modification by our standards. A product must also be stable and secure -- a bigger version number does not always mean a better product. License is often the biggest problem: we want OpenBSD to remain usable by any person anywhere in the world for any purpose. Another major consideration is the wishes of the developers. The OpenBSD developers are the ultimate judges of what does and doesn't go into the project. Just because an application is "good" doesn't mean the OpenBSD project wishes to devote the resources needed to maintaining it, or that they will share other's enthusiasm about its place in OpenBSD. Some commonly asked questions about third-party products: * Why is Sendmail included, it is "known insecure"?! Sendmail has had an imperfect security record, however the Sendmail authors and maintainers have been very receptive to reworking their code to make it much more secure (and this is a sadly uncommon response). The recent security history of Sendmail is not much different than some of the supposedly "more secure" alternatives. * Why isn't Postfix included? The license is not free, and thus can not be considered. * Why isn't qmail or djbdns included? License, or lack of: the inability to distribute a modified version of this software keeps it from being considered. * Why is Apache included? It isn't needed by many people! Because the developers want it. * Why isn't a newer version of Apache included? The license on newer versions is unacceptable. * Why isn't bzip2 included instead of gzip? Performance is horrible, and benefit is minimal. Impact on slower platforms, such as m68k or VAX would be unacceptable. In most cases, these topics have been discussed in painful detail on the mail lists, please see archives if you need more information. Of course, If you wish to use one of these packages and your use is compatible with the license of the products, no one will stop you (that wouldn't be very free if we tried, would it?). However, your needs may change -- you may not want to develop a "Killer Application" that you can't sell, distribute, or get rich from because you incorporated non-free software into it. ------------------------------------------------------------------------------ $OpenBSD: faq1.html,v 1.77 2005/09/26 23:14:03 nick Exp $ ============================================================================== 2 - Other OpenBSD Information Resources ------------------------------------------------------------------------------ Table of Contents * 2.1 - Web Pages * 2.2 - Mailing Lists * 2.3 - Manual Pages * 2.4 - Reporting Bugs ------------------------------------------------------------------------------ 2.1 - Web Pages of Interest The official website for the OpenBSD project is located at: http:// www.OpenBSD.org. A lot of valuable information can be found here regarding all aspects of the OpenBSD project. The OpenBSD Journal is an OpenBSD-focused news and opinion site. OpenBSDsupport.org is a site collecting "user maintained" documentation of varying quality, but often covering topics not in this FAQ or other official documentation. Many users have set up sites and pages with OpenBSD specific information. As with everything on the Internet, a good search engine is going to make your life easier, as will a healthy dose of skepticism. As always, do not blindly enter commands you do not understand into your computer. 2.2 - Mailing Lists The OpenBSD project maintains several popular mailing lists which users should subscribe to and follow. To subscribe to a mailing list, send an e-mail message to majordomo@openbsd.org. That address is an automated subscription service. In the body of your message, on a single line, you should include a subscribe command for the list you wish to join. For example: subscribe announce The list processor will reply to you, asking for confirmation of your intent to join the list, so that others can not subscribe you to a flood of unwanted e-mail. The message will include instructions for several different ways to confirm, including a list server web page link, responding to the confirmation message or responding to majordomo@openbsd.org. Use whatever method is convenient to you. You will note that all three techniques involve a unique and time limited identifying number, such as A56D-70D4-52C3, again to make sure you are really the person who requested this mail list subscription (this is real "opt-in"). Once you have confirmed your intent to join, you will be immediately added to the list, and the list processor will notify you that you were successfully added. To unsubscribe from a list, you will again send an e-mail message to majordomo@openbsd.org. It might look like this: unsubscribe announce If you have any difficulties with the mailing list system, please first read the help file which can be obtained by sending an e-mail message to majordomo@openbsd.org with a message body of "help". Your subscription to the OpenBSD mail lists can also be maintained through the web interface at http://lists.openbsd.org Some of the more popular OpenBSD mailing lists are: * announce - Important announcements. This is a low-volume list. * security-announce - Announcements of security issues. This is a low volume list. * misc - General user questions and answers. This is the most active list, and should be the "default" for most questions. * bugs - Bugs received via sendbug(1) and discussions about them. * source-changes - Automated mailing of CVS source tree changes. Every time a developer commits a change to the OpenBSD source tree, CVS will send out a copy of the (usually brief) commit message via this list. * ports - Discussion of the OpenBSD Ports Tree. * ports-changes - Automated mailing of ports-specific CVS source tree changes. * advocacy - Discussion on advocating OpenBSD, and topics that are just too off-topic for misc. Before posting a question on misc or any other mailing list, please check the archives, for most common questions have been asked repeatedly. While it might be the first time you have encountered the problem or question, others on the mailing lists may have seen the same question several times in the last week, and may not appreciate seeing it again. If asking a question possibly related to hardware, always include a dmesg(8)! You can find several archives, other mailing list guidelines and more information on the mailing lists page. An unofficial mailing list that may be of interest to new users of OpenBSD and Unix is the OpenBSD Newbies list. 2.3 - Manual Pages OpenBSD comes with extensive documentation in the form of manual pages, as well as longer documents relating to specific applications. Considerable effort is made to make sure the man pages are up-to-date and accurate. In all cases, the man pages are considered the authoritative source of information for OpenBSD. To access the manual pages and other documentation, be sure that you installed the man37.tgz and misc37.tgz file sets. Here is a list of some of the most useful manual pages for new users: Getting Started * afterboot(8) - things to check after the first complete boot. * help(1) - help for new users and administrators. * hier(7) - layout of filesystems. * man(1) - display the on-line manual pages. * intro(1) - introduction to general commands, also see the intros to the other sections of the manual: intro(2), intro(3), intro(4) (note: intro(4) is platform specific), intro(5), intro(6), intro(7), intro(8), and intro (9). * adduser(8) - command for adding new users. * vipw(8) - edit the master password file. * disklabel(8) - read and write disk pack label. * reboot, halt(8) - stop and restart the system. * shutdown(8) - close down the system at a given time. * dmesg(8) - redisplay the kernel boot messages * sudo(8) - don't log in as root, but run commands as root. * mg(1) - emacs-like text editor. For more advanced users * boot(8) - system bootstrapping procedures. * boot_config(8) - how to change kernel configuration at boot. * gcc_local(1) - OpenBSD-specific modifications to gcc(1) * ifconfig(8) - configure network interface parameters. * login.conf(5) - format of the login class configuration file. * netstat(1) - show network status. * release(8) - build an OpenBSD release. * sendbug(1) - send a problem report (PR) about OpenBSD to a central support site. * style(9) - OpenBSD kernel source code style guide. * sysctl(8) - get or set kernel state. You can find all the OpenBSD man pages on the web at http://www.openbsd.org/ cgi-bin/man.cgi as well as on your computer if you install the man37.tgz file set. In general, if you know the name of a command or a manual page, you can read it by executing "man command". For example: "man vi" to read about the vi editor. If you don't know the name of the command, or if "man command" doesn't find the manual page, you can search the manual page database by executing "apropos something" or "man -k something", where "something" is a likely word that might appear in the title of the manual page you're looking for. For example: # apropos "time zone" tzfile (5) - time zone information zdump (8) - time zone dumper zic (8) - time zone compiler The parenthetical numbers indicate the section of the manual in which that page can be found. In some cases, you may find manual pages with identical names living in separate sections of the manual. For example, assume that you want to know the format of the configuration files for the cron daemon. Once you know the section of the manual for the page you want, you would execute "man n command", where n is the manual section number. # man -k cron cron (8) - clock daemon crontab (1) - maintain crontab files for individual users crontab (5) - tables for driving cron # man 5 crontab In addition to the UNIX manual pages, there is a typesettable document set (included in the misc37.tgz file set). It lives in the /usr/share/doc directory. You can format each document set with a "make" in the appropriate subdirectory. The psd subdirectory is the Programmer's Supplementary Documents distribution. The smm subdirectory is the System Manager's Manual. The usd subdirectory is the UNIX User's Supplementary Documents distribution. You can perform your "make" in the three distribution subdirectories, or you can select a specific section of a distribution and do a `make' in its subdirectory. Some of the subdirectories are empty. By default, formatting the documents will result in PostScript output, suitable for printing. The PostScript output can be quite large -- you should assume a 250-300% increase in volume. If you do not have access to a PostScript printer or display, you may also format the documents for reading on a terminal display. Each document subdirectory has a target for building ASCII copies of these papers (called `paper.txt') which can be generated with make(1). For example: # cd /usr/share/doc/usd/04.csh # make paper.txt # more paper.txt Note that superuser privileges may be required to build documents in these directories, and that issuing make clean will remove any papers generated by a previous make. See /usr/share/doc/README for more details about the documents in /usr/share/doc/. The UNIX manual pages are generally more current and trustworthy than the typesettable documents. The typesettable documents sometimes explain complicated applications in more detail than the manual pages do. For many, having a hardcopy of the man page can be useful. Here are the guidelines to making a printable copy of a man page. How do I display a man page source file (i.e. one whose filename ends in a number, like tcpdump.8)? These are found throughout the src tree. The man pages are found in the tree unformatted, and many times, through the use of CVS, they will be updated. To view these pages, simply: # nroff -Tascii -mandoc | more How do I get a plain man page with no formatting or control characters? This is helpful to get the man page straight, with no non-printable characters. Example: # man | col -b How can I get a PostScript copy of a man page that's print-ready? Note that must be the man page source file (probably a file that ends in a number e.g. tcpdump.8). The PostScript versions of the man pages look very nice. They can be printed or viewed on-screen with a program like gv (GhostView). GhostView can be found in our Ports Tree. Use the following nroff (1) command options for getting a PostScript version from an OpenBSD system man page: # nroff -Tps -mandoc > outfile.ps How do I generate compressed copies of the man pages? For people who build their system from source, there are a number of options relating to the way in which man pages are built. These options can be placed in /etc/mk.conf (it may be necessary to create this file) and are included during system builds. One especially useful option is to generate compressed man pages in order to save disk space. These can be viewed in the normal way, using the man command. In order to set this, add the following to /etc/ mk.conf: MANZ=yes Another useful option is to have the system build generate man pages in PostScript format, as well as ASCII text. This is done by setting the option MANPS=yes in /etc/mk.conf. See mk.conf(5) for further details. What are info files? Some of the documentation for OpenBSD comes in the form of info files, typically contained in /usr/share/info. This is an alternative form of documentation provided by GNU. Many of these files are more up to date than the manual pages provided by GNU, and can be accessed with the info(1) command. For example, to view information about the GNU compiler, gcc(1), type: # info gcc After using info, you will really appreciate our man pages! How do I get color man pages on XTerm? The default configuration file for xterm(1) does not display color man pages. In order to get color output, copy the file /etc/X11/app-defaults/XTerm-color to your home directory, and rename it ".Xdefaults". Be careful not to overwrite any current settings in ".Xdefaults". This file contains all the settings you need to enable color in XTerm. However, three lines need to be uncommented before this can work: !*VT100*colorULMode: on !*VT100*underLine: off !*VT100*colorBDMode: on The rest of this file allows you to choose colors for various settings. The relevant ones to the man pages are: *VT100*colorUL: yellow *VT100*colorBD: white That produces rather hellish looking man pages, so customise as necessary: may we suggest red for "colorUL" and magenta for "colorBD"? There is also a man page viewer for X11 available, xman(1), which provides an alternative (graphical) interface to the manual pages. See the manual pages for xterm and xman for more information. How do I write my own manual page? If you wish to write your own man page for an application you have written, a tutorial is provided in mdoc.samples(7). There is also a handy reference guide provided in mdoc(7). 2.4 - Reporting Bugs Before crying "Bug!", please make sure that is really what you are dealing with. If instead, you are not understanding how something is done in OpenBSD or how it works, and can't find out how to resolve the problem using the manual pages or the OpenBSD website, use the mail lists (usually misc@openbsd.org) to request help. If this is your first OpenBSD experience, be realistic: you probably did not discover an unknown bug. Also note that faulty hardware can mimic a software bug, please verify the current condition of your hardware before deciding you have found a "bug". Finally, before submitting any bug report, please read http://www.openbsd.org/ report.html. Proper bug reporting is one of the most important responsibilities of end users. Very detailed information is required to diagnose most serious bugs. Developers frequently get bugs reports via e-mail such as this: From: joeuser@example.com To: bugs@openbsd.org Subject: HELP!!! I have a PC and it won't boot!!!!! It's a 486!!!!! Hopefully most people understand why such reports get summarily deleted. All bug reports should contain detailed information. If Joe User had really expected someone to help find this bug, he or she would have supplied more information... something like this: From: smartuser@example.com To: bugs@openbsd.org Subject: 3.3-beta panics on a SPARCStation2 OpenBSD 3.2 installed from an official CD-ROM installed and ran fine on this machine. After doing a clean install of 3.3-beta from an FTP mirror, I find the system randomly panics after a period of use, and predictably and quickly when starting X. This is the dmesg output: OpenBSD 3.3-beta (GENERIC) #9: Mon Mar 17 12:37:18 MST 2003 deraadt@sparc.openbsd.org:/usr/src/sys/arch/sparc/compile/GENERIC real mem = 67002368 avail mem = 59125760 using 200 buffers containing 3346432 bytes of memory bootpath: /sbus@1,f8000000/esp@0,800000/sd@1,0 mainbus0 (root): SUNW,Sun 4/75 cpu0 at mainbus0: CY7C601 @ 40 MHz, TMS390C602A FPU; cache chip bug - trap page uncached cpu0: 64K byte write-through, 32 bytes/line, hw flush cache enabled memreg0 at mainbus0 ioaddr 0xf4000000 clock0 at mainbus0 ioaddr 0xf2000000: mk48t02 (eeprom) timer0 at mainbus0 ioaddr 0xf3000000 delay constant 17 auxreg0 at mainbus0 ioaddr 0xf7400003 zs0 at mainbus0 ioaddr 0xf1000000 pri 12, softpri 6 zstty0 at zs0 channel 0 (console i/o) zstty1 at zs0 channel 1 zs1 at mainbus0 ioaddr 0xf0000000 pri 12, softpri 6 zskbd0 at zs1 channel 0: reset timeout zskbd0: no keyboard zstty2 at zs1 channel 1: mouse audioamd0 at mainbus0 ioaddr 0xf7201000 pri 13, softpri 4 audio0 at audioamd0 sbus0 at mainbus0 ioaddr 0xf8000000: clock = 20 MHz dma0 at sbus0 slot 0 offset 0x400000: rev 1+ esp0 at sbus0 slot 0 offset 0x800000 pri 3: ESP100A, 25MHz, SCSI ID 7 scsibus0 at esp0: 8 targets sd0 at scsibus0 targ 1 lun 0: SCSI2 0/direct fixed sd0: 411MB, 1476 cyl, 9 head, 63 sec, 512 bytes/sec, 843284 sec total sd1 at scsibus0 targ 3 lun 0: SCSI2 0/direct fixed sd1: 2006MB, 8188 cyl, 3 head, 167 sec, 512 bytes/sec, 4110000 sec total le0 at sbus0 slot 0 offset 0xc00000 pri 5: address 08:00:20:13:10:b9 le0: 16 receive buffers, 4 transmit buffers cgsix0 at sbus0 slot 1 offset 0x0: SUNW,501-2325, 1152x900, rev 11 wsdisplay0 at cgsix0 wsdisplay0: screen 0 added (std, sun emulation) fdc0 at mainbus0 ioaddr 0xf7200000 pri 11, softpri 4: chip 82072 fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec root on sd0a rootdev=0x700 rrootdev=0x1100 rawdev=0x1102 This is the panic I got when attempting to start X: panic: pool_get(mclpl): free list modified: magic=78746572; page 0xfaa93000; item addr 0xfaa93000 Stopped at Debugger+0x4: jmpl [%o7 + 0x8], %g0 RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC! DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION! ddb> trace pool_get(0xfaa93000, 0x22, 0x0, 0x1000, 0x102, 0x0) at pool_get+0x2c0 sosend(0x16, 0xf828d800, 0x0, 0xf83b0900, 0x0, 0x0) at sosend+0x608 soo_write(0xfac0bf50, 0xfac0bf70, 0xfac9be28, 0xfab93190, 0xf8078f24, 0x0) at soo_write+0x18 dofilewritev(0x0, 0xc, 0xfac0bf50, 0xf7fff198, 0x1, 0xfac0bf70) at dofilewritev+0x12c sys_writev(0xfac87508, 0xfac9bf28, 0xfac9bf20, 0xf80765c8, 0x1000, 0xfac0bf70) at sys_writev+0x50 syscall(0x79, 0xfac9bfb0, 0x0, 0x154, 0xfcffffff, 0xf829dea0) at syscall+0x220 slowtrap(0xc, 0xf7fff198, 0x1, 0x154, 0x1, 0xfac87508) at slowtrap+0x1d8 ddb> ps PID PPID PGRP UID S FLAGS WAIT COMMAND 27765 8819 29550 0 3 0x86 netio xconsole 1668 29550 29550 0 3 0x4086 poll fvwm 15447 29550 29550 0 3 0x44186 poll xterm 8819 29550 29550 35 3 0x4186 poll xconsole 1238 29550 29550 0 3 0x4086 poll xclock 29550 25616 29550 0 3 0x4086 pause sh 1024 25523 25523 0 3 0x40184 netio XFree86 *25523 25616 25523 35 2 0x44104 XFree86 25616 30876 30876 0 3 0x4086 wait xinit 30876 16977 30876 0 3 0x4086 pause sh 16977 1 16977 0 3 0x4086 ttyin csh 5360 1 5360 0 3 0x84 select cron 14701 1 14701 0 3 0x40184 select sendmail 12617 1 12617 0 3 0x84 select sshd 27515 1 27515 0 3 0x184 select inetd 1904 1 1904 0 2 0x84 syslogd 9125 1 9125 0 3 0x84 poll dhclient 7 0 0 0 3 0x100204 crypto_wa crypto 6 0 0 0 3 0x100204 aiodoned aiodoned 5 0 0 0 3 0x100204 syncer update 4 0 0 0 3 0x100204 cleaner cleaner 3 0 0 0 3 0x100204 reaper reaper 2 0 0 0 3 0x100204 pgdaemon pagedaemon 1 0 1 0 3 0x4084 wait init 0 -1 0 0 3 0x80204 scheduler swapper Thank you! See report.html for more information on creating and submitting bug reports. Detailed information about your hardware is necessary if you think the bug could be in any way related to your hardware or hardware configuration. Usually, dmesg(8) output is sufficient in this respect. A detailed description of your problem is necessary. You will note that the dmesg described the hardware, the text explained why Smart User thought the system was not broken, (ran 3.2 properly), how this crash was caused (starting X), and the output of the debugger's "ps" and "trace" commands. In this case, Smart User provided output captured on a serial console; if you can not do that, you will have to use paper and pencil to record the crash. (This was a real problem, and the information in the above report helped lead to a repair of this issue which impacted Sun4c systems.) If Smart User had a working OpenBSD system from which he wanted to submit a bug report, he would have used the sendbug(1) utility to submit his bug report to the GNATS problem tracking system. Obviously you can't use sendbug(1) when your system won't boot, but you should use it whenever possible. You will still need to include detailed information about what happened, the exact configuration of your system, and how to reproduce the problem. The sendbug(1) command requires that your system be able to send electronic mail successfully on the Internet. Note that the mail server uses spamd(8) based greylisting, so it may take half an hour or so before the mail server accepts your bug report, so please be patient. After submitting a bug report via sendbug(1), you will be notified by e-mail about the status of the report. You may be contacted by developers for additional information or with patches that need testing. You can also monitor the archives of the bugs@openbsd.org mailing list, details on the mailing list page, or query the bug report database status at the on-line Bug Tracking System. More on getting useful info for developers Here are a few additional tips: Lost the "Panic message"? Under some circumstances, you may lose the very first message of a panic, stating the reason for the panic. This is a very important message, so you want to report it, as well. You can get this back by using the "show panic" command in ddb> like this: ddb> show panic 0: kernel: page fault trap, code=0 ddb> In this case, the panic string was "Kernel: page fault trap, code=0" Special note for SMP systems: You should get a "trace" from each processor as part of your report: ddb{0}> trace pool_get(d05e7c20,0,dab19ef8,d0169414,80) at pool_get+0x226 fxp_add_rfabuf(d0a62000,d3c12b00,dab19f10,dab19f10) at fxp_add_rfabuf+0xa5 fxp_intr(d0a62000) at fxp_intr+0x1e7 Xintr_ioapic0() at Xintr_ioapic0+0x6d --- interrupt --- idle_loop+0x21: ddb{0}> machine ddb 1 Stopped at Debugger+0x4: leave ddb{1}> trace Debugger(d0319e28,d05ff5a0,dab1bee8,d031cc6e,d0a61800) at Debugger+0x4 i386_ipi_db(d0a61800,d05ff5a0,dab1bef8,d01eb997) at i386_ipi_db+0xb i386_ipi_handler(b0,d05f0058,dab10010,d01d0010,dab10010) at i386_ipi_handler+0x 4a Xintripi() at Xintripi+0x47 --- interrupt --- i386_softintlock(0,58,dab10010,dab10010,d01e0010) at i386_softintlock+0x37 Xintrltimer() at Xintrltimer+0x47 --- interrupt --- idle_loop+0x21: ddb{1}> Repeat the "machine ddb x" followed by "trace" for each processor in your machine. ------------------------------------------------------------------------------ $OpenBSD: faq2.html,v 1.84 2005/07/04 17:33:17 nick Exp $ ============================================================================== 3 - Obtaining OpenBSD ------------------------------------------------------------------------------ Table of Contents * 3.1 - Buying an OpenBSD CD * 3.2 - Buying OpenBSD T-Shirts * 3.3 - Does OpenBSD provide an ISO image for download? * 3.4 - Downloading via FTP, HTTP or AFS * 3.5 - Obtaining Current Source Code ------------------------------------------------------------------------------ 3.1 - Buying an OpenBSD CD Purchasing an OpenBSD CD is generally the best way to get started. Visit the ordering page to purchase your copy: OpenBSD ordering page. There are many good reasons to own an OpenBSD CD: * CD sales support ongoing development of OpenBSD. * Development of a multi-platform operating system requires constant investment in equipment. * Your support in the form of a CD purchase has a real impact on future development. * The CD contains binaries (and source) for all supported platforms. * The CD is bootable on several platforms, and can be used to bootstrap a machine without a pre-existing installed operating system. * The CD is useful for bootstrapping even if you choose to install a snapshot. * Installing from CD is faster! Installing from CD preserves network connectivity resources. * OpenBSD CDs always come with very nice stickers. Your system isn't fully complete without these. You can only get these stickers by buying a CD set or donating hardware. If you're installing a release version of OpenBSD, you should use a CD. 3.2 - Buying OpenBSD T-Shirts Yes, OpenBSD has T-shirts for your wearing enjoyment. You can view these at the OpenBSD T-shirts page. Enjoy :) 3.3 - Does OpenBSD provide an ISO image for download? Some other open source operating systems are commonly distributed as CD-ROM ISO images. This is not how OpenBSD is distributed. The OpenBSD project does not make the ISO images used to master the official CDs available for download. The reason is simply that we would like you to buy the CD sets to help fund ongoing OpenBSD development. The official OpenBSD CD-ROM layout is copyright Theo de Raadt. Theo does not permit people to redistribute images of the official OpenBSD CDs. As an incentive for people to buy the CD set, some extras are included in the package as well (artwork, stickers etc). Note that only the CD layout is copyrighted, OpenBSD itself is free. Nothing precludes someone else from downloading OpenBSD and making their own CD. If for some reason you want to download a CD image, try searching the mailing list archives for possible sources. Of course, any OpenBSD ISO images available on the Internet either violate Theo de Raadt's copyright or are not official images. The source of an unofficial image may or may not be trustworthy; it is up to you to determine this for yourself. We suggest that people who want to download OpenBSD for free use the FTP install option. For those that need a bootable CD for their system, bootdisk ISO images (named cd37.iso) are available for a number of platforms which will then permit the rest of the system to be installed via FTP. These ISO images are only a few megabytes in size, and contain just the installation tools, not the actual file sets. 3.4 - Downloading via FTP, HTTP or AFS There are numerous international mirror sites offering FTP and HTTP access to OpenBSD releases and snapshots. AFS access is also available. You should always use the site nearest to you. Before you begin fetching a release or snapshot, you may wish to use ping(8) and traceroute(8) to determine which mirror site is nearest to you and whether that mirror is performing adequately. Of course, your OpenBSD release CD is always closer than any mirror. Access information is here: OpenBSD FTP page. 3.5 - Obtaining Current Source Code The source code for OpenBSD is freely redistributable and available at no charge. Generally the best way to get started with a current source tree is to install the source from the most recent CD and then configure AnonCVS to update it regularly. Information about AnonCVS, including how to set it up, is available here: OpenBSD AnonCVS page. Another alternative is to get the source code from the web. You can do that through cvsweb at: http://www.openbsd.org/cgi-bin/cvsweb/. ------------------------------------------------------------------------------ $OpenBSD: faq3.html,v 1.50 2005/10/12 20:52:05 grunk Exp $ ============================================================================== 4 - OpenBSD 3.7 Installation Guide ------------------------------------------------------------------------------ Table of Contents * 4.1 - Overview of the OpenBSD installation procedure * 4.2 - Pre-installation checklist * 4.3 - Creating bootable OpenBSD install media + 4.3.1 - Creating floppies on Unix + 4.3.2 - Creating floppies on Windows or DOS + 4.3.3 - Creating a boot CD * 4.4 - Booting OpenBSD install media * 4.5 - Performing an install + 4.5.1 - Starting the install + 4.5.2 - Setting up disks + 4.5.3 - Setting the system hostname + 4.5.4 - Configuring the network + 4.5.5 - Choosing installation media + 4.5.6 - Choosing filesets + 4.5.7 - Finishing up * 4.6 - What files are needed for installation? * 4.7 - How much space do I need for an OpenBSD installation? * 4.8 - Multibooting OpenBSD/i386 * 4.9 - Sending your dmesg to dmesg@openbsd.org after the install * 4.10 - Adding a file set after install * 4.11 - What is 'bsd.rd'? * 4.12 - Common installation problems + 4.12.1 - My Compaq only recognizes 16M RAM + 4.12.2 - My i386 won't boot after install + 4.12.3 - My machine booted, but hung at the ssh-keygen process + 4.12.4 - I got the message "Failed to change directory" when doing an install + 4.12.5 - When I login, I get "login_krb4-or-pwd: Exec format error" + 4.12.6 - My fdisk partition table is trashed or blank! * 4.13 - Customizing the install process * 4.14 - How can I install a number of similar systems? * 4.15 - How can I get a dmesg(8) to report an install problem? * 4.16 - Upgrading/reinstalling OpenBSD/i386 using bsd.rd-a.out. ------------------------------------------------------------------------------ 4.1 - Overview of the OpenBSD installation procedure OpenBSD has a robust and adaptable text-based installation procedure, and can be installed from a single floppy disk. Most platforms follow a similar installation procedure; however there are some differences in the details. In all cases, you are urged to read the platform-specific INSTALL document in the platform directory on the CD-ROM or FTP sites (for example, i386/INSTALL.i386, mac68k/INSTALL.mac68k or sparc/INSTALL.sparc). On most platforms, the OpenBSD installation uses a special kernel with a number of utilities and install scripts embedded in a preloaded RAM disk. After this kernel is booted, the operating system is extracted from a number of compressed tar(1) (.tgz) files. There are several ways to boot this install kernel: * Floppy disk: Floppy disk images are provided which can be used to create an install floppy on another Unix-like system, or on a DOS/Windows system. Typical file names are floppy37.fs, though several platforms have multiple floppy images available. * CD-ROM: On several platforms a CD-ROM image (cd37.iso) is provided allowing creation of a bootable CD-ROM. This just contains the installation kernel - install files must still be retrieved via FTP or other source. You can, of course, build your own CD-ROM with whatever files and tools you desire. * bsd.rd: The RAM disk kernel, intended for booting off either an already existing OpenBSD partition or booting over the network. * Network: Some platforms support booting over a network. * Writing a file system image to disk: a filesystem image that can be written to an existing partition, and then can be booted. * Bootable Tape: Some platforms support booting from tape. These tapes can be made following the INSTALL.platform instructions. Not every platform supports all boot options: * alpha: Floppy, CD-ROM, writing a floppy image to hard disk. * amd64: Floppy, CD-ROM, network. * cats: CD-ROM. * hp300: CD-ROM, network. * hppa: Network. * i386: Floppy, CD, network. * mac68k: Booted using utilities running on Mac OS. See INSTALL.mac68k for details. * macppc: CD-ROM, network. * mvme68k: Network, bootable tape. * mvme88k: Network, bootable tape. * sparc: Floppy, CD-ROM, network, writing image to existing swap partition, bootable tape. * sparc64: Floppy (U1/U2 only), CD-ROM, network, writing image to existing partition. * vax: Floppy, network. All platforms can also use a bsd.rd to reinstall or upgrade. Once the install kernel is booted, you have several options of where to get the install file sets. Again, not every platform supports every option. * CD-ROM: Of course, we prefer you use the Official CD-ROM set, but for special needs, you can also make your own. * FTP: Either one of the OpenBSD FTP mirror sites or your own local FTP server holding the file sets. * HTTP: Either one of the OpenBSD HTTP mirror sites or your own local web server holding the file sets. * Local disk partition: In many cases, you can install file sets from another partition on a local hard disk. For example, on i386, you can install from a FAT partition or a CD-ROM formatted in ISO9660, Rock Ridge or Joliet format. In some cases, you will have to manually mount the file system before using it. * NFS: Some platforms support using NFS mounts for the file sets. * Tape: File sets can also be read from a supported tape. 4.2 - Pre-installation checklist Before you start your install, you should have some idea what you want to end up with. You will want to know the following items, at least: * Machine name * Hardware installed and available + Verify compatibility with your platform's hardware compatibility page + If ISA, you also need to know hardware settings, and confirm they are as OpenBSD requires. * Install method to be used (CD-ROM, FTP, etc.) * How will the system be updated and patched? + If done locally, you will need to have sufficient space available for the source tree and building it. + Otherwise, you will need access to another machine to build a patched release on. * Desired disk layout + Does existing data need to be saved elsewhere? + Will OpenBSD co-exist on this system with another OS? If so, how both will be booted? Will you need to install a "boot manager"? + Will the entire disk be used for OpenBSD, or do you want to keep an existing partition/OS (or space for a future one)? + How do you wish to sub-partition the OpenBSD part of your disk? * Network settings, if not using DHCP: + Domain name + Domain Name Server(s) (DNS) address + IP addresses and subnet masks for each NIC + Gateway address * Will you be running the X Window System? 4.3 - Creating bootable OpenBSD install media As examples, we will look at the installation images available for the i386 and sparc platforms. The i386 platform has six separate installation disk images to choose from: * floppy37.fs (Desktop PC) supports many PCI and ISA NICs, IDE and simple SCSI adapters and some PCMCIA support. Most users will use this image if booting from a floppy * floppyB37.fs (Servers) supports many RAID controllers, and some of the less common SCSI adapters. However, support for many standard SCSI adapters and many EISA and ISA NICS has been removed. * floppyC37.fs (Laptops) supports the CardBus and PCMCIA devices found in many laptops. * cdrom37.fs is, in effect a combination of all three boot disks. It can be used to make a bootable 2.88M floppy, or more commonly, as a boot image for a custom recordable CD. * cd37.iso is an ISO9660 image that can be used to create a bootable CD with most popular CD-ROM creation software on most platforms. This image has the widest selection of drivers, and is usually the recommended choice if your hardware can boot from a CDROM. * cdemu37.iso is an ISO9660 image, using "floppy emulation" booting, using the 2.88M image, cdrom37.fs. It is hoped that few people will need this image -- most people will use cd37.iso, only use cdemu37.iso if cd37.iso doesn't work for you. Yes, there may be situations where one install disk is required to support your SCSI adapter and another disk is required to support your network adapter. Fortunately, this is a rare event, and can usually be worked around. The sparc platform has three separate installation disk images to choose from: * floppy37.fs: Supports systems with a floppy disk. * cd37.iso An ISO image usable to make your own CD for booting SPARC systems with a CD-ROM. * miniroot37.fs Can be written to a swap partition and booted. 4.3.1 - Creating floppies on Unix To create a formatted floppy, use the fdformat(1) command to both format and check for bad sectors. # fdformat /dev/rfd0c Format 1440K floppy `/dev/rfd0c'? (y/n): y Processing VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV done. If your output is like the above example, then the disk is OK. However, if you do not see ALL "V"'s then the disk is most likely bad, and you should try a new one. Note that some Unix-like systems have different commands for formatting floppies. Refer to your system's documentation for the exact procedure. Once you have a clean, formatted floppy it is time to write the installation image to floppy. For this, you can use the dd(1) utility. An example usage of dd(1) is below: # dd if=floppy37.fs of=/dev/rfd0c bs=32k Once the image is written, check to make sure that the copied image is the same as the original with the cmp(1) command. If the diskette is identical to the image, you will just see another prompt. # cmp /dev/rfd0c floppy37.fs 4.3.2 - Creating floppies on Windows or DOS This section describes how to write the installation images to floppy disk under Windows or DOS. You can get the tools mentioned below from the tools directory on any of the FTP mirrors, or from the 3.7/tools directory on CD1 of the OpenBSD CD set. To prepare a floppy in MS-DOS or Windows, first use the native formatting tools to format the disk. To write the installation image to the prepared floppy you can use rawrite, fdimage, or ntrw. rawrite will not work on Windows NT, 2000 or XP. Note that FDIMAGE.EXE and RAWRITE.EXE are both MS-DOS applications, and thus are limited to MS-DOS's "8.3" file naming convention. As floppyB37.fs and floppyC37.fs have longer file names, you will have to find out how your system stored the file in "8.3 format" before using FDIMAGE.EXE or RAWRITE.EXE to make your boot floppies. Example usage of rawrite: C:\> rawrite RaWrite 1.2 - Write disk file to raw floppy diskette Enter source file name: floppy37.fs Enter destination drive: a Please insert a formatted diskette into drive A: and press -ENTER- : Enter Example usage of fdimage: C:\> fdimage -q floppy37.fs a: Example usage of ntrw: C:\> ntrw floppy37.fs a: 3.5", 1.44MB, 512 bytes/sector bufsize is 9216 1474560 bytes written 4.3.3 - Making a CD-ROM You can create a CD-ROM using either the cd37.iso file or, in the case of the i386 platform, you can also use the cdrom37.fs as the bootable floppy image that is used to boot an i386 system from CD-ROM. The exact details here are left to the reader to determine with the tools they have at their disposal. Some of the tools in OpenBSD are: * mkhybrid(8) * cdrecord, part of the cdrtools collection in the OpenBSD Ports System. 4.4 - Booting OpenBSD install media Booting i386 Booting an install image on the i386 PC platform is nothing new to most people. If you are using a floppy disk, simply insert the floppy into the floppy drive and boot the system. The install image will then load, provided floppy boot is enabled in your BIOS. If you want to boot from CD, you must go into your system's BIOS and set the boot options to allow booting from CD. Some older BIOSes do not have this option, and you must use a floppy for booting your installation image. Don't worry though; even if you boot from floppy you can still install from the CD. You can also install by booting bsd.rd from an existing OpenBSD partition, or over the network using the PXE boot process. Booting sparc/sparc64 NOTE: On the sparc64 platform, only the SBus machines (Ultra 1, Ultra 2) are bootable from floppy. To boot from floppy, place the floppy disk with the OpenBSD installation image on it into the floppy drive. Then use the following command to boot from the floppy: ok boot floppy To boot from CD-ROM, place the OpenBSD CD-ROM disk into the drive. If your Sun only has one CD-ROM drive, then just go to the boot prompt, where you can 'boot cdrom': ok boot cdrom Of course, this will only work in new command mode. If you are at the old command mode prompt (a right arrow), type 'n' for the new command mode. (If you are using an old sparc that is pre-sun4c, you probably don't have a new command mode. In this case, you need to experiment.) If you have multiple CD-ROM devices, you need to boot from the correct one. Try probe-scsi from the new command mode. ok probe-scsi Target 0 Unit 0 Disk QUANTUM LIGHTNING 365S Target 1 Unit 0 Removable Disk QUANTUM EMPIRE_1080S Target 3 Unit 0 Removable Disk Joe's CD-ROM Figure out which disk is the CD-ROM you want to boot from. Note the target number. ok boot /sbus/esp/sd@X,0 4.5 - Performing an install 4.5.1 - Starting the install Whatever your means of booting is, it is now time to use it. During the boot process, the kernel and all of the programs used to install OpenBSD are loaded into memory. The most common problem when booting is a bad floppy disk or a drive alignment problem. The boot floppy is quite tightly packed -- any bad spot will cause problems. At almost any point during the OpenBSD install process, you can terminate the current install attempt by hitting CTRL-C and can restart it without rebooting by running install at the shell prompt. When your boot is successful, you will see a lot of text messages scroll by. This text, on many architectures in white on blue, is the dmesg, the kernel telling you what devices have been found, and where. Don't worry about remembering this text, as a copy is saved as /var/run/dmesg.boot. On some architectures, SHIFT+PGUP will let you examine text that has scrolled off the screen. Then, you will see the following: rootdev=0x1100 rrootdev=0x2f00 rawdev=0x2f02 erase ^?, werase ^W, kill ^U, intr ^C, status ^T (I)nstall, (U)pgrade or (S)hell? i And with that, we reach our first question. Most of the time, you have the three options shown: * Install: load OpenBSD onto the system, overwriting whatever may have been there. Note that it is possible to leave some partitions untouched in this process, such as a /home, but otherwise, assume everything else is overwritten. * Upgrade: Install a new set of install files on this machine, but do not overwrite any configuration information, user data, or additional programs. No disk formatting is done, nor are the /etc or /var directories overwritten. A few important notes: + You will not be given the option of installing the etc37.tgz file. After the install, you will have to manually merge the changes of etc37.tgz into your system before you can expect it to be fully functional. This is an important step which must be done, as otherwise certain key services (such as pf(4)) may not start. + The Upgrade process is not designed to skip releases! While this will often work, it is not supported. For OpenBSD 3.7, upgrading 3.6 to 3.7 is the only supported upgrade. If you have to upgrade from an older version, a complete reinstall is recommended. * Shell: Sometimes, you need to perform repairs or maintenance to a system which will not (or should not) boot to a normal kernel. This option will allow you to do maintenance to the system. On occasion, you will not see the "Upgrade" option listed. After a flag day event, it is not possible to directly upgrade; one must reinstall the system from scratch. In this example, we will do an install, but the upgrade process is similar. Welcome to the OpenBSD/i386 3.7 install program. This program will help you install OpenBSD in a simple and rational way. At any prompt except password prompts you can run a shell command by typing '!foo', or escape to a shell by typing '!'. Default answers are shown in []'s and are selected by pressing RETURN. At any time you can exit this program by pressing Control-C and then RETURN, but quitting during an install can leave your system in an inconsistent state. Specify terminal type: [vt220] Enter Do you wish to select a keyboard encoding table? [no] Enter In most cases, the default terminal type is appropriate; however if you are using a serial console for install, don't just take the default, respond appropriately. If you do not select a keyboard encoding table, a US keyboard layout will be assumed. IS YOUR DATA BACKED UP? As with anything that modifies disk contents, this program can cause SIGNIFICANT data loss. It is often helpful to have the installation notes handy. For complex disk configurations, relevant disk hardware manuals and a calculator are useful. Proceed with install? [no] y If you take the default here, the install process will terminate and drop you to a shell prompt. 4.5.2 - Setting up disks Setting up disks in OpenBSD varies a bit between platforms. For i386 and macppc, disk setup is done in two stages. First, the OpenBSD slice of the hard disk is defined using fdisk(8), then that slice is subdivided into OpenBSD partitions using disklabel(8). Some users may be a little confused by the terminology used here. It will appear we are using the word "partition" in two different ways. This observation is correct. There are two layers of partitioning in several OpenBSD platforms, the first, one could consider the Operating System partitioning, which is how multiple OSs on one computer mark out their own space on the disk, and the second one is how the OpenBSD partition is sub-partitioned into individual filesystems. The first layer is visible as a disk partition to DOS, Windows, and any other OS that can coexist with other Operating Systems on the IBM AT descended machines. The second layer of partitioning is visible only to OpenBSD and those OSs which can directly read an OpenBSD filesystem. Cool! Let's get to it... You will now initialize the disk(s) that OpenBSD will use. To enable all available security features you should configure the disk(s) to allow the creation of separate filesystems for /, /tmp, /var, /usr, and /home. Available disks are: wd0. Which one is the root disk? (or done) [wd0] Enter The root disk is the disk the system will boot from, and normally where swap space resides. IDE disks will show up as wd0, wd1, etc., SCSI disks and RAID devices will show up as sd0, sd1, and so on. All the disks OpenBSD can find are listed here -- if you have drives which are not showing up, you have unsupported or improperly configured hardware. Do you want to use *all* of wd0 for OpenBSD? [no] Enter If you say "yes" to this question, the entire disk will be allocated to OpenBSD. This will result in a standard Master Boot Record and partition table being written out to disk -- one partition, the size of the entire hard disk, set to the OpenBSD partition type, and flagged as the bootable partition. This will be a common choice for most production uses of OpenBSD; however, there are some systems this should not be done on. Many Compaq systems, many laptops, some Dell and other systems use a "maintenance" or "Suspend to Disk" partition, which should be kept intact. If your system has any other partitions of any type you do not wish to erase, do not select "yes" to the above question. For the sake of this example, we will assume the disk is to be split between OpenBSD and a pre-existing Windows 2000 partition, so we take the default of "no", which will take us into the fdisk(8) program. You can also get more information on fdisk(8) here. Important Note: Users with a large hard disk (larger than 8G on a newer i386, though on older machines and different platforms, often much smaller) will want to see this section before going any further. You will now create a single MBR partition to contain your OpenBSD data. This partition must have an id of 'A6'; must *NOT* overlap other partitions; and must be marked as the only active partition. The 'manual' command describes all the fdisk commands in detail. Disk: wd0 geometry: 2586/240/63 [39100320 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ *0: 0B 0 1 1 - 202 239 63 [ 63: 3069297 ] Win95 FAT-32 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Enter 'help' for information fdisk: 1> help help Command help list manual Show entire OpenBSD man page for fdisk reinit Re-initialize loaded MBR (to defaults) setpid Set the identifier of a given table entry disk Edit current drive stats edit Edit given table entry flag Flag given table entry as bootable update Update machine code in loaded MBR select Select extended partition table entry MBR swap Swap two partition entries print Print loaded MBR partition table write Write loaded MBR to disk exit Exit edit of current MBR, without saving changes quit Quit edit of current MBR, saving current changes abort Abort program without saving current changes fdisk: 1> A few commands are worthy of elaboration: * r or reinit: Clears existing partition table, makes one big OpenBSD partition, flags it active, and installs the OpenBSD MBR code. Equivalent to saying "yes" to the "use *all* of ..." question. * p or print: Displays the current partition table in sectors. "p m" will show the partition table in megabytes, "p g" will show it in gigabytes. * e or edit: edit or alter a table entry. * f or flag: Marks a partition as the active partition, the one that will be booted from. * u or update: Updates the MBR with the OpenBSD boot code, similar to "reinit", except it doesn't alter the existing partition table. * exit and quit: Careful on these, as some users are used to "exit" and "quit" having opposite meanings. It is worth pointing out once again, an error here will result in significant data loss. If you are going to do this on a drive with important data, it might be worth practicing on a "disposable" drive, in addition to having a good backup. Our drive here has a 1.5G partition for Windows 2000 (using the FAT filesystem). Looking at the info from the above display, we can see that the Windows partition occupies through cylinder 202 on the drive. So, we are going to allocate the rest of the disk to OpenBSD, starting at cylinder 203. You could also calculate OpenBSD's starting sector of 3069360 by adding the existing partition's starting sector (63) and its size (3069297). You can edit the drive layout in either Cylinder/Heads/Sectors form or just raw sectors. Which is easier depends upon what you are doing; in this case, working around an existing partition, using CHS format will probably be easier. If you are creating the first partition on the disk, just using raw sectors may be easier. fdisk: 1> e 1 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused Partition id ('0' to disable) [0 - FF]: [0] (? for help) a6 Do you wish to edit in CHS mode? [n] y BIOS Starting cylinder [0 - 2585]: [0] 203 BIOS Starting head [0 - 239]: [0] Enter BIOS Starting sector [1 - 63]: [0] 1 BIOS Ending cylinder [0 - 2585]: [0] 2585 BIOS Ending head [0 - 239]: [0] 239 BIOS Ending sector [1 - 63]: [0] 63 fdisk:*1> p Disk: wd0 geometry: 2586/240/63 [39100320 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ *0: 0B 0 1 1 - 202 239 63 [ 63: 3069297 ] Win95 FAT-32 1: A6 203 0 1 - 2585 239 63 [ 3069360: 36030960 ] OpenBSD 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused fdisk:*1> p m Disk: wd0 geometry: 2586/240/63 [19092 Megabytes] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ *0: 0B 0 1 1 - 202 239 63 [ 63: 1499M] Win95 FAT-32 1: A6 203 0 1 - 2585 239 63 [ 3069360: 17593M] OpenBSD 2: 00 0 0 0 - 0 0 0 [ 0: 0M] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0M] unused fdisk:*1> It is important that the first partition skips the first track of the disk, in this case, starting on sector 63. If an OpenBSD partition is created starting at offset 0, this partition table will end up being overwritten by the OpenBSD partition's Partition Boot Record. The system may still be bootable, but it will be very difficult to maintain, and this configuration is not recommended or supported. Note that the prompt changed to include an asterisk ('*') to indicate you have unsaved changes. As we can see from the output of p m we have not altered our Windows partition, we have successfully allocated the rest of the drive for OpenBSD, and the partitions do not overlap. We are in business. Almost. What we haven't done is flagged the partition as active so the machine will boot OpenBSD on the next reboot: fdisk:*1> f 1 Partition 1 marked active. fdisk:*1> p Disk: wd0 geometry: 2586/240/63 [39100320 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ 0: 0B 0 1 1 - 202 239 63 [ 63: 3069297 ] Win95 FAT-32 *1: A6 203 0 1 - 2585 239 63 [ 3069360: 36030960 ] OpenBSD 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused fdisk:*1> And now, we are ready to save our changes: fdisk:*1> w Writing MBR at offset 0. wd0: no disk label fdisk: 1> q Creating a disklabel The next step is to use disklabel(8) to slice up the OpenBSD partition. More details on using disklabel(8) can be found in FAQ 14, disklabel. Here is the partition information you chose: Disk: wd0 geometry: 2586/240/63 [39100320 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ 0: 0B 0 1 1 - 202 239 63 [ 63: 3069297 ] Win95 FAT-32 *1: A6 203 0 1 - 2585 239 63 [ 3069360: 36030960 ] OpenBSD 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused You will now create an OpenBSD disklabel inside the OpenBSD MBR partition. The disklabel defines how OpenBSD splits up the MBR partition into OpenBSD partitions in which filesystems and swap space are created. The offsets used in the disklabel are ABSOLUTE, i.e. relative to the start of the disk, NOT the start of the OpenBSD MBR partition. disklabel: no disk label WARNING: Disk wd0 has no label. You will be creating a new one. # using MBR partition 1: type A6 off 3069360 (0x2ed5b0) size 36030960 (0x225c9f0) Treating sectors 3069360-39100320 as the OpenBSD portion of the disk. You can use the 'b' command to change this. Initial label editor (enter '?' for help at any prompt) > ? Available commands: ? [cmnd] - this message or command specific help. a [part] - add new partition. b - set OpenBSD disk boundaries. c [part] - change partition size. D - set label to default. d [part] - delete partition. e - edit drive parameters. g [b|d|u] - use [b]ios, [d]isk or [u]ser geometry. M - show entire OpenBSD man page for disklabel. m [part] - modify existing partition. n [part] - set the mount point for a partition. p [unit] - print label. q - quit and save changes. r - recalculate free space. s [path] - save label to file. u - undo last change. w - write label to disk. X - toggle expert mode. x - exit without saving changes. z - zero out partition table. Numeric parameters may use suffixes to indicate units: 'b' for bytes, 'c' for cylinders, 'k' for kilobytes, 'm' for megabytes, 'g' for gigabytes or no suffix for sectors (usually 512 bytes). '%' for percent of total disk size, '&' for percent of free space. Non-sector units will be rounded to the nearest cylinder. Entering '?' at most prompts will give you (simple) context sensitive help. > Again, a few of these commands could use a little elaboration: * p - displays (prints) the current disklabel to the screen, and you can use the modifiers k, m or g for kilobytes, megabytes or gigabytes. * D - Clears any existing disklabel, creates a new default disklabel which covers just the current OpenBSD partition. This can be useful if the disk previously had a disklabel on it, and the OpenBSD partition was recreated to a different size -- the old disk label may not get deleted, and may cause confusion. * m - Modifies an existing entry in a disklabel. Do not over estimate what this will do for you. While it may alter the size of a disklabel partition, it will NOT alter the filesystem on the drive. Using this option and expecting it to resize existing partitions is a good way of losing large amounts of data. Slicing up your disk properly is important. The answer to the question, "How should I partition my system?" is "Exactly how you need it". This will vary from application to application. There is no universal answer. If you are unsure of how you want to partition your system, see this discussion. In this system, we have over 17G available for OpenBSD. That's a lot of space, and it isn't likely we will need most of it. So, we will deliberately not use absolute minimum sizes. We would rather have a few hundred megabytes of unused space than a kilobyte too little. On the root disk, the two partitions 'a' and 'b' must be created. The installation process will not proceed until these two partitions are available. 'a' will be used for the root filesystem (/) and 'b' will be used as swap space. After a little thought, we decide to create just enough partitions to allow the creation of the recommended separate filesystems (/, /tmp, /var, /usr, / home) along with a swap partition: * wd0a: / (root) - 150M. Should be more than enough. * wd0b: (swap) - 300M. * wd0d: /tmp - 120M. /tmp is used for building some software, 120M will probably be enough for most things. * wd0e: /var - 80M. If this were to be a web or mail server, we'd have made this partition much larger, but, that's not what we are doing. * wd0g: /usr - 2G. We want this partition to be large enough to load a few user applications, plus be able to update and rebuild the system by source if desired or needed. The Ports tree will be here as well, which will take almost 100M of this space before ports are built. If one was planning on building many applications from source using ports rather than pre-built packages, you might want a lot more space here. * wd0h: /home - 4G. This will allow plenty of user file space. Now, if you add those up, you will see over 10G of space is unused! Unused space won't hurt anything, and it gives us flexibility to enlarge things in the future if need be. Need more /tmp? No problem, create a new one in the unused space, change /etc/fstab and problem solved. > p m device: /dev/rwd0c type: ESDI disk: ESDI/IDE disk label: ST320011A bytes/sector: 512 sectors/track: 63 tracks/cylinder: 16 sectors/cylinder: 1008 cylinders: 16383 total sectors: 39102336 free sectors: 36030960 rpm: 3600 16 partitions: # size offset fstype [fsize bsize cpg] a: 17593.2M 1498.7M unused 0 0 c: 19092.9M 0.0M unused 0 0 i: 1498.7M 0.0M MSDOS > d a > a a offset: [3069360] Enter size: [36030960] 150M Rounding to nearest cylinder: 307440 FS type: [4.2BSD] Enter mount point: [none] / > a b offset: [3376800] Enter size: [35723520] 300M Rounding to nearest cylinder: 614880 FS type: [swap] Enter > a d offset: [3991680] Enter size: [35108640] 120m Rounding to nearest cylinder: 245952 FS type: [4.2BSD] Enter mount point: [none] /tmp > a e offset: [4237632] Enter size: [34862688] 80m Rounding to nearest cylinder: 164304 FS type: [4.2BSD] Enter mount point: [none] /var > a g offset: [4401936] Enter size: [34698384] 2g Rounding to nearest cylinder: 4194288 FS type: [4.2BSD] Enter mount point: [none] /usr > a h offset: [8596224] Enter size: [30504096] 4g Rounding to nearest cylinder: 8388576 FS type: [4.2BSD] Enter mount point: [none] /home > p m device: /dev/rwd0c type: ESDI disk: ESDI/IDE disk label: ST320011A bytes/sector: 512 sectors/track: 63 tracks/cylinder: 16 sectors/cylinder: 1008 cylinders: 16383 total sectors: 39102336 free sectors: 22115520 rpm: 3600 16 partitions: # size offset fstype [fsize bsize cpg] a: 150.1M 1498.7M 4.2BSD 2048 16384 16 # / b: 300.2M 1648.8M swap c: 19092.9M 0.0M unused 0 0 d: 120.1M 1949.1M 4.2BSD 2048 16384 16 # /tmp e: 80.2M 2069.2M 4.2BSD 2048 16384 16 # /var g: 2048.0M 2149.4M 4.2BSD 2048 16384 16 # /usr h: 4096.0M 4197.4M 4.2BSD 2048 16384 16 # /home i: 1498.7M 0.0M MSDOS > q Write new label?: [y] Enter You will note there is a c partition we seem to have ignored. This partition is your entire hard disk; don't attempt to alter it. You will also note the i partition wasn't defined by us; this is the pre-existing Windows 2000 partition. Partitions are not assigned any particular letters -- with the exception of a (root), b (swap) and c (entire disk), the rest of the partitions (through letter p) are available for use as you desire. If you look closely at the output of the disklabel, you will note that your drive RPM rating is probably wrong. This is historical; the drive speed is not used in any way by the system. Do not worry about it. Configuring your mount points and formatting your filesystems Now comes the final configuration of your mount points. If you configured the mount points through disklabel(8), this step consists of just verifying your selections; otherwise, you can specify them now. The root filesystem will be mounted on wd0a. wd0b will be used for swap space. Mount point for wd0d (size=122976k), none or done? [/tmp] Enter Mount point for wd0e (size=82152k), none or done? [/var] Enter Mount point for wd0g (size=2097144k), none or done? [/usr] Enter Mount point for wd0h (size=4194288k), none or done? [/home] Enter Mount point for wd0d (size=122976k), none or done? [/tmp] done No more disks to initialize. OpenBSD filesystems: wd0a / wd0d /tmp wd0e /var wd0g /usr wd0h /home The next step *DESTROYS* all existing data on these partitions! Are you really sure that you're ready to proceed? [no] y /dev/rwd0a: 307440 sectors in 305 cylinders of 16 tracks, 63 sectors 150.1MB in 1 cyl groups (306 c/g, 150.61MB/g, 19328 i/g) /dev/rwd0d: 245952 sectors in 244 cylinders of 16 tracks, 63 sectors 120.1MB in 1 cyl groups (244 c/g, 120.09MB/g, 15360 i/g) /dev/rwd0e: 164304 sectors in 163 cylinders of 16 tracks, 63 sectors 80.2MB in 1 cyl groups (164 c/g, 80.72MB/g, 10368 i/g) /dev/rwd0g: 4194288 sectors in 4161 cylinders of 16 tracks, 63 sectors 2048.0MB in 13 cyl groups (328 c/g, 161.44MB/g, 20608 i/g) /dev/rwd0h: 8388576 sectors in 8322 cylinders of 16 tracks, 63 sectors 4096.0MB in 26 cyl groups (328 c/g, 161.44MB/g, 20608 i/g) /dev/wd0a on /mnt type ffs (rw, asynchronous, local, ctime=Mon May 9 22:47:18 2 005) /dev/wd0h on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid, ctime=M on May 9 22:47:18 2005) /dev/wd0d on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Mo n May 9 22:47:18 2005) /dev/wd0g on /mnt/usr type ffs (rw, asynchronous, local, nodev, ctime=Mon May 9 22:47:18 2005) /dev/wd0e on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid, ctime=Mo n May 9 22:47:18 2005) You may wonder why the installer again asks for mount points. This allows you to recover from any errors or omissions in the mount points specified during the creation of the disklabel. For instance, the installation process will automatically delete any duplicate mount points you enter during the configuration of the disklabel. The disklabel program will allow you to enter such duplicates, and thus they must be checked for after the disklabel program exits. The deleted duplicate mount points will result in partitions without mount points, that you must assign new mount points for if you wish to use the space. Notice the "Are you really sure that you are ready to proceed?" question defaults to no, so you will have to deliberately tell it to proceed and format your partitions. If you chose no, you would simply be dropped into a shell and could start the install again by typing install, or just by rebooting again with your boot disk. At this point all filesystems will be formatted for you. This could take some time depending on the size of the partitions and the speed of the disk. 4.5.3 - Setting the system hostname Now you must set the system hostname. This value, along with the DNS domain name (specified below), will be saved in the file /etc/myname, which is used during normal boot to set the hostname of the system. If you do not set the domain name of the system, the default value of 'my.domain' will be used. It is important to set this name now, because it will be used when the cryptographic keys for the system are generated during the first boot after installation. This generation takes place whether the network is configured or not. Enter system hostname (short form, e.g. 'foo'): puffy 4.5.4 - Configuring the network Now it is time to configure your network. The network must be configured if you are planning on doing an FTP or NFS based install, considering it will be based upon the information you are about to enter. Here is a walk through of the network configuration section of the install process. Configure the network? [yes] Enter Available interfaces are: fxp0. Which one do you wish to initialize? (or 'done') [fxp0] Enter Symbolic (host) name for fxp0? [puffy] Enter The default media for fxp0 is media: Ethernet autoselect (100baseTX full-duplex) Do you want to change the default media? [no] Enter IP address for fxp0? (or 'dhcp') 199.185.137.55 Netmask? [255.255.255.0] Enter Done - no available interfaces found. DNS domain name? (e.g. 'bar.com') [my.domain] example.com DNS nameserver? (IP address or 'none') [none] 199.185.137.1 Use the nameserver now? [yes] Enter Default route? (IP address, 'dhcp' or 'none') 199.185.137.128 add net default: gateway 199.185.137.128 Edit hosts with ed? [no] Enter Do you want to do any manual network configuration? [no] Enter In the above example, we use a static IP address. As indicated, you can use "dhcp" instead on most platforms (not Alpha), assuming your environment supports it. In the case of DHCP, most of the information will be grabbed from the remote DHCP server; you will be given a chance to confirm it. Here is a sample of the network configuration part of the install, this time done with DHCP: Configure the network? [yes] Enter Available interfaces are: fxp0. Which one do you wish to initialize? (or 'done') [fxp0] Enter Symbolic (host) name for fxp0? [puffy] Enter The default media for fxp0 is media: Ethernet autoselect (100baseTX full-duplex) Do you want to change the default media? [no] Enter IP address for fxp0? (or 'dhcp') dhcp Issuing hostname-associated DHCP request for fxp0. Sending on Socket/fallback/fallback-net DHCPDISCOVER on fxp0 to 255.255.255.255 port 67 interval 1 DHCPOFFER from 199.185.137.128 DHCPREQUEST on fxp0 to 255.255.255.255 port 67 DHCPACK from 199.185.137.128 New Network Number: 199.185.137.0 New Broadcast Address: 199.185.137.255 bound to 199.185.137.55 -- renewal in 43200 seconds. Done - no available interfaces found. DNS domain name? (e.g. 'bar.com') [example.org] Enter DNS nameserver? (IP address or 'none') [199.185.137.1] Enter Use the nameserver now? [yes] Enter Default route? (IP address, 'dhcp' or 'none') [199.185.137.128] Enter Edit hosts with ed? [no] Enter Do you want to do any manual network configuration? [no] Enter NOTE: Only one interface can easily be configured using DHCP during an install. If you attempt to configure more than one interface using DHCP you will encounter errors. You have to manually configure the additional interfaces after the installation. Now, we set the password for the root account: Password for root account? (will not echo) pAssWOrd Password for root account? (again) pAssWOrd Use a secure password for the root account. You will create other user accounts after the system is booted. From passwd(1): The new password should be at least six characters long and not purely alphabetic. Its total length must be less than _PASSWORD_LEN (currently 128 characters). A mixture of both lower and uppercase letters, numbers, and meta-characters is encouraged. 4.5.5 - Choosing installation media After your network is set up, the install script will give you a chance to make manual adjustments to the configuration. Then the filesystems you created will be mounted and a root password set. This will get your local disks ready for the OpenBSD filesets to be installed upon them. Next, you will get a chance to choose your installation media. The options are listed below. You will now specify the location and names of the install sets you want to load. You will be able to repeat this step until all of your sets have been successfully loaded. If you are not sure what sets to install, refer to the installation notes for details on the contents of each. Sets can be located on a (m)ounted filesystem; a (c)drom, (d)isk or (t)ape device; or a (f)tp, (n)fs or (h)ttp server. Where are the install sets? c Available CD-ROMs are: cd0. In this example we are installing from CD-ROM. This will bring up a list of devices on your computer identified as a CD-ROM. Most people will only have one. If you need to, make sure you pick the device which you will use to install OpenBSD from. NOTE: All possible sources for install sets are listed, but not all may be available on your system. e.g. "(n)fs" is shown but not all architectures allow NFS installations. If you choose a source that is not available, you will get an error message and be given the chance to choose another source for your installation sets. Available CD-ROMs are: cd0. Which one contains the install media? (or 'done') [cd0] Enter Pathname to the sets? (or 'done') [3.7/i386] Enter Here, you are prompted for which directory the installation files are, which is 3.7/i386/ on the official CD-ROM. 4.5.6 - Choosing filesets. Now it's time to choose which filesets you will be installing. You can get a description of these files in the next section. The files that the install program finds will be shown to you on the screen. Your job is just to specify which files you want. By default all the non-X filesets are selected; however, some people may wish to limit this to the bare minimum required to run OpenBSD, which would be base37.tgz, etc37.tgz and bsd. Others will wish to install all filesets. The example below is that of a full install. The following sets are available. Enter a filename, 'all' to select all the sets, or 'done'. You may de-select a set by prepending a '-' to its name. [X] bsd [X] bsd.rd [ ] bsd.mp [X] base37.tgz [X] etc37.tgz [X] misc37.tgz [X] comp37.tgz [X] man37.tgz [X] game37.tgz [ ] xbase37.tgz [ ] xetc37.tgz [ ] xshare37.tgz [ ] xfont37.tgz [ ] xserv37.tgz File Name? (or 'done') [bsd.mp] all The following sets are available. Enter a filename, 'all' to select all the sets, or 'done'. You may de-select a set by prepending a '-' to its name. [X] bsd [X] bsd.rd [X] bsd.mp [X] base37.tgz [X] etc37.tgz [X] misc37.tgz [X] comp37.tgz [X] man37.tgz [X] game37.tgz [X] xbase37.tgz [X] xetc37.tgz [X] xshare37.tgz [X] xfont37.tgz [X] xserv37.tgz You can do all kinds of nifty things here -- "-x*" would remove all X components, if you changed your mind. In this case, we are going to load all the sets. While the system will run with fewer sets, either the starting default or installing all sets is recommended. More details on selecting sets here. Once you have successfully picked which filesets you want, you will be prompted to make sure you want to extract these filesets and they will then be installed. A progress bar will be shown that will keep you informed on how much time it will take. The times range greatly depending on what system it is you are installing OpenBSD on, the filesets installed, and the speed of the source media. This part may take from a few minutes to several hours. File Name? (or 'done') [done] Enter Ready to install sets? [yes] Enter Getting bsd ... 100% |**************************************************| 5030 KB 00:08 Getting bsd.rd ... 100% |**************************************************| 4478 KB 00:02 Getting bsd.mp ... 100% |**************************************************| 5072 KB 00:03 Getting base37.tgz ... 100% |**************************************************| 34337 KB 00:24 Getting etc37.tgz ... 100% |**************************************************| 1636 KB 00:01 Getting misc37.tgz ... 100% |**************************************************| 2222 KB 00:01 Getting comp37.tgz ... 100% |**************************************************| 21606 KB 00:17 Getting man37.tgz ... 100% |**************************************************| 7199 KB 00:05 Getting game37.tgz ... 100% |**************************************************| 2539 KB 00:01 Getting xbase37.tgz ... 100% |**************************************************| 10526 KB 00:08 Getting xetc37.tgz ... 100% |**************************************************| 96303 00:00 Getting xshare37.tgz ... 100% |**************************************************| 1981 KB 00:02 Getting xfont37.tgz ... 100% |**************************************************| 32412 KB 00:23 Getting xserv37.tgz ... 100% |**************************************************| 18322 KB 00:14 Sets can be located on a (m)ounted filesystem; a (c)drom, (d)isk or (t)ape device; or a (f)tp, (n)fs or (h)ttp server. Where are the install sets? (or 'done') [done] Enter At this point, you can pull additional files from other sources (including custom file sets) if desired, or hit 'done' if you have installed all the file sets you need. 4.5.7 - Finishing up Next, you get asked a few questions about settings for your installed system. First is whether sshd(8) should be started on boot. Usually, you will want sshd(8) running, but occasionally you may not. If your application has no need for sshd(8), there is a small theoretical security advantage to not having it running. Start sshd(8) by default? [yes] y You will be given the option to run OpenNTPD on boot. OpenNTPD is a low-impact way to keep your computer's clock accurately syncronized, and the default configuration is sufficient for many people's use. However, if your network is not properly configured, it may significantly slow your system's first boot, you can reactivate it later, by altering the startup scripts. However, as we properly configured our network earlier, we'll turn this on. Start ntpd(8) by default? [no] y You will now be asked if you plan to run X on this system. If you answer 'Y', /etc/sysctl.conf will be modified to include the line machdep.allowaperture=1 or machdep.allowaperture=2, depending on your platform. Some platforms will not ask this question at all. Do you expect to run the X Window System? [yes] y Next, you are asked if you are wanting to use a serial console with this computer, rather than a standard keyboard and monitor. If you chose "yes" and answer a couple other simple questions, /etc/boot.conf and /etc/ttys will be edited appropriately for you. Most users will take the default, no here. Change the default console to com0? [no] Enter Your last task is to enter the time zone. Depending on where your machine lives, there are may be several equally valid answers for the question. In the example that follows, we used US/Eastern, but could also have used EST5EDT or US/Michigan and had the same result. Hitting ? at the prompts will guide you through your choices. Saving configuration files......done. Generating initial host.random file ......done. What timezone are you in? ('?' for list) [Canada/Mountain] ? Africa/ Chile/ GB-Eire Israel NZ-CHAT Turkey America/ Cuba GMT Jamaica Navajo UCT Antarctica/ EET GMT+0 Japan PRC US/ Arctic/ EST GMT-0 Kwajalein PST8PDT UTC Asia/ EST5EDT GMT0 Libya Pacific/ Universal Atlantic/ Egypt Greenwich MET Poland W-SU Australia/ Eire HST MST Portugal WET Brazil/ Etc/ Hongkong MST7MDT ROC Zulu CET Europe/ Iceland Mexico/ ROK posix/ CST6CDT Factory Indian/ Mideast/ Singapore posixrules Canada/ GB Iran NZ SystemV/ right/ What timezone are you in? ('?' for list) [Canada/Mountain] US What sub-timezone of 'US' are you in? ('?' for list) ? Alaska Central Hawaii Mountain Samoa Aleutian East-Indiana Indiana-Starke Pacific Arizona Eastern Michigan Pacific-New Select a sub-timezone of 'US' ('?' for list): Eastern Setting local timezone to 'US/Eastern'...done. If you are concerned about very precise time, you may wish to read this. The last steps are for the system to create the /dev directory (which may take a while on some systems, especially if you have a small amount of RAM), and install the boot blocks. Making all device nodes...done. Installing boot block... boot: /mnt/boot proto: /usr/mdec/biosboot device: /dev/rwd0c /usr/mdec/biosboot: entry point 0 proto bootblock size 512 /mnt/boot is 3 blocks x 16384 bytes fs block shift 2; part offset 3069360; inode block 152, offset 4136 using MBR partition 1: type 166 (0xa6) offset 3069360 (0x2ed5b0) done. CONGRATULATIONS! Your OpenBSD install has been successfully completed! To boot the new system, enter halt at the command prompt. Once the system has halted, reset the machine and boot from the disk. # halt syncing disks... done The operating system has halted. Please press any key to reboot. OpenBSD is now installed on your system and ready for its first boot, but before you do... Before you reboot At this point, your system is installed and ready to be rebooted and configured for service. Before doing this, however, it would be wise to check out the Errata page to see if there are any bugs that would immediately impact you. A trick you can use for some "before first boot" configuration is to run: # /mnt/usr/sbin/chroot /mnt at the shell prompt. This will set your mount points to be what they will be on a normal reboot of your newly installed system. You can now do some basic system configuration, such as adding users, changing mount points, etc. After you reboot One of your first things to read after you install your system is afterboot (8). You may also find the following links useful: * Adding users in OpenBSD * Initial Network Setup * Man Pages of popular/useful commands * OpenBSD man pages on the Web * The OpenBSD Ports and Packages system for installing software, as well as here and here One last thing... The OpenBSD developers ask you to Send in a copy of your dmesg. This is really appreciated by the developers, and ultimately, all users. 4.6 - What files are needed for installation? The complete OpenBSD installation is broken up into a number of separate file sets. Not every application requires every file set. Here is an overview of each: * bsd - This is the Kernel. Required * bsd.mp - Multi-processor (SMP) kernel (only some platforms) * bsd.rd - RAM disk kernel * base37.tgz - Contains the base OpenBSD system Required * etc37.tgz - Contains all the files in /etc Required * comp37.tgz - Contains the compiler and its tools, headers and libraries. Recommended * man37.tgz - Contains man pages Recommended * misc37.tgz - Contains misc info, setup documentation * game37.tgz - Contains the games for OpenBSD * xbase37.tgz - Contains the base install for X11 * xetc37.tgz - Contains the /etc/X11 and /etc/fonts configuration files * xfont37.tgz - Contains X11's font server and fonts * xserv37.tgz - Contains X11's X servers * xshare37.tgz - Contains manpages, locale settings, includes, etc. for X The etc37.tgz and xetc37.tgz sets are not installed as part of an upgrade, only as part of a complete install, so any customizations you make will not be lost. You will have to update your /etc, /dev and /var directories manually. 4.7 - How much space do I need for an OpenBSD installation? Obviously, the answer to this question varies tremendously based on your use of the system. However, these numbers can be used as a starting point: (root) 100MB /usr 250MB (no X) or 400MB (with X) /var 25MB /tmp 50MB swap 32MB Those are minimum suggested filesystem sizes for a full system install. The numbers include enough extra space to permit you to run a typical home system that is connected to the Internet, but not much else. Keep the following facts in mind, however: * These are minimum values. Disk is relatively cheap now, trying to squeeze your system into the smallest possible disk is rarely worth the effort. For special purpose applications, the above numbers can be made smaller, but you will need to experiment with it. * If you plan to install a significant amount of third party software, make your /usr partition large! At least triple these values! * For a system that handles lots of email or web pages (stored, respectively, in /var/mail and /var/www) you will want to make your /var partition significantly larger, or put them on separate partitions. * For a multiuser system which may generate lots of logs, you will want to make your /var partition significantly larger still, or create a separate log partition (/var/log). * If you plan to rebuild the kernel or system from source, you will want to make the /usr partition significantly larger, at least 2G larger than indicated above. * Compiling some ports from source can take huge amounts of space on your / usr and /tmp partitions, this is another reason we suggest using pre-compiled packages instead. * The /tmp partition is used in the compiling of ports, among other things, so how big you make it depends on what you do with it. 50M may be plenty for most people, but some large applications may require 100M or more of / tmp space. * The 'b' partition of your first drive automatically becomes your system swap partition -- we recommend a minimum of 32MB but if you have disk to spare make it at least 64MB. If you have lots of disk space to spare, make this 256MB, or even 512MB. On the other hand, if you are using a flash device for disk, you probably want no swap partition at all. Many people follow an old rule of thumb that your swap partition should be twice the size of your main system RAM. This rule is nonsense. On a modern system, that's a LOT of swap, most people prefer that their systems never swap. Use what is appropriate for your needs. * Swap and /var spaces are used to store system core dumps on in the event of a crash(8). If this is a consideration for you, your swap space should be slightly larger than the amount of main memory you are likely to ever have in the system. Upon reboot, savecore(8) will attempt to save the contents of the swap partition to a file in /var/crash so again, if this is a priority for you, your /var partition must have enough free space to hold these dump files. Be realistic -- few developers will want to look at your 1GB dump file, so if you aren't planning on investigating a crash locally, this is probably not a concern. There are several reasons for using separate filesystems, instead of shoving everything into one or two filesystems: * Security: You can mark some filesystems as 'nosuid', 'nodev', 'noexec', 'readonly', etc. This is now done by the install process, in fact, if you use the above described partitions. * Stability: A user, or a misbehaved program, can fill a filesystem with garbage if they have write permissions for it. Your critical programs, which of course run on a different filesystem, do not get interrupted. * Speed: A filesystem which gets written to frequently may get somewhat fragmented. (Luckily, the ffs filesystem, what OpenBSD uses, is not prone to heavy fragmentation.) * Integrity: If one filesystem is corrupted for some reason then your other filesystems are still OK. * Size: Many machines have limits on the area of a disk where the boot ROM can load the kernel from. In some cases, this limit may be very small (504M for an older 486), in other cases, a much larger limit (for example, 2G, 8G, or 128G on i386 systems). As the kernel can end up anywhere within the root partition, the entire root partition should be within this area. For more details, see this section. A good guideline might be to keep your / partition completely below 2G, unless you know your platform (and particular machine!) can handle more (or less!) than that. Some additional thoughts on partitioning: * For your first attempt at an experimentation system, one big / partition and swap may be easiest until you know how much space you need. By doing this you will be sacrificing some of the default security features of OpenBSD that require separate filesystems for /, /tmp, /var, /usr and / home. However, you probably should not be going into production with your first OpenBSD install. * A system exposed to the Internet or other hostile forces should have a separate /var (and maybe even a separate /var/log) for logging. * A /home partition can be nice. New version of the OS? Wipe and reload everything else, leave your /home partition untouched. Remember to save a copy of your configuration files, though! * A separate partition for anything which may accumulate a large quantity of files that may need to be deleted can be faster to reformat and recreate than to delete. See the building by source FAQ for an example (/usr/obj). * If you wish to rebuild your system from source for any reason, the source will be in /usr/src. If you don't make a separate partition for /usr/src, make sure /usr has sufficient space. * A commonly forgotten fact: you do not have to allocate all space on a drive when you set the system up! Since you will now find it a challenge to buy a new drive smaller than 20G, it can make sense to leave a chunk of your drive unallocated. If you outgrow a partition, you can allocate a new partition from your unused space, duplicate your existing partition to the new partition, change /etc/fstab to point to the new partition, remount, you now have more space. * If you make your partitions too close to the minimum size required, you will probably regret it later, when it is time to upgrade your system. * If you permit users to write to /var/www (i.e., personal web pages), you might wish to put it on a separate partition, so you can use quotas to restrict the space they use, and if they fill the partition, no other parts of your system will be impacted. 4.8 - Multibooting OpenBSD/i386 Multibooting is having several operating systems on one computer, and some means of selecting the which OS is to boot. It is not a trivial task! If you don't understand what you are doing, you may end up deleting large amounts of data from your computer. New OpenBSD users are strongly encouraged to start with a blank hard drive on a dedicated machine, and then practice your desired configuration on a non-production system before attempting a multiboot configuration on a production machine. FAQ 14 has more information about the OpenBSD boot process. Here are several options to multibooting: Setting active partitions This is probably the most overlooked, and yet, sometimes the best solution for multibooting. Simply set the active partition in whatever OS you are currently using to be the one you want to boot by default when you next boot. Virtually every OS offers a program to do this; OpenBSD's is fdisk(8), similar named programs are in Windows 9x and DOS, and many other operating systems. This can be highly desirable for OSs or systems which take a long time to shut down and reboot -- you can set it and start the reboot process, then walk away, grab a cup of coffee, and come back to the system booted the way you want it -- no waiting for the Magic Moment to select the next OS. Boot floppy If you have a system that is used to boot OpenBSD infrequently (or don't wish other users of the computer to note anything has changed), consider using a boot floppy. Simply use one of the standard OpenBSD install floppies, and create an /etc/boot.conf file (yes, you will also have to create an /etc directory on the floppy) with the contents: boot hd0a:/bsd to cause the system to boot from hard drive 0, OpenBSD partition 'a', kernel file /bsd. Note you can also boot from other drives with a line like: "boot hd2a:/bsd" to boot off the third hard drive on your system. To boot from OpenBSD, slip your floppy in, reboot. To boot from the other OS, eject the floppy, reboot. In this case, the boot(8) program is loaded from the floppy, looks for and reads /etc/boot.conf. The "boot hd0a:/bsd" line instructs boot(8) where to load the kernel from -- in this case, the first HD the BIOS sees. Keep in mind, only a small file (/boot) is loaded from the floppy -- the system loads the entire kernel off the hard disk, so this only adds about five seconds to the boot process. Windows NT/2000/XP NTLDR To multiboot OpenBSD and Windows NT/2000/XP, you can use NTLDR, the boot loader that NT uses. To multi-boot with NT, you need a copy of your OpenBSD Partition Boot Record (PBR). After running installboot, you can copy it to a file using dd(1), following a process similar to: # dd if=/dev/rsd0a of=openbsd.pbr bs=512 count=1 Note: this is a really good time to remind you that blindly typing commands in you don't understand is a really bad idea. This line will not work directly on most computers. It is left to the reader to adapt it to their machine. Now boot NT and put openbsd.pbr in C:. Add a line like this to the end of C:\ BOOT.INI: c:\openbsd.pbr="OpenBSD" When you reboot, you should be able to select OpenBSD from the NT loader menu. There is much more information available about NTLDR at the NTLDR Hacking Guide. On Windows XP you can also edit the boot information using the GUI; see the XP Boot.ini HOWTO. Programs that do much of this for you are available, for example, BootPart. This program can be run from Windows NT/2000/XP, and will fetch the OpenBSD PBR, place it on your NT/2000/XP partition, and will add it to C:\BOOT.INI The OpenBSD install and upgrade process will re-install the OpenBSD boot loader, which has its location coded in the PBR, so if you re-install or update your OpenBSD installation, you need to repeat the above process to fetch a new copy of the OpenBSD PBR. Note: The Windows NT/2000/XP boot loader is only capable of booting OSs from the primary hard drive. You can not use it to load OpenBSD from the second drive on a system. Other boot loaders Some other bootloaders OpenBSD users have used successfully include GAG, OS-BS, The Ranish Partition Manager and GRUB. OpenBSD and Linux (i386) Please refer to INSTALL.linux, which gives in depth instructions on getting OpenBSD working with Linux. 4.9 - Sending your dmesg to dmesg@openbsd.org after the install Just to remind people, it's important for the OpenBSD developers to keep track of what hardware works, and what hardware doesn't work perfectly. A quote from /usr/src/etc/root/root.mail If you wish to ensure that OpenBSD runs better on your machines, please do us a favor (after you have your mail system configured!) and type something like: # dmesg | mail -s "Sony VAIO 505R laptop, apm works OK" dmesg@openbsd.org so that we can see what kinds of configurations people are running. As shown, including a bit of information about your machine in the subject or the body can help us even further. We will use this information to improve device driver support in future releases. (Please do this using the supplied GENERIC kernel, not for a custom compiled kernel, unless you're unable to boot the GENERIC kernel). The device driver information we get from this helps us fix existing drivers. Thank you! Make sure you send email from an account that is able to also receive email so developers can contact you if they have something they want you to test or change in order to get your setup working. It's not important at all to send the email from the same machine that is running OpenBSD, so if that machine is unable to receive email, just $ dmesg | mail your-account@yourmail.dom and then forward that message to dmesg@openbsd.org where your-account@yourmail.dom is your regular email account. (or transfer the dmesg output using FTP/scp/floppydisk/carrier-pigeon/...) NOTE - Please send only GENERIC kernel dmesgs. Custom kernels that have device drivers removed are not helpful. Also note that the dmesgs are received on a computer using the spamd spam rejection system. This may cause your dmesg to not be accepted by the mail servers for a period of time. Be patient, after half an hour to an hour or so, it will get through. 4.10 - Adding a file set after install "Oh no! I forgot to add a file set when I did the install!" Sometimes, you realize you really DID need comp37.tgz (or any other system component) after all, but you didn't realize this at the time you installed your system. Good news: There are two easy ways to add file sets after the initial install: Using the upgrade process Simply boot your install media (CD-ROM or Floppy), and choose Upgrade (rather than Install). When you get to the lists of file sets to install, choose the sets you neglected to install first time around, select your source, and let it install them for you. Using tar(1) The install file sets are simply compressed tar files, and you can expand them manually from the root of the filesystem: # cd / # tar xzvpf comp37.tgz Do NOT forget the 'p' option in the above command in order to restore the file permissions properly! One common mistake is to think you can use pkg_add(1) to add a missing file sets. This does not work. pkg_add(1) is for package files, not generic tar files like the install sets. 4.11 - What is 'bsd.rd'? bsd.rd is a "RAM Disk" kernel. This file can be very useful; many developers are careful to keep it on the root of their system at all times. Calling it a "RAM Disk kernel" describes the root filesystem of the kernel -- rather than being a physical drive, the utilities available after the boot of bsd.rd are stored in the kernel, and are run from a RAM-based filesystem. bsd.rd also includes a healthy set of utilities to allow you to do system maintenance and installation. On some platforms, bsd.rd is actually the preferred installation technique -- you place this kernel on an existing filesystem, boot it, and run the install from it. On most platforms, if you have a running older version of OpenBSD, you can FTP a new version of bsd.rd, reboot from it, and install a new version of OpenBSD without using any removable media at all. Here is an example of booting bsd.rd on an i386 system: Using Drive: 0 Partition: 3 reading boot..... probing: pc0 com0 com1 apm mem[639k 255M a20=on] disk: fd0 hd0+ >> OpenBSD/i386 BOOT 2.02 boot> boot hd0a:/bsd.rd . . . normal boot to install . . . As indicated, you will be brought to the install program, but you can also drop to the shell to do maintenance on your system. The general rule on booting bsd.rd is to change your boot kernel from /bsd to bsd.rd through whatever means used on your platform. 4.12 - Common installation problems 4.12.1 - My Compaq only recognizes 16M RAM Some Compaq systems have an issue where the full system RAM is not detected by the OpenBSD second stage boot loader properly, and only 16M may be detected and used by OpenBSD. This can be corrected either by creating/editing /etc/ boot.conf file, or by entering commands at the "boot>" prompt before OpenBSD loads. If you had a machine with 64M RAM, but OpenBSD was only detecting the first 16M, the command you would use would be: machine mem +0x3000000@0x1000000 to add 48M (0x3000000) after the first 16M (0x1000000). Typically, if you had a machine with this problem, you would enter the above command first at the install floppy/CD-ROM's boot> prompt, load the system, reboot, and create an / etc/boot.conf file with the above line in it so all future bootings will recognize all available RAM. It has also been reported that a ROM update will fix this on some systems. 4.12.2 - My i386 won't boot after install Your install seemed to go fine, but on first boot, you see no sign of OpenBSD attempting to boot. There are a few common reasons for this problem: * No partition was flagged active in fdisk(8). To fix this, reboot the machine using the boot floppy or media, and "flag" a partition as "active" (bootable). See here and here * No valid boot loader was ever put on the disk. If you answer "Y" to the "Use entire disk for OpenBSD?" question during the install, or use the "reinit" option of fdisk(8), the OpenBSD boot record is installed on the Master Boot Record of the disk; otherwise, the existing master boot code is untouched. This will be a problem if no other boot record existed. One solution is to boot the install media again, drop to the shell and invoke fdisk(8) to update the MBR code from the command line: # fdisk -u wd0 Note: the "update" option within the interactive ("-e") mode of fdisk will not write the signature bytes required to make the disk bootable. * In some rare occasions, something may go wrong with the second stage boot loader install. Reinstalling the second stage boot loader is discussed here. 4.12.3 - My (older, slower) machine booted, but hung at the ssh-keygen steps It is very likely your machine is running fine, just taking a while to do the ssh key generation process. A SPARCStation2 or a Macintosh Quadra may take 45 minutes or more to complete the three ssh-keygen(1) steps, some machines will take even longer. Just let it finish; it is only done once per install. 4.12.4 - I got the message "Failed to change directory" when doing an install When doing an FTP install of a snapshot during the -beta stage of the OpenBSD development cycle, you may see this: Do you want to see a list of potential FTP servers? [yes] Enter Getting the list from 192.128.5.191 (ftp.openbsd.org)... FAILED Failed to change directory. Server IP address or hostname? This is normal and expected behavior during this pre-release part of the cycle. The install program looks for the FTP list on the primary FTP server in a directory that won't be available until the release date, so you get the above message. Simply use the FTP mirror list to find your favorite FTP mirror, and manually enter its name when prompted. Note: You should not see this if you are installing -release or from CD-ROM. 4.12.5 - When I login, I get "login_krb4-or-pwd: Exec format error" Kerberos IV has been removed from OpenBSD 3.4, but if you did an upgrade, the old Kerberos IV binaries still will be on your system. This is a problem on the i386 platform, as the old Kerberos files are in a.out, format and thus unable to run on the standard ELF kernel (which has a.out emulations disabled, as mentioned here). If you have encountered this problem, you need to override the krb4 authentication method when you log in: OpenBSD/i386 (puffy.openbsd.org) (ttyC0) login: joeuser:passwd password: You can use the same "username:passwd" syntax with an ssh connection and with su(1) to access your system. Now edit /etc/login.conf, and remove the krb4 references. 4.12.6 - My fdisk partition table is trashed or blank! Occasionally, a user will find a system will work, but when doing an fdisk wd0, they see a completely blank (or sometimes, garbage) partition table. This is usually caused by having created a partition in fdisk(8) which had an offset of zero sectors, rather than the one track offset it should have (note: this is assuming the i386 or amd64 platform. Other platforms have different offset requirements, some need NO offset). The system then boots using the PBR, not using the MBR. While this configuration can work, it can be a maintenance problem and should be fixed. To fix this, the disk's file systems must generally be recreated from scratch (though if you REALLY know what you are doing, you may be able to recreate just your disklabel and MBR, and only lose and have to rebuild the first OpenBSD partition on the disk). 4.13 - Customizing the install process siteXX.tgz file The OpenBSD install/upgrade scripts allow the selection of a user-created set called "siteXX.tgz", where XX is the release version (e.g. 37). The siteXX.tgz file set is, like the other file sets, a gzip(1) compressed tar(1) archive rooted in '/' and is un-tarred like the other sets with the options xzpf. This set will be installed last, after all other file sets. This file set allows the user to add to and/or override the files installed in the 'normal' sets and thus customize the installation or upgrade. Some example uses of a siteXX.tgz file: * Create a siteXX.tgz file that contains all the file changes you made since first installing OpenBSD. Then, if you have to re-create the system you simply select siteXX.tgz during the re-install and all of your changes are replicated on the new system. * Create a series of machine specific directories that each contain a siteXX.tgz file that contains files specific to those machine types. Installation of machines (e.g. boxes with different graphics cards) of a particular category can be completed by selecting the appropriate siteXX.tgz file. * Put the files you routinely customize in a same or similar way in a siteXX.tgz file -- /etc/skel f