• Favorite Desktop Environment 
    • KDE
    • Gnome
    • Fluxbox
    • XFCE
    • Enlightenment
    • I live life in the console
    • Other


  created: Aug 23, 2010
Read Graph
Read Scaling Graph

IOzone is a filesystem benchmark tool that

  • read
  • write
  • re-read
  • re-write
  • read backwards
  • read strided
  • fread
  • fwrite
  • random read
  • pread
  • mmap
  • aio_read
  • aio_write
jkdsfjld


Read more...   modified: Jul 07, 2010     created: Jul 07, 2009

BackupPC is an awesome program for backing up your data in an efficient manner. It provides you with an easy to use web interface and some very complete documentation. Read more about it at the BackupPC SourceForge page.

For some reason, the FreeBSD ports tree still does not contain BackupPC! This guide details the configuration steps to get BackupPC running with an Apache (lighttpd also supported, though) web interface on a FreeBSD host.



Read more...   modified: Jul 04, 2010     created: Aug 01, 2009

Upgrading a FreeBSD system is not all that hard. The FreeBSD Handbook obviously has a more verbose look at the whole process, but the following is basically what you will need to do on most systems.

If csup is new to you, man csup for more information. It is a C rewrite of cvsup.



  created: Jun 26, 2010

I stumbled across pv the other day and found it interesting. It is not so much a utility as eye-candy, but useful non-the-less.

from the man page: pv allows a user to see the progress of data through a pipeline, by giving information such as time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA.

First, install pv with what ever package manager you use.

  • # cd /usr/ports/sysutils/pv && make install clean
  • # apt-get install pv
  • # yum install pv

Using pv is analogous to using cat, only with a progress bar and some extra goodies!

  1. # pv file.iso | dd of=/dev/cd0 bs=64k
  1. (server)
  2. # pv file.iso > nc -l 4444
  3. (client)
  4. # nc host 444 > file.iso


Read more...   modified: Jun 26, 2010     created: May 01, 2009

NanoBSD is an awesome set of scripts contained in the FreeBSD source tree that enables you to easily prepare and install a custom FreeBSD system for an embedded device. It is also highly optimized for Compact Flash media, providing a Read-Only file system and memory disks for the heavily written mount points, namely /etc and /var, to protect against wear-leveling.

I have provided a number of config files for a NanoBSD system that provides various services to get you started on an overlay of custom files that are geared towards making an AP (access point) out of an ALIX2C2 board from http://pcengines.ch (purchased at NetGate [US]), although these files require minor tweaks if you are using another ALIX board or even completely different hardware (mainly just network device names!).



  created: Jun 25, 2010
  1. # mkdir /mnt/nanobsd
  2. # mount /dev/da0s1a /mnt/nanobsd
  3. # mkdir /mnt/nanobsd/usr/ports
  4. # mount -t nullfs /usr/ports /mnt/nanobsd/usr/ports
  5. # mount /dev/da0s3 /mnt/nanobsd/cfg
  6. # chroot /mnt/nanobsd
  1. # cd /usr/ports/foo/bar
  2. # make install clean
  3. # mkdir /cfg/local
  4. # cp -R /usr/local/etc/* /cfg/local
  1. # exit
  2. # umount /mnt/nanobsd/usr/ports
  3. # umount /mnt/nanobsd/cfg
  4. # umount /mnt/nanobsd


  modified: Jun 24, 2010     created: Dec 05, 2009

I always seem to forget this command. The following mounts the UFS2 FreeBSD filesystem to /mnt/fbsd directory on a Linux box. Notice the read-only permission. Unfortunately, (as of this writing) Linux does not have write support for UFS2. Please let me know if I am in error.

Change /dev/sda3 to your disk device!

  1. # mkdir /mnt/fbsd
  2. # mount -t ufs -o ro,ufstype=ufs2 /dev/sda3 /mnt/fbsd


Read more...   created: Apr 20, 2010

Under construction...



  created: Apr 19, 2010

