Comment
FYI, new install of FreeBSD 9.0-BETA3 with docs, src, ports,, (basic standard full install) ended up using 2.5g HD space. The new installer defaults entire drive to / slice, in fact the entire installer is quite different that previous versions, much easier it seems.

New Install 2013-06-15[-][--][++]

portsnap fetch
portsnap extract
portsnap upgrade

(after that just 'portsnap fetch update' to get latest ports)

whereis portupgrade

cd /usr/ports
make quicksearch name=portupgrade

cd /usr/ports/ports-mgmt/portupgrade; make install clean
cd /usr/ports/shells/bash; make install clean

visudo, uncomment the %wheel nopasswd line
pw user mod mreschke -G wheel

cd /usr/ports/ftp/wget; make install clean
cd /usr/ports/lang/python; make install clean

I do chsh to /usr/local/bin/bash for root and mreschke
I install manup

cd /usr/ports/x11/xorg-minimal; make install clean
cd /usr/ports/x11-fonts/xorg-fonts; make install clean
cd /usr/ports/x11-fonts/urwfonts; make install clean
cd /usr/ports/x11-wm/spectrwm; make install clean
cd /usr/ports/editors/vim make install clean
cd /usr/ports/x11-themes/gtk-engines2; make install clean
cd /usr/ports/x11-themes/gtk-murrine-engine; make install clean
cd /usr/ports/x11-themes/gtk-murrine-themes; make install clean
cd /usr/ports/x11-themes/icons-tango; make install clean

echo 'hald_enable="YES"' >> /etc/rc.conf
echo 'dbus_enable="YES"' >> /etc/rc.conf
/etc/rc.d/hald start
/etc/rc.d/dbus start

New install 2011-10-04[-][--][++]

This is the basic setup of a minimal install

Fresh choose minimal install only, should be a few hundred megs on df -h
I created a user in the install GUI with group wheel, else create one via command line

  1. login as root
  2. pkg_add -r pkg_search
  3. pkg_add -r bash
  4. pkg_add -r sudo
  5. DONT install vim unless you want about 200mb installed, lots of extra dependencies
  6. portsnap fetch
  7. portsnap extract (which extracts and buils the /usr/ports tree)
    1. Search port whereas xxx or cd /usr/ports; make search name=xxx or cd /usr/ports; make search key=xxx
    2. Install from port (ports are source code, will compile) cd /usr/ports/yyy/xxx; make; make install; make clean
    3. You can use portupgrade or portmanager to manage/upgrade your ports (must install either of those with pkg_add -r xxx)
      1. I prefer portupgrade, so use that one
      2. Show ports in need of upgrade pkg_version -v
      3. Update all ports system portupgrade -varRPP carefull the PP forces packages instead of ports, this is good, ports would compile and take forever
      4. See http://www.freebsd.org/doc/handbook/ports-using.html
  8. chsh (set to /usr/local/bin/bash), note root is normally /bin/csh which users are /bin/sh
  9. edit /usr/local/etc/sudoers and uncomment wheel (I used the NOPASSWD one)
  10. portsnap fetch update
  11. freebsd-update fetch
  12. freebsd-update install

Simple, small personal customizations
pkg_add -r nano vim wget curl nmap

Exclamation3
Remember all custom stuff is in /usr/local/ (so /usr/local/etc...)
Remember sysinstall is the graphical install you can still access, use as a GUI package manager

Applications[-][--][++]

cdrecord[-][--][++]

:/usr/ports# portmanager sysutils/cdrtools

Now your aliases of burn16 and burn24... will work with cdrecord

Note, the dev=/dev/dvd will not work (like in linux), BSD uses a SCSI type device. You can check where your \
cdrom is by running

# cdrecord -scanbus

So mine said, 0,0,0 0) 'Sony DVD...'
so my cd record string is
# cdrecord -v -dao speed=24 dev=0,0,0 burnMe.iso

Install freeBSD (minimal install only)[-][--][++]

The FTP install of freeBSD is just the minimal install (so no xorg). The burned CD is very small, 130MB or so.
Durning installation, you select the source of the install as an FTP site, blah blah...

Install Steps[-][--][++]

Not exact, or complete, just the complicated parts

  1. In the partitions, select your partition, and delete it
  2. Now selection the same partition and create it (default size of full, and type are good)
  3. Select none for bootloader (since I have linux and grup on MBR)
  4. For labels, you can either create a 768M swap, and rest as / (make sure / is not softupdates), or I just used 'A' for auto defaults
  5. For distributions, I just selected the minimal
  6. After install, edit some final options (like root password and timezone), then reboot
  7. add a new bsd user with by just typing 'adduser' and following the instructions (I use bash as my shell, might have to do a portstap update and pkg_add -r bash first)
  8. Enter your main linux, edit the /boot/grub/menu.lst with
    title         freeBSD 7.1
    rootnoverify  (hd0,3)
    chainloader    +1
    

