bumbler
November 21st, 2003, 00:28
I realize this isn't proper BSD doctrine, but I'm trying to pave a route for the clueless to get in the door and discover how sweet it is. So check for accuracy only, please.
-----------------------------------------------------------
Desktop FreeBSD Part 1: Installation
Ed Hurst 19 November 2003

================================================== ======================

*Sysinstall: The FreeBSD Installer*


Assumptions

- You are running a stand-alone machine

- You are the only user

- You intend to use this machine as a working desktop computer

- You connect to the Internet via dialup

Pay attention! Read everything! Remember that hitting the TAB key will jump between the list and buttons at the bottom of the page. The arrow keys work within lists, the SPACE bar selects an option if there is a check box, and PGDN and PGUP do just that within lists, too. Read this through once at least before you try the installation. What follows here is a reflection of my experience with FreeBSD 4.9, and there's no guarantee your attempt will happen in precisely this way. Thus, you really should read the official installation instructions at the FreeBSD.org website for whatever version you are installing. It's likely some of it will be over your head, and the sequence of steps may not reflect quite what you find when you boot from the CD. Still, at a minimum you will see pictures of what the various screens look like. I won't provide an exact link here because you really must learn to navigate that site even if you plan only casual use of FreeBSD.

------------------------------------------------------------------------

Upon booting, you will see the usual hardware scan. If all is well, it will present you with a kernel options page. While it is unlikely that you will know what to do, it won't hurt to see what's going on.

1. Options for the kernel -- chose "visual" (2nd option)

Take a look at the list, paying attention to the on-screen
instructions. It tells you how to expand and collapse the lists. According the FreeBSD Handbook, this is the place to settle driver conflicts, if you happen to understand what's involved. It's quite unlikely anything here will be unworkable for you, so you can exit.

Next, you'll see the Sysinstall menu. You will want to choose the "Standard" option.

2. Setting up your hard drive -- if you have more than one hard drive, you will have to select which one you are going to use for FreeBSD. If you don't understand the jargon of disk identification, just notice this pattern: two or three letters and a number. Computers start numbering at zero, not at one. "0" is the first, "1" is the second, etc.

ad0 = ATAPI Drive = IDE/EIDE hard drive, the most common type.

da0 = SCSI Drive = Not many computers you buy for home use have these.

Choose the drive for this installation and go to the next screen for setting up the file system on that drive. The simplest is to use the whole drive for FreeBSD, without complicated partitioning. So here we choose option "A" for All of the drive for FreeBSD. At the next screen, again choose the "A" option for Automatic partitioning. Note that BSD uses the Unix file system, which refers to "slices" rather than partitions. The automatic setup is quite unlikely to bring you problems. Press "Q" to save and move to the next screen.

Boot options: Still a part of the hard drive setup, you will probably want to choose the "BootMgr" for maximum flexibility later. If you have other hard drives in your box, you'll be returned to the page for selecting which one to configure. Tab to "Cancel" to leave this screen.

3. Distribution -- we will want the most useful option, which is to select "All" at this point, unless you have a serious problem with hard drive space. For the most part, the options are self-explanatory, and it's easy to make adjustments later. The next immediate screen asks if you want the Ports Collection installed; select "Yes" because you'll need this later. As with most screens, TAB to the "OK" button and ENTER. You'll come back to the Distributions screen; choose "Exit" to move on.

4. Source for the installation -- since we booted from the CD/DVD-ROM drive, that is your obvious choice. If like me you have both a DVD-ROM and a CD-RW, it's best to install from the DVD reader. Ideally that one is connected as the first (master) drive on the second IDE socket of your motherboard. If you have issues booting from a CD, you'll need to read that portion on the installation instructions found at FreeBSD.org. There you will find a page on making a boot floppy, and for using various other methods. Very few modern machines won't boot from a CD drive, though you'll probably need to play with BIOS settings. If you don't know what that means, learn about that before doing anything to your computer.

5. LAST CHANCE -- The next screen tells you that this is your last chance to back out. If up to this point you are still uncertain, you should start over. "Third try is charmed" is true, though it says more about human nature and learning than it does about Fate, so don't be afraid to run through a couple of failed installs before you get it right. It was my own third try with FreeBSD that saw an easy time installing. Take the "Yes" answer when you are ready.

You will see the following information flash on the screen:

- Making the file system on your hard drive

- Installing basic OS files

- Individual packages that you selected (the default set here)

- Setting up the other slices

Finally, you will see a screen that congratulates you on a successful installation. If not, there are problems and you need to get help. Write down word for word whatever messages you get that indicate what the problem is. There are very few genuine newbie forums, but if you know how to use Google and other search engines, you'll probably find what you need. Search terms will of course include "freebsd install" and whatever particular keywords you can associate with your specific case, such as hardware parts names.