Never edit /boot/grub/grub.cfg directly! You have to make changes in a special file under /etc/grub.d so that your changes will not get overwritten every time you update kernels, etc.

I am using my disk device name here. Make sure you use the one that fits your system.

  • hd0       hard drive number
  • 3           partition of FreeBSD partition (indexed from 1)
  • a           slice of /boot partition
  1. # vi /etc/grub.d/40_custom
  2. #!/bin/sh
  3. exec tail -n +3 $0
  4.  
  5. menuentry "FreeBSD 8.0-RELEASE" {
  6.     insmod ufs2
  7.     set root=(hd0,3,a)
  8.     chainloader +1
  9. }

Run update-grub2 to merge the changes in /etc/grub.d/40_custom. You should also be able to verify that the new entry will be seen next time grub2 is loaded.

  1. # update-grub2
  2. # cat /boot/grub/grub.cfg | grep FreeBSD

Reboot and give it a try!



Read more...   created: Apr 06, 2010

I was on the hunt for an expect library for PHP and finally found one in PECL, a repository for PHP Extensions. I was surprised this was not a PHP module more easily accessible like php-session, php-mysql, etc... but it works just as well.



Read more...   created: Apr 04, 2010

Since Metasploit is so dynamic and still changing frequently with full time employees, it is best to just sync a local file tree to the latest code branch when you plan to use it. You can use the /usr/ports/security/metasploit port, but you will find it lagged far behind the latest SVN tree.

Anyways, we need to install subversion to download the Metasploit Framework.

  1. # cd /usr/ports/devel/subversion
  2. # make install clean distclean

Now make room for Metasploit and download the tree.

  1. $ mkdir ~/.msf3
  2. $ cd ~/.msf3
  3. $ svn co https://www.metasploit.com/svn/framework3/trunk framework

Finally, drag in Ruby and a few supporting modules.

  1. # cd /usr/ports/databases/rubygem-activerecord
  2. # make install clean distclean
  3. # cd /usr/ports/devel/ruby-rreadline
  4. # make install


Read more...   created: Apr 01, 2010
tomcat logo

Coming soon...





Read more...   modified: Dec 25, 2009     created: May 15, 2009
Eclipse Logo atmel logo

A FreeBSD port for the Eclipse AVR add-on has yet to be created and the Eclipse CDT add-on that is contained in even a recent ports tree is too outdated to use with the AVR add-on.

To fix this, I basically started with a naked Eclipse install from ports and installed the extra features manually using Eclipse's update mechanism and each add-on's respective update site.



  created: Dec 09, 2009

This uses the new VAP interface setup that comes with FreeBSD 8.0 and newer.

  1. # vi /etc/rc.conf
  2. --- snip --- snip ---
  3. wlans_ath0="wlan0"
  4. ifconfig_wlan0="WPA DHCP"
  1. # vi /etc/wpa_supplicant.conf
  2. network={
  3.     ssid="ssid_goes_here"
  4.     key_mgmt=WPA-PSK
  5.     psk="password_here"
  6. }
  1. # /etc/rc.d/netif restart

Wait a few seconds for your wireless card to associate with the wireless device and see (1) if you are associated and (2) that you have an IP address.

  1. # ifconfig wlan0

If you have multiple access points around and want a certain one over the other, add priority=1 (you change number), to the host's block in /etc/wpa_supplicant.conf. The lower the number, the higher the priority.

Test IP connectivity to the public Internet.

  1. # ping 4.2.2.1

Test DNS resolution against a public hostname.

  1. # cat /etc/resolv.conf
  2. -- list of nameservers from DHCP lease --
  3. # ping www.google.com

If you happen to not have anything there, you can try using the 4.2.2.1 and 4.2.2.2 nameservers.

  1. # vi /etc/resolv.conf
  2. nameserver 4.2.2.1
  3. nameserver 4.2.2.2


Read more...   created: Nov 25, 2009

The FreeBSD Handbook covers most FreeBSD installation topics in depth, but the following is exactly the way I install all of my systems. This process is quick and will get you into a system that you can customize to your liking.