Read this[-][--][++]

  1. freeBSD boot process http://www.freebsd.org/doc/en/books/handbook/boot-blocks.html
    1. this part is cool '12.3.3.4.1 Splash Screen Function'
    2. I added to my /boot/loader.config
      #vesa_load="YES"
      splash_bmp_load="YES"
      bitmap_load="YES"
      bitmap_name="/boot/splash.bmp"
      #beastie_disable="YES"
      loader_logo="beastie"
      
      \

And downloaded some artwork and saved it to /boot/splash.bmp from http://artwork.freebsdgr.org/node/3/

Oh and this for the options selector
http://wiki.freebsd.org/OliverFromme/BootLoader
http://wiki.freebsd.org/OliverFromme/BootLoaderTest
http://www.secnetix.de/olli/tmp/gloader.tar.gz

Stats after a minimal install[-][--][++]

the root partition had 138M used
the usr partition had 119M used
/ 138MB
/usr 119MB
/usr/lib 23M
/usr/share 18M
/usr/bin 27M
/usr/include 17M
/usr/sbin 15m

Commands after minimal install[-][--][++]

# portsnap fetch
# portsnap extract (which extracts and buils the /usr/ports tree)
# portsnap fetch update
# freebsd-update fetch
# freebsd-update install

Now the /usr folder is 584MB, so 465MB of data

