FreeBSD Stable Release 4.11 Installer  Guide

Home______________________________________________________________________

 

Installers Note: This has been corrected in 4.10. You should read through the next few sections as they all deal with making changes to the same configuration file. You can make all the changes first and then reboot just one time and see all the changes take effect at once. It’s your choice.

The sysinstall application during the install of FBSD incorrectly posts some statements to the /etc/rc.conf file. This is caused because sysinstall is a legacy application that has not been changed to work correctly with the /etc/defaults/rc.conf file. It’s best to manually correct these errors right at the outset of your new freshly installed operating system. The /etc/rc.conf file is the master FBSD operating system override configuration file and its purpose in life is to contain only the overrides to enable selected functions which the /etc/defaults/rc.conf file has defined as disabled. You will be making a lot of changes to this file before you have completely configured your system. Lets go see what sysinstall posted to this file for you as part of the install process.

ee /etc/rc.conf

This is what you will see if you have a non-USB mouse.

# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
kern_securelevel_enable="NO"
moused_enable="YES"
moused_port="/dev/psm0"
moused_type="auto"
nfs_reserved_port_only="YES"
sendmail_enable="YES"
sshd_enable="YES"
usbd_enable="YES"

Check out /etc/defaults/rc.conf file and you see that the options listed below have defaults which are the same as what sysinstall posted to the rc.conf file, which is only suppose to be used to override the defaults. This is a sysinstall install error.

kern_securelevel_enable="NO"
nfs_reserved_port_only="YES"
sendmail_enable="YES"

The following statements are enabled in error because you did not request these facilities during the sysinstall process.

sshd_enable="YES"
usbd_enable="YES"

Delete these statements from your /etc/rc.conf file as they are un-necessary and only clutter up your file and violate the intended usage of the /etc/rc.conf file. You have been shown how to use the ee editor, so edit the file and delete those statements, and save your changes.

ee /etc/rc.conf

If you do have an USB mouse all the moused_ stuff will be absent and the usbd_enable="YES" statement stays because it’s a valid override of the default in this case.

While you are cleaning up this file there is a general house cleaning option which should be added. The /tmp directory is where FBSD places all of its temporary work files created during port installs, cvsup, and package installs. The problem is this directory never gets emptied and can start to consume a lot of hard disk space. Many users wonder why their system wide backups start taking longer and longer to complete. It’s because the /tmp directory is growing. The /tmp directory can be cleared every time you boot the system. Add this statement to /etc/rc.conf

clear_tmp_enable="YES"      # YES has to be in capital letters

 

There is still one last hidden error which is consuming resources. Enter this command on the command line to see the current running tasks on your operation system.

ps ax

Look for inetd. You see it's running, but you did not select to enable it during the sysinstall process. For some unknown reason the default value for inetd in the /etc/defaults/rc.conf is incorrectly set to "YES" as delivered on the install CDROM. You need to correct this by editing the /etc/defaults/rc.conf

ee /etc/defaults/rc.conf

Now press the ‘ctrl’ keyboard key and the ‘Y’ keyboard key at same time to open the ‘search for’ prompt which will appear at the left bottom side of the edit screen.

Type in inetd and hit enter key. The text curser will be positioned on the inetd_enable="YES" statement.

Replace the capital lettered "YES" with the a capital lettered "NO" and save the file. Next time you reboot your system, inted will no longer start up and consume system resources.

You have now completed the fixing of all the sysinstall errors.

 

The mouse has a copy/paste function which defaults to a 3 button mouse. Many users are unaware the mouse copy/paste function even exists, because they have an industry standard 2 button mouse. Why the mouse program has not been updated to use the industry standard 2 button mouse as its default is unknown. You will find it very useful when editing a file or any time you want to copy & paste some message from your screen to a file. There is really no 'cut' function as you know it from MS/Windows. If you read the ‘moused’ manual documentation, you will see that they call it cut and paste. That is a error in the documentation (it can not cut, as in remove the highlighted text from the screen or edit file) it only copies the highlighted text to the internal paste buffer. Just think of it as copy and paste.

The logical button 1 (logical left) selects a region of text on the console screen and copies it to the paste buffer. The logical button 3 (logical right) extends the selected region. The logical button 2 (logical middle) pastes the selected text at the text cursor position.

During the install process you were asked if you have an USB mouse. If not sysinstall presented you with options to configure your non-USB mouse, the results of which were inserted into the master start up configuration file /etc/rc.conf as a group of over ride options statements.

 

You have to customize /etc/rc.conf file to enable the non-USB 2 button mouse copy/paste function.

ee /etc/rc/conf

After performing the Correcting Sysinstall Errors in rc.conf instructions, your /etc/rc.conf should look like this:

# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
moused_enable="YES"
moused_port="/dev/psm0"     # you may have different device device here moused_type="auto"

Add this statement:

moused_flags="-m 2=3"       # config for 2 button mouse

Also add this statement to enable the mouse and the blinking text curser on all virtual terminals:

allscreens_flags="-m on -c blink"   # -m enable mouse curser on

                                    # -c enable console curser to blink

Save the rc.conf file and ‘reboot’ your system for your edit changes to take effect.

 

After performing the Correcting Sysinstall Errors in rc.conf instructions, your /etc/rc.conf should look like this:

ee /etc/rc.conf

# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.

usbd_enable="YES"

Add this statement to enable the mouse and the blinking text curser on all virtual terminals:

allscreens_flags="-m on -c blink"     # -m enable mouse curser on

                                      # -c enable console curser to blink

Save the changed file.

The /etc/usbd.conf file is where the USB 2 button mouse is specified at.

ee /etc/usbd.conf

Scroll to the bottom of the file until you find this statement:

attach "/usr/sbin/moused -p /dev/${DEVNAME} -I /var/run/moused.${DEVNAME}.pid"

 

You are going to change this line by adding the –m 2=3 option in front of the –p option so it looks like this:

attach "/usr/sbin/moused –m 2=3 -p /dev/${DEVNAME} -I /var/run/moused.${DEVNAME}.pid"

Save the changed file and ‘reboot’ your system for your edit changes to take effect.

 

With the mouse enabled you will now see two cursors on your console screen. The mouse cursor is a white arrow that moves with the mouse. The other cursor is a white block which is the UNIX text cursor.

Move the mouse arrow cursor to the start of some word that is displayed on your screen. Depress the left mouse button and hold it down while you drag the mouse to highlight the word you want to copy. Release the left mouse button at end of what you want to copy. Whatever you highlighted has been copied to the internal paste buffer. The UNIX white block text cursor is on the command line. Move the mouse‘s white arrow to the command line; pressing the right mouse button will paste the selected text on the command line.

When using the ee editor the copy/paste function works fine. You just have to use the keyboard arrow keys to move the UNIX white block text cursor to the location you want to paste your text.

 

There is a kernel source option to change the mouse arrow pointer to a color red block. I found the white small arrow gets lost on the screen among all the white letters of the words. Sometime soon you will be building your own customized kernel source. So keep this mouse curser option in mind when you build your own custom kernel. Add the following statement to your kernel source and recompile.

options SC_ALT_MOUSE_IMAGE    # Show red Block curser not arrow

______________________________________________________________________

This FreeBSD Installer Guide is an public domain HOW-TO.  This content may be reproduced, in any form or by any means, and used by all without permission in writing from the author.