Page 1 of 1

Introduction to BSD systems This tutorial will introduce the reader to the BSD family of systems. Rate Topic: -----

#1 g-weebens   User is offline

  • New D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 39
  • Joined: 28-December 10

Posted 13 January 2011 - 11:43 PM

I) Introduction.
Many of you on these forums are familiar with Linux either through the publicity that Ubuntu has brought it, Google's use of the system in Android, or from older embedded devices. The various distributions have two important parts: the kernel and the GNU compiler collection. Of course, it is known that Torvalds was influenced- Before the old argument comes up, Linux Torvalds did not plagiarize anything- by the Minix design; yet, where did the influence for GCC come? Richard Stallman created the compiler collection by reverse engineering the C compiler which was part of UC Berkeley's version of AT&T's UNIX.
In the following tutorial, the reader will be introduced to a basic install of the FreeBSD operating system. As posts are added to the thread, so will installation instructions and hints for NetBSD and OpenBSD. Four architectures will be covered, those being: AMD64, i386, PowerPC 32bit, and UltraSPARC/SPARC64.Let us begin, shall we?

II) The Installation Process.
In order to start the installation, you will need the following information:
1) The processor type of the machine you are using.
2) The amount of RAM.
3) The video card type.
4) The sound card type.
5) BIOS boot options.
6) The hard drive layout and size.
7) NIC type.

You will need to download and burn an image from or one of its mirror sites. (Let it be known that I am not able to post any direct links due to a limit of posts that I have. If the moderators wish to allow the link, then this message will be edited out.) Download disc-1 of the 8.x release. If you are using a computer with Windows installed on it, use whatever CD/Image program to burn it to a disc. If your computer is a netbook or you wish to use a USB install, download the image file from the server.

A few words of warning: If you are in doubt that your wireless or NIC may not work with FreeBSD, look at the online manual pages using the apropos search option and the model type in the input box. I am not familiar with the GPU/CPU combinations and would suggest that you do the same as for the wireless/NIC question. This tutorial assumes that you are booting from a disc drive.

Set your BIOS to boot from the CD/DVD drive and commit the changes. Let your machine boot to the login screen and place the disk in the tray. Reboot. You will be introduced to an ASCII screen with options after the reboot starts. Press enter.Choose your default country. If prompted for a language, choose the one you are most familiar with. On the next screen, you will see a series of options. Use the up and down arrows and highlight "standard." Press enter. Choose the disk you want to use as the install base. From this point on, you are dedicating your system to FreeBSD. You may want to exit the install menu, remove the disk, and reboot to backup and save your system.

Alright, I assume you have made complete backups on media and have returned to the install menu. Continue to choose the disk. Highlight the one for the install and press enter. A menu will appear at the bottom of the screen and the disk layout at the top. Using the arrows, select each partiton and press the D key until all space is made free. Select the free space, hit C. Choose all of the space available. Select the area again and use the S key to make it bootable. Press Q to continue to the next screen.
From the next screen, choose the disk label option. [The following layout is based on a disk size of 100G, use it as a guideline.] Press C. Make it 8G. Choose filesystem. Name the system /. Press C, 512M, swap. Press C, 5G, filesystem, /tmp. Press C, 7G, filesystem, /var. Press C, 30G, filesystem, /usr. Press C, 25G, filesystem, /usr/local. Press C, remaining space, file system, /home. Press Q to exit.
You will see the boot loader screen. Choose to install the bootloader.
The next screen will give you the options of installing the distribution sets. Choose custom.
These are the options:
1) Base + Kernel. This is a barebones install and should only be attempted by those who are willing to build the system up themselves. This will be the default.
2) Number 1 above plus docs, manpages, catpages, and info. You will have a basic system plus the information needed to set the system up on your own. Only install the docs for the languages you use.
3) All sets plus ports. Experience has taught me that the ports should be installed after the system is set up.

Using number 1 , go to custom and only choose kernel and base. Hit X when finished. Choose CD/DVD as the media type and hit enter.

The Congratulations dialogue will appear. Choose yes to finalize the system.
Do not allow any services. Do setup your network device. You will need to know what type of srvice that you have, any necessary passwords, and whatever options there may be. If you are behind a router, then makeup a host name. Do setup the time zone.

The user section will follow. Create a first user by entering the name, password, and wheel into member group. Hit okay when finished. Create a second user following the same methods as the first with the exception of not typing wheel in member groups. The first account will allow you to setup and monitor the system, the second will be used for everyday activities.

When finished, hit exit. You will be prompted for a root password. try for a string of ten or more characters being both alphabet and numerals.

Exit the install and reboot the system. Be sure to remove the disc to prevent going through the install process again.

III) Setting Up The System.

Press Enter to boot the system. Press enter again. Let the system run until the login prompt comes up. You must use the first account created for the rest of this section. Login in as the user. Type su and enter the root password.
A) Installing the other sets.
Load the installation disc.
Use the following commands. The hash/number sign represents the root shell.
#mkdir cdrom
#mount -t cd9660 -o ro /dev/acd0 cdrom
# cd cdrom
# ls
Look for the release number.
# cd 8*
# sh <directory name>/
1) Do not reinstall the base or kernel.
2) Do not install ports.
3) Use the following option for src.
# install src/ all
# cd /home/$USERNAME
# umount /home/$USERNAME/cdrom

Eject the cd.

B) Installing the ports collection.

CVS and csup are the best ways to install the ports collection.
Follow the commands given here.
# cd /usr
# vi /usr/share/examples/cvsup/ports-supfile

Scroll down to the section below the basic hashed out description. Using the arrow, go to CHANGETHIS. Hit D, hit 9, hit enter. Hit the escape key. Hit I. Type in cvsup1. Hit the escape key. Type in :w! and press enter. The dialog will show you have made changes. Type :q! and then enter.

Type the following command.
# /usr/share/examples/cvsup/ports-supfile && /usr/libexec/locate.updatedb

Let it run until you see the hash symbol for the root.

C) Tuning the variables.
The boot file can be tweaked to fit your system better. You will need paper and pencil to write the following information grabbed from the next set of commands.

# cd /boot
# dmesg|more

Look at the output and write down: CPU type, RAM amount, sound card, graphics card, network device if it wasn't detected.

# vi /boot/defaults/loader.conf.
Use the / key to search for the following values:
hw.physmem, kern.hz, Networking drivers, Sound modules.

Copy the option onto paper with the following added:
The hw.physmem should equal what you have installed. Use G or M.
Value of kern.hz should be 1000.
Copy only the networking driver that you have. Wireless users will be given the options a few sentences later.
Copy the sound module you have.

Type :q! and enter when finished.

For wireless, use the following.
# ifconfig -a
Note the wireless device.
#apropos <wireless device name minus the number>
# man <exact name of page for wireless device>
Read the man page and follow all directions listed

Continuing as before.
#vi /boot/loader.conf
Hit I.
Type in each option you have on the paper and the values. Be sure to hit the enter key after each section. Add the wireless information. Hit the escape key. Type :w! and then enter. Type :q! then enter.

Congratulations. Your system is setup.

The next post to this tutorial will deal with X, permissions, browsers and other items.

Sources: The freebsd handbook, the freebsd forums, and an outdated tutorial of mine.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1