Read more...   modified: Nov 24, 2009     created: Aug 24, 2009

I have compiled a list of system commands that I felt were frequent enough to mention. The list covers commands that you use to ti interact with the file system and network, use the vi/vim editor, and utilize screen to make life easier.



  created: Nov 24, 2009

I have put together a basic reference of chmod permissions. Enjoy!

For a more complete "e;guide"e; to little things like this, check out my full guide to using a shell.

Digit R W X Result
0 - - - no access
1 - - x execute
2 - w - write
3 - w x write & execute
4 r - - read
5 r - x read & execute
6 r w - read & write
7 r w x read, write, & execute

R is read   W is write   X is execute



Read more...   created: Nov 20, 2009

git is an awesome reversion-control system (amougst many other things) Coupled with gitosis for easy user/project/groups/access management and gitweb to get a great visualization of a project's repository, it can quicky scale to any project at hand.



Read more...   created: Sep 07, 2009

I had the need to set up irssi on my University shell account with minimal user access, so I took some notes on what I did. I have found out that a lot of people encounter the missing glib dependency, which is absolutely necessary for irssi to execute properly. Due to the problem's popularity, I included installing glib in this guide.



Read more...   created: Jul 28, 2009

FreeBSD ships with the internal speaker enabled, which can be very annoying when computing in public! I chose to disable the beep by disabling it at the kernel level with sysctl, instead of doing one-off hacks for each application that uses the system bell.

  1. # sysctl hw.syscons.bell=0
  2. hw.syscons.bell: 1 -> 0

Now check to see if the beep is still there. If not, do the following to make the change permenant. If the sound is still there, skip to the next heading to see some other methods of disabling the internal speaker.

  1. # echo 'hw.syscons.bell=0' >> /etc/sysctl.conf


Read more...   created: Jul 16, 2009

Apache's HTTP Authentication is a fast and easy way to lock down a directory so that it prompts users with a password dialog box to view the files.

This guide assumes that you have Apache2 already up and running.



Read more...   modified: Jun 27, 2009     created: May 11, 2009

Qemu enables you to emulate hardware on a virtual harddrive, allowing you to install an operating system (or systems) and start up the "virtual" computer as if you controlled the BIOS and hardware components.

This guide runs through the basics of installing and configuring Qemu on a FreeBSD host and shows how easy it is to virtualize an operating system.

Although this guide is aimed at using FreeBSD for the Qemu host system, the actual commands and process to interact with Qemu remain the same on virtually any Qemu installation (including Windows). Your mileage may vary.



Read more...   modified: Jun 12, 2009     created: May 09, 2009

If you are new to the ALIX board world or need a quick reference for a buy list, I have put together a quick list of parts that I often buy for home and office installs that need to utilize WiFi.

I mostly use ALIX (formerly WRAP) embedded boards that pcengines makes. They are 500Mhz, 256MB of ram, and come in a variety of hardware options.... and a basic kit can be had for less then 190$ (US)! The following will provide you with a basic config that would suit most smaller installs that need to utilize Wi-Fi (2.4Ghz in this case).



Read more...   modified: Apr 29, 2009     created: Apr 28, 2009

There are some cases where a remote ports tree is a good thing to have around. For example, it can save bandwidth by downloading dist files only once and using them across all clients, when you need to know that all hosts using the tree have the same version of packages (good in development environment or large network), or even when the client doesn't have enough space for ports tree, distfiles, or the compile itself (NanoBSD!)



Read more...   created: Apr 28, 2009
FreeBSD Sonicwall Drawing

This is a basic setup involving a point-to-point IPSec VPN connection between a FreeBSD host and a Sonicwall TZ-170. This guide will probably work for most other versions of FreeBSD as well as other operating systems that use ipsec-tools and racoon.

For this tutorial, the FreeBSD source tree (/usr/src) should be installed. If you do not have it, look on the FTP and download the tree and use the install.sh all script.