If you have no problems, you are now running FreeBSD.

6. Modem setup -- Usually this means selecting the "ppp0" option for this purpose. You must know where your hardware believes the modem is, probably one of four "COMM" ports, to use the common term. As before, the first in the list is 0, the second is 1, etc. What most of the world calls COMM1 is cuaa0 in BSD, COMM2 is cuaa1, and so on. If you don't know, FreeBSD won't do it for you.

You won't need to worry about the next two screens, IPv6 and DHCP, so answer "No" to both.

7. Network setup -- There are only a couple of boxes you need to worry about filling in at this point.

Host: Every machine on any standard network has it's own name. This name takes three parts, each separated by a dot or period. The first name is anything you choose, but I recommend keeping it short. This will become obvious why later. I've seen things like yoda, shad, bite, and whit. Four characters is a good idea; pick anything from the dictionary or make up your own. The second part of the name indicates the name of the network. Yours should say "local" because your machine only talks to itself. The obvious exception is via the dialup connection to the Internet, when your ISP will provide a cover name for you, regardless of what your machine is called. The last part of the name is the stuff you see on most Internet addresses: .com, .org, .biz, etc. Yours is self-contained, and .bsd is highly recommended, since it won't confuse things with your ISP. For now, the .bsd ending isn't used on the official Internet, so your ISP won't have to worry about anyone looking for that address. Here's what it will look like:

name.local.bsd

with "name" substituted by your choice.

Domain: This should end up with the "local.bsd" part automatically once you type in the first field. If not, type it manually.

You are now finished with this page, so tab to "Done" and hit ENTER. You have no reason to bring up the interface, so on the next page choose "No". There are several more option screens listed with my recommendations:

- Gateway: choose "No"

- Inetd: choose "No"

- Anonymous ftp: choose "No"

- NFS: choose "No"

- Security Profile: "moderate" is just fine, so choose the "medium" option

You will be greeted with a warning about securing your system from outside attacks, which serves nicely as a hint that you have to setup your firewall before connecting to the Internet. We'll deal with that later.

8. Console settings -- unless you have a compelling reason to operate a lot in the console (without a GUI), this isn't worth much of your time. We will be learning about the console just enough to avoid being there long. This is for the desktop, remember? Take the defaults, unless you need to change the language settings or something. By the way, the "screensaver" option here applies only to the console.

9. Time zone -- most machines are set to local time, so don't select to base your system on UTC. Next, select your region, country and specific Time Zone. There are enough options in this last to cover just about every square inch of the world, so be patient and search.

10. Linux compatibility -- Select "Yes" here because too often the most recent version of something you want to use won't be available in native FreeBSD format. That is, unless you are constantly upgrading and updating your system. With a dialup connection, this can be a big hassle. This is especially the case if you like Mozilla. Every release has had some major improvement so far, and I usually have needed/wanted that additional function. I haven't found where anybody is providing these larger applications for FreeBSD with any sort of backward compatibility. Even if you are willing to compile yourself a native version of those larger applications, you still need Linux compatibility sooner or later.

11. Mouse options -- This question is sort of backwards, in that it's asked in the negative. I have a USB mouse, so the answer was "No." Otherwise, there is nothing here to setup, since it applies only the console mouse.

12. Setting up the X server -- DO NOT USE THE GRAPHICAL TOOL! It is guaranteed to crash and lock up your system. This is not the fault of anybody at FreeBSD, since it comes with the XFree86 package. Your best bet is the 4th option, "xf86config." Since this whole thing is adequately covered elsewhere on the Internet, if you need more details, you'll have to hunt them down. For FreeBSD, the main thing to know is that you do NOT want to setup the mouse for the console, but to set it up with X. The console driver conflicts with the GUI in most cases, so skip that part here. If you have a good XF86Config from Linux, you'll need to change a few things before dropping it into FreeBSD, so it's better to run the utility here, then cut and splice appropriate sections later.

Next, the screen goes black. Read the messages completely, and twice is a good idea. You cannot afford to hurry here. Most of the time the default choice will get things working if you haven't a clue. The best setting for the mouse type here is "Auto." Choose the default name for it on the next screen. Then select the nearest thing to your keyboard, most likely PC-104. Choose your country code and the variant, if necessary. For the most part, you won't need any options on the next screen.

Read the next screen carefully. For your monitor, you need only know what it can do. If you don't have the specs, take the safe settings. These days the XFree86 software does a really good job with this part.

