Basic FreeBSD Installation Walkthrough

Posted by theBlatherskite Tue, 10 Oct 2006 02:03:00 GMT

I recently had to install FreeBSD on an older computer that had been reconditioned as a server. This entry walks through the basics of the installation (for a more detailed walkthrough, or more information about any specific step, refer to the FreeBSD documentation manual’s installation section.

Pre-Installation

The first step is the burn the ISOs (CD images) appropriate to your hardware from here (if you’re not on a Mac, and you don’t know any better, then you most likely want I386). Download the most current version (as of this writing, FreeBSD 6.1), and burn the ISOs to disc.

Put the first CD into the optical drive on the where you want to install FreeBSD, and boot from CD. A bunch of text scrolls by – we’ll use this later, but it’s of no concern for now (i.e. “this is a Good Thing”).

Installation

The installation should begin by asking you to select your country (US is 226), then plunk you down in the main sysinstall menu. The little blurb at the top of the page tells you how to navigate around the text-based windows of the installer (basically, arrow up and down, press tab to move the cursor to the “buttons” at the bottom of the screen (on this page, ‘Select’ and ‘Exit Install’)). Select a standard installation (note for the future that you can always get back to this program by running /usr/sbin/sysinstall).

The next step is partitioning the hard drive (splitting a single physical drive into a number of different logical drives, or partitions, which are each treated as a separate drive by the operating system). In my case, I’m wiping out all the old files on the machine and going with a clean install, so I pressed ‘A’ for ‘Use Entire Disk’, then ‘Q’ to finish.

The next prompt is to select a boot manager. If you plan to install multiple operating systems on a computer, a boot manager will let you select which OS you want to start when you turn the computer on. Since I’ll only be using FreeBSD, I chose Standard.

FreeBSD will be installed on the partition selected earlier, but the operating system creates further logical slices (unfortunately also labeled partitions) within this larger partition (more information about disk organization and formatting is available from the FreeBSD website). ‘A’ asks FreeBSD to autocreate the structure it thinks would work best, given your hardware configuration (mainly RAM and hard disk size).

Now we’re putting BSD partitions within the disk partition we set aside for FreeBSD earlier. As before, ‘A’ autoselects, which is usually sufficient. (I’m in a kinda unique position here as my reconditioned server has a 9 GB hard drive, but a full 2 GB of RAM – and by default FreeBSD doubles the RAM size to determine the size of the swap space. I’m sure that’s a good idea in general, and I may suffer some big performance hit by not abiding by this convention, but given my disk space needs this was just unworkable. I pressed ‘A’ to get the defaults, then deleted the /var, /usr, and /swap partitions, using ‘c’ to recreate them with custom sizes. This results in a really strange error – if you try to use all remaining space for the final partition, you get an error saying ‘Unable to create partition (too big?)’… which apparently means there’s wasted space on the drive. Weird! Usually, though, default is fine.)

Select the type of install you want. Since I’ll be running my machine headless (with no monitor), I don’t need any graphical programs – and thus I chose User. If you want graphics, you’ll probably want to select X-User. The different options are just different pre-configured bundles of programs, which allows for a macro-level of personalization for different uses of the operating system. If you select User, but want to add graphical programs later, you can always install the X-Windows system and any other ports/packages at a later date (i.e., don’t worry too much, because you can always change this later).

Ports. Installing the ports tree takes up 440 megs in /usr/ports when installed, but it is a key of the FreeBSD experience. (FreeBSD lets you install any program in the ports tree (there are currently 15883 of them) by

cd
ing to that program’s directory in the ports tree, and typing
make install
– see installing on FreeBSD article). Say “yes” unless you’ve got serious disk space issues.

Select installation media (usually 1 for CD) and sit back to wait for a bit – this is a good “cup of coffee” type break.

Post-Installation Configuration

Congratulations! Once this step completes, we’re pretty much done with the installation per se. Now there’s a little bit of basic configuration to step through, and we’ll be running our brand new FreeBSD system.

Below I list the questions that are asked by the installer, and the responses that made sense in my particular case. These are probably reasonable defaults, but your system may require a different selection in each case.

  • If you’re on a network, select Yes to Ethernet and select your Ethernet card.
  • IP6 - No
  • DHCP - Yes
  • Assign your IP address, subnet, default gateway, etc (will try to autofill if you selected Yes to DHCP on the last screen)
  • Network gateway - No
  • inetd - No
  • SSH - Yes
  • FTP - No
  • NFS server - No
  • NFS client - No
  • System console - No
  • Time – Yes
  • Local/UTC time – No
  • Go ahead and set your time (region, etc)
  • Linux binary – Yes
  • Mouse – Yes (if you’re using a PS2 or Serial mouse)
  • Enable/OK
  • No need to browse for now – we’ll deal with adding new programs later (one we’ve verified the install completed successfully).
  • Add user - Yes
  • Add a user – for security and safety reasons, it’s a Bad Idea to be logged in as root whenever you’re not doing system configuration.
  • Set a root password. Make it strong!
  • Last minute changes – No

Whew! We’re finally plunked back to the main sysinstall menu. Tab to the bottom and select Exit Install. Select Yes to reboot. After it reboots, but before it loads, remove the CD.

If it boots into FreeBSD, we’re in business!

Are We Running, Yet?

The first time it boots, it’ll ask you to type in a bunch of random characters generate encryption keys

  • Login:
    • Login name of user
    • User’s password

  • Commands
    • su
    • shutdown –h now


    Our job here is done

    [Note: you can now continue on to read about configuring and customizing your new install].

Posted in  | Tags , , , ,  | no comments | no trackbacks

Comments

Trackbacks

Use the following link to trackback from your own site:
http://www.theblatherskite.com/trackbacks?article_id=basic-freebsd-installation-walkthrough&day=09&month=10&year=2006

(leave url/email »)

   Comment Markup Help Preview comment