WWWsmith: Installation and Configuration of FreeBSD
FreeBSD is a popular (and free) Unix-like operating system, available from the Internet and on CD-ROM (chiefly from Walnut Creek CD-ROM). In this respect, it shares much with Linux, which is admittedly more popular and better documented.
Unlike Linux, FreeBSD is (as the name implies) derived from the popular BSD variant of Unix; many features considered standard with Unix these days originated at the University of California, Berkeley. These features include (among others) networking and long file names; the networking code, in particular, is mature and high performance. (One of the busiest sites on the Internet is http://wcarchive.cdrom.com/, aka ftp://ftp.cdrom.com/ aka ftp://ftp.freebsd.org/ aka http://www.freebsd.org/; it runs FreeBSD and pumps out data at an average of more than 2.5MB per second, every second of every day.)
In this article, I will describe the process of installing FreeBSD on a LAN, and configuring it to work as a web server, all using free software. Although Unix is not traditionally a user-friendly operating system, FreeBSD does have a usable installation process (provided you read the documentation and have a rough idea what you are doing) and requires very little maintenance.
Before installing FreeBSD, you need to be prepared. First, you need to know how you will choose to install the system: via CD-ROM, NFS or FTP. CD-ROM installs are the easiest and fastest; FTP is the most commonly-used. This requires that the computer you are installing on have access to the Internet (either via LAN or PPP/SLIP).
FreeBSD needs at least an 80386-level processor, with at least 4MB of RAM and about 150MB of disk space. Note that FreeBSD currently requires at least 5MB of RAM for installation—but can get by with 4MB post-install. Most popular disk controllers are supported, including (E)IDE and several SCSI controllers. The machine I am using is a 33MHz 80486, with 16MB of RAM and a 202MB IDE drive. It also has an UltraStor 34f VLB SCSI controller with a CD-ROM drive attached, and a Novell NE2000+ Ethernet card, configured at IRQ 5 and 0x280.
For PCI systems, almost any DEC 21x40 and 21x41-based Ethernet card will suffice, and both the Adaptec and NCR SCSI controllers are well-supported. The NCR is considerably cheaper and is well-suited to low-load systems. There is some debate as to whether the new versions of Adaptec's SCSI cards are worth the money for high-end systems, due to recent changes Adaptec has made. There is also new support for DPT SCSI cards, including their RAID controller, which may be desirable in some circumstances.
Some IDE CD-ROM drives, and proprietary CD-ROM interfaces, are also supported. The support for those is not as good as for the SCSI. This is true because while a SCSI driver may be quite complex, the command set is very standard, which is not yet the case for IDE CD-ROM drives.
You will also need a boot floppy. The boot image is available at ftp://ftp.freebsd.org/pub/FreeBSD/<release>/floppies/boot.flp and on the CD-ROM as /floppies/boot.flp. The release I used was 3.0-970522-SNAP. If you are creating the boot floppy under a Unix-like system, you would use dd to create the image. For example, under FreeBSD, type:
dd if=boot.flp of=/dev/rfd0a bs=18k
A similar command is used on other Unix systems. If you are creating the floppy under MS-DOS, you will need the rawrite.exe file, which is located in .../tools/rawrite.exe on both the FTP site and CD-ROM. Create the floppy by typing:
.. ools\rawrite boot.flp a:I installed the 3.0-SNAP release, which is available on CD-ROM; it is essentially a development snapshot, and hence isn't as stable or mature as the other releases.
Before beginning the installation, at least read the release notes. The recommended files to read are INSTALL.TXT, README.TXT and RELNOTES.TXT, all in the release's root directory.
Write down hardware information, such as the disk geometry (heads, sectors, and cylinders)—although this is not truly necessary, it can be useful. Also the configuration of any ISA cards, such as SCSI and Ethernet. Last, since the machine is going to be on a LAN, you should write down the host name, domain name, IP address, default router IP address and name server (DNS) IP address; this will save you a lot of frantic searching later. Note that if you are doing an FTP or NFS install, you need the same information.
Installation is begun in the same way as any other equivalent system: put the boot floppy or CD-ROM in the drive. Press enter at the Boot: prompt; if you don't type anything, it will time out and boot automatically.
First a scrollable menu is presented to let you decide whether or not to configure the kernel. You can choose to skip the configuration step, or you can enter either a visual or line-oriented configuration program. (I recommend the visual mode, of course.)
The kernel configuration process allows you to disable or reconfigure most device drivers; this is invaluable if you have a device card that is configured slightly different from what FreeBSD has been told to expect. Some devices require destructive probes (meaning that probing for one may confuse or disable another device); if you know which devices are not in your system and disable all of those, probes will be less of a concern. Please note that PCI devices are not, currently, configurable—since they are configured on the fly, there is no conflict, and do not need to be re-configured or deleted.
In my case, I disabled all of the mass-storage devices that I did not have, including the Adaptec 154x driver and the second Western Digital controller. The Western Digital driver, wdc, controls (E)IDE, ESDI, MFM and RLL hard disk drives. The probe sequence for one of these controllers takes a considerable amount of time, so disabling the second one, _wdc1_, speeds up the boot process measurably.
The visual configuration process is fairly self-explanatory and takes only a few seconds to go through. However, it is not, in most cases, truly necessary. An example of when it would be necessary: if my Ethernet card had not been configured at IRQ 5, I/O port 0x280, memory address 0x0d8000, I would need to either reconfigure the card or change what the FreeBSD kernel expected. If you accidently delete a driver, you can reconfigure it by switching to the “Inactive Drivers” section by pressing tab and pressing enter to re-enable it.
After you've finished the kernel configuration, press Q, answer the question that appears and watch the system boot. On a slow system, you can watch the kernel messages being issued and ensure that all of the desired devices have been found. Or, you can press the scroll-lock key when they begin to scroll, and when the kernel is done probing, you will be able to scroll the display up and down using the arrow keys and page up/page down.
You will now be presented with a text menu (in color, if you are on a color CGA or VGA monitor). (See Figure 1.)
|Non-Linux FOSS: libnotify, OS X Style||Jun 18, 2013|
|Containers—Not Virtual Machines—Are the Future Cloud||Jun 17, 2013|
|Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer||Jun 12, 2013|
|Weechat, Irssi's Little Brother||Jun 11, 2013|
|One Tail Just Isn't Enough||Jun 07, 2013|
|Introduction to MapReduce with Hadoop on Linux||Jun 05, 2013|
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Linux Systems Administrator
- Introduction to MapReduce with Hadoop on Linux
- RSS Feeds
- New Products
- Weechat, Irssi's Little Brother
- Validate an E-Mail Address with PHP, the Right Way
- Tech Tip: Really Simple HTTP Server with Python
- Poul-Henning Kamp: welcome to
11 min 8 sec ago
- This has already been done
12 min 8 sec ago
- Reply to comment | Linux Journal
57 min 22 sec ago
- Welcome to 1998
1 hour 45 min ago
- notifier shortcomings
2 hours 9 min ago
3 hours 46 min ago
- Android User
3 hours 48 min ago
- Reply to comment | Linux Journal
5 hours 41 min ago
8 hours 30 min ago
- This is a good post. This
13 hours 43 min ago
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?