I tried to install fvwm-crystal using portmanager (# portmanager x11-wm/fvwm-crystal) which manages dependencies, which built the program from \
source code, with all the dependencies it included (which for some odd reason did NOT include xorg), it took 2 days \
to complete. Granted, I was not there the whole time, and there were a lot of popups asking which flags you \
want compiled with each program (not all at once, too bad, but before each program installed, so they popped all through \
out that 2 day period). Probably took about 12 hours total, if those flag popups could have been dismissed quickly.

Next time, just install large apps like that from the pre-compiled package, unless you are picky

# pkg_add -r xorg
# pkg_add -r fvwm-crystal

There is more pkg_* files like pkg_search etc... you have to get them from ports, like:

# portmanager ports-mgt/pkg_search

You can browse all pre-compiled .tbz packages by just going to ftp://ftp.freebsd.org/
Note, when I do a pkg_add, my system looks to ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.1-release/Latest

Anyway, I did not use pkg_add, (BUT I did for xorg, just not fvwm-crystal), so it took forever, but it works great.

To make it work good.

# pkg_add -r slim
# vi /etc/rc.d
   slim_enable="YES"   (note: this will enable xdm on startup)
# vi /usr/home/bsd/.xinitrc
   exec fvwm-crystal   (note: exec must be lowercase)
# reboot

or for say, xfce4 without slim

echo "/usr/X11R6/bin/startxfce4" > ~/.xinitrc

xorg[-][--][++]

Note this is for my qlap02 1ghz HP laptop LCD
http://www.freebsd.org/doc/en/books/handbook/x-config.html
there is no xorg.conf file by default, make it with X -configure. Then edit the /root/xorg.conf.new with

HorizSync 30-207
VertRefresh 48-120

inside the section "Monitor"

and

DefaultDepth 24
then
SubSection "Display"
 Viewport 0 0
 Depth 24
 Modes "1024x768"
EndSubSection

inside the section "Screen"

Errors[-][--][++]

Xorg Bad Display Name[-][--][++]

got a 'bad display name ".networkq:0" in "remove" command
Just had to add networkq to my /etc/hosts file

Also, I had to add .networkq to my /etc/hosts file because xorg looks for a screen at your workgroup name.\
So I added a few entries into /etc/hosts, (a few because one didn't work, I think it's the localhost.networkq that worked)

127.0.0.1   localhost  .networkq
127.0.0.1   localhost  localhost.networkq

Install freeBSD & KDE4 (user + xorg graphic install)[-][--][++]

HD Space just after install

Entire / drive (I combined all /usr /tmp ... into just one /) it's 1.3gigs
But this comes with xorg and all the ports tree (/usr/ports)

Startx works with JWM as default

Commands after install (as bsd->root with su)[-][--][++]

# (/usr/ports): make install clean shells/bash
  Takes some time (dont do it, about 6 hours, no joke) on qlap (so just do a pkg_add -r bash)
# exit
$ chsh (and change shell type to /usr/local/bin/bash
# pkg_add -r sudo
  (edit sudoers file in /usr/local/etc/sudoers)
# pkg_add -r pkg_search
# pkg_add -r nano
# nano /home/bsd/.bashrc
  (add only source /etc/profile)
# nano /root/.bashrc (same, add source /etc/profile)
# nano /etc/profile (and add all your custom aliases and paths and prompts and keys...)
# chsh (and set root shell to /usr/local/bin/bash
# pkg_add -r kde4
$ echo "exec /usr/local/kde4/bin/startkde" > ~/.xinitrc
To enable kdm, the ttyv8 entry in /etc/ttys has to be adapted. The line should look as follows:
  ttyv8 "/usr/local/kde4/bin/kdm -nodaemon" xterm on secure
# pkg_add -r portmanager
# pkg_add -r cdrtools


See http://www.freebsd.org/doc/en/books/handbook/x11-wm.html#X11-WM-KDE-KDM for KDE and KDM installs

Getting su and sudo to work[-][--][++]

When logged in as a normal user (in my case the user is 'bsd') I cannot use su. The workaround is to add the user 'bsd' into \
the 'wheel' group

# pw user mod bsd -G wheel

NOTE that there is also a etc folder in /usr/local/etc
The sudoers file is in /usr/local/etc, not /etc here in freeBSD
So edit that with your

bsd     ALL=(ALL) ALL

NFS mounts[-][--][++]

Mounting NFS shares in /etc/fstab is a bit different than linux, linux does a nfs auto,auto 0 0 but freeBSD does

qserver:/media/local/disk0 /media/qserver/disk0    nfs    rw    0    0

Note the rw, instead of auto,auto

Shell Profiles[-][--][++]

NOTE: I setup a new user called 'bsd' and freeBSD defaulted it's shell type to 'sh'. But the root user is defaulted \
to 'csh', the c shell. You can see which shell is your default by 'cat /etc/passwd'.

To Change Users Default Shell
This command will open up your default text editor with user information, you can change your shell here

chsh

Short for 'change shell'
So I changed my 'bsd' username to use the /bin/csh shell

You can see which shells you have install on your system by

cat /etc/shells

I change my prompt in my /root/.cshrc and /home/bsd/.cshrc to

#mReschke Prompt
if ($?prompt) then
        # An interactive shell -- set some stuff up
    set prompt = '%n@%m:%/$ '
        set filec
        set history = 1000
        set savehist = 1000
        set mail = (/var/mail/$USER)
        if ( $?tcsh ) then
                bindkey "^W" backward-delete-word
                bindkey -k up history-search-backward
                bindkey -k down history-search-forward
        endif
endif

I also add some aliases, please see my My etc-profile for more, up-to-date information on my personal profile settings.

Hardward Detect & Setup[-][--][++]

Very different from linux.

To find a list of all supported hardware and their kernel module driver names see
http://www.freebsd.org/releases/7.1R/hardware.html
or search for it. I used pciconf to find my laptops Acer Labs M5451 sound card, then used this site \
and search for M5451 which says driver 'snd_t4dwave'. I kldload the module, then try 'mp3blaster music.mp3', works great.

Various Methods and programs

cat /var/run/dmesg.boot (but only shows hardware that was detected and setup, not hw thats not setup)
pciconf -lv (just like linux lspci)
usbdevs -v (like lsusb)
atacontrol list (for ata devices)
dmidecode (for bios information)
kldload (like modprobe)
kldunload (to unload a module)
kldstat -v (shows all loaded kernel modules, like lsmod)

To add a module into the kernel manually

kldload modulename

To load a kernel module at load edit the /boot/loader.conf with something like this

snd_emu10k1_load="YES"

Notice the _load, this is required, the module name is 'snd_emu10k1'

VIM keys to function like linux[-][--][++]

http://unix.stackexchange.com/questions/677/vim-on-freebsd-does-not-react-on-arrow-keys-correctly-and-other-vi-like-behaviour

~/.vimrc

"mReschke custom
set tabstop=4
set ts=4
set sw=4
"set expandtab
set nowrap
syntax enable
set autoindent
set foldmethod=manual
let php_folding = 1
set ignorecase
set nu! "Line Numbers
set guioptions+=b "Bottom Scroll Bar for gVim
set mouse=a

"Makes FreeBSD VIM arrow keys act like linux (move arrow keys while in insert mode)
set nocompatible
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set showmatch
set guioptions-=T
set vb t_vb=
set ruler
set nohls
set incsearch
set virtualedit=all
set bs=2