For the graphics card, a similar warning is worth reading carefully twice. Type "y" and ENTER. If you know what brand your card is, and there is a matching generic driver at the top part of the list, choose that one. My GeForce3 works just fine with the generic "nv" driver. The display modes are usually pretty good by default. Change them if you wish, just pay close attention to the instructions. If you have powersaver available, as most cards do these days, we'll add that later.

The last thing you see in this section is the question, "Shall I write?" Unless you messed it up, type "y" and ENTER. If you make a mistake during this script, you'll have to start all over.

13. Default desktop -- I won't get into the desktop wars here. I like KDE, but it has a few incompatibilities with FreeBSD, and is a resource hog. Gnome 2, far more pleasing to my eyes, crashes on FreeBSD as bad it does anywhere else, which I find to be quite often. If you have no opinion, I find KDE a safer as a starting place. It has the easiest route to getting your dialup going, because it has a built-in PPP dialer. If you aren't afraid to face the complexity of FreeBSD's user dialup scripts, then it won't matter much. I personally use IceWM, but that requires more work to get it like I want it. If you have an older machine with lower power, I recommend WindowMaker.

The next screen will allow you watch the progress of packages being installed the match your choice.

14. Package choices -- Here's your chance to add from the collection of binary packages already on the install disk. The quickest way to see them all is the choose the "All" listing. Here's my suggestion for the common desktop user:

- acroread

- aspell

- bash (especially for the newbie)

- bitstream vera fonts

- cdrtools (unless you don't have a CD-RW)

- fetchmail

- ghostscript-gnu

- ghostview

- gtk2 and gtk2-engines

- imlib

- lynx

- pine

- postfix (easier to work with than sendmail)

- sudo

- unzip

- xscreensaver or xscreensaver-gnome

If there is an "X" in the box in front of anything, it has already been chosen for installation. Tab to the "OK" and ENTER. If you select "Install" you'll be presented with the list of packages you've chosen. The next screen shows the progress of installation.

15. User account -- If you don't create a user account, you had better not ever connect to the Internet. That's the mantra from everyone in the FOSS community, and I won't repeat the whole spiel here. We choose yes to this option. Next screen, select "Add user." The next page has blocks to entries.

Login name: Keep it simple. Long cutesy names can present problems later when you need to work in a terminal or from the console. Three or four initials or something short and simple will be fine.

UID: Don't touch this. The system handles it fine.

Group: Leave for the defaults.

Password: I can only echo the good advice of Jon "maddog" Hall here. The best passwords have at least 8 characters, and is based on something you'll remember, but isn't easy to guess. Jon used the example of the phrase, "Ladies and Gentlemen, Elvis has left the building." He then takes the first letter of each word, upper or lower case as is proper, and inserts the punctuation, too. Then, when it's time to enter your password, you need only recite the phrase and type accordingly:

L&G,Ehltb.

Notice that "and" is replaced with an ampersand (&). I prefer to use favorite songs. Since I am a church music director, I would obviously use hymns. One of my past choices is the song "God Is in Control" which give us this:

Giictrl!

You can replace letters with numbers that are similar (o=0, a=4, e=3, etc.). Throwing in punctuation is a good idea, of course.

Full name: Whatever you want to use.

Member groups: Type in the word "wheel" which allows your user account to act briefly as root for administrative tasks. Without this, the "su" command won't work.

Home dir: Let the system choose the default.

Login shell: Unless you have a favorite, I'm going to recommend bash, so type in

/usr/local/bin/bash

Tab to "OK" to exit the screen. Unless you have more users to setup, choose "Exit" and tab to "OK" for the next step.

16. Root password -- The same rule applies here as for user passwords. You'll need to be able to type it the same twice. Memorize the phrase and pay attention to how you type in each character. After about a half-dozen times, most folks have it nailed down.

17. Revise options -- It's not likely, but here's your chance. At the next screen, choose "Exit install".

Now the system will reboot. This is a good time to catch the BIOS setup and return to booting from the hard drive, and removing the CD from the drive. You will see the usual boot messages. Unless things hang somewhere, you are on your way.

In our next installment, we'll cover post-install setup.

Kernel_Killer
November 21st, 2003, 01:47
Great stuff bumbler!!!

Now for the opinions.

1. I was a bit troubled about the partitioning. I see this in various how-tos. They will usually show a way to partition with the whole disk, or with a dual-boot setup. Some tips on manually making slices, and partitioning the slice would be a great addition. Even adding the way that the slices are put in order (1a, 1b, 1c, 2a, 2b, etc, etc.)

2. Although braodband is not exactly plentiful across the world, it could be quite informative to add instructions for the FTP install, and "Passive FTP" install.

3. Don't get me wrong, xf86config is a great app to configure X, but wouldn't xf86cfg -textmode be a good one for the first time users? Also, you might think of a couple configurations for a small handful of mice that even require the daemon.

Ok. On to the praises. The way that you wrote the entire document is exactly what you were aiming for, and did a great job doing it! It's really straight forward, and gets to the point without the technical jargon that makes a lot of first-timers say "Huh?" A lot of topics were covered just right, and instructing NOT to use the xf86cfg without -textmode was a great idea! Most people seem to suggest using such a thing for new users, but don't realize that half the time it won't work, or that it can cause some bigger problems making the install fail in the end.

Overall, great doc!

bumbler
November 21st, 2003, 13:34
1. I am hesitant at this level to include anything that can't be done automatically. Thus, my choice about the partitioning. I doubt the ordinary user will grasp it this soon, and it would add a LOT of text to explain.

2. I've never done an FTP install, and don't plan to, unless broad-band is ever made available where I live. The liklihood is about zero for my lifetime. The deer outnumber the humans in my county. The majority of the world still connects via dialup, so it's just a mass-marketing, lowest common denominator choice.

3. I've never tried it. I'm very comfortable with the route I chose, and can explain it easily, having done it since RH 5.1 was new. I've never used any mice that worked with the daemon in X, not since the later X 3.x series -- simple case of my own ignorance.

Thanks for the pointers, because I have to admit gaps in my knowledge. I only know what I've done, and can only teach what I know. I really dislike doing installs, so I am not likely to do enough of them to become really knowledgeable. I only have one machine. My vision is to get as many in the door as possible, the best way I know how.

This tutorial is Open Source like anything else. Take it and re-write it, if you like -- go me one better. My only request is a simple mention as co-author, unless you change it greatly.

More to come....

bumbler

bumbler
November 22nd, 2003, 20:15
12. Setting up the X server -- DO NOT USE THE GRAPHICAL TOOL! It is
guaranteed to crash and lock up your system. This is not the fault of
anybody at FreeBSD, since it comes with the XFree86 package. Your best
bet is the 3rd option, "xf86cfg -textmode". Since this whole thing is
adequately covered elsewhere on the Internet, if you need more details,
you'll have to hunt them down. If you have a good XF86Config from
Linux, you'll need to change a few things before dropping it into
FreeBSD, so it's better to run the utility here, then cut and splice
appropriate sections later.

This text-mode version is really quite simple, and explains itself very
well. You have the main menu with various options and menus under each
item on the list. Visit each one, and be sure you are happy with the
setttings. Simply go down the list, and if you really don't know about
something, the safe route is to accept the default answer -- that is,
the answer offered by the program. On the graphics card, be sure to
look the whole list over before choosing. You'd be surprised by the
names sometimes chosen by the folks who write the XFree86 and the
drivers.

You need to know precisely what the specs for your monitor are. That
is, you need to know the upper and lower limit of the horizontal and
vertical display frequencies. Be sure of this information; don't guess.
This is the one place where software can easily damage your hardware.
It is usually possible to find the information you want by visiting the
website for the manufacturer of your monitor. The other item is to know
what sort of screen resolution you want. If you have a really good card
and large or high-quality monitor, getting a fancy 1600x1200 display
might work, but there's not much point if you have only a 17" monitor.
Here's the usual advice:

16" or smaller: 800x640
17" or larger: 1024x860
19" or larger: 1200x1024

You can guess the rest for yourself. As for color depth, very few people
need more than 16-bit color. Not many folks can tell the difference, and
a few applications simply will not work in 24-bit mode. Using less is
not often necessary anymore, unless you have really old hardware.

When you are finished, let the script write the file. If you want, you
can go back later and hand edit the file. I like to go and cut out every
line that has a hash-mark (#) in front of it, because it makes the file
smaller, still has everthing the X-server needs to know, and allows it
to load just a bit faster.

bsdjunkie
November 22nd, 2003, 21:24
12. Setting up the X server -- DO NOT USE THE GRAPHICAL TOOL! It is
guaranteed to crash and lock up your system. This is not the fault of
anybody at FreeBSD, since it comes with the XFree86 package. Your best
bet is the 3rd option, "xf86cfg -textmode".

I setup FBSD the other day and used the GUI config. Everything worked great. I think this has more to do with your specific hardware not working with it.
Most cases, it should work fine for people,

bumbler
November 22nd, 2003, 23:33
You might be right. However, every self-proclaimed expert of BSD says "don't do it!" On my last machine, it most certainly locked up, and caused major damage to the file system, and required a hard reset -- no keyboard, nothing. Maybe the folks at XFree86 are starting to tame this beast.

Anyway, I find the textmode just too fast and easy, and it works even better than I expected.

bumbler