niedziela, 19 kwietnia 2009

CD/DVD burning under FreeBSD

I wanted to use my CD/DVD burner under FreeBSD but under gnome I could not find any application that could be used to do that. I am used to k3b, which I use very often on the Linux system. Fortunately I found it in the ports and installed it without any major problems. The first problems occurred when I tried to use it, namely my CD/DVD burner was not detected by the application. Below I describe the steps to configure the CD/DVD burner on my system:

1) First of all by default my CD/DVD burner (which is located at /dev/acd0) had only read only access - one could change the permissions via chmod but the changes were not permanent. In order to change the permissions (to 0666) for the device one needs to extend the /etc/devfs.conf file:

perm acd0 0666
link acd0 cdrom
link acd0 dvd

Additionally I added lines to create symbolic links for /dev/cdrom and /dev/dvd.

2) Additionally one needed to load the atapicam driver (to test I used kldload atapicam) in order to make the ATAPI devices available via SCSI subsystem (more details can be found in the man page: ATAPICAM(4)). To load the module while OS is booting I added the following line to the /boot/loader.conf :

atapicam_load="YES"

Additionally I had to add write permissions to some devices - I had to add these additional lines to the /etc/devfs.conf file:

perm pass0 0666
perm pass1 0666

perm cd0 0666
perm xpt0 0666


And that's it - now the CD/DVD burner was properly detected by the k3b.

niedziela, 5 kwietnia 2009

Linksys WUSB54G / WPA2 and FreeBSD 7.1

In order to make my Internet connection usable I had to configure my Linksys WUSB54G USB wireless adapter. The driver that I use for this device is rum. It should be compiled into the default kernel but if it is not, one need to add the following line to the /boot/loader.conf file:

if_rum_load="YES"

More information on the driver can be found in the manual rum(4). Afterwards the device should be properly detected by the OS - in my case it was rum0.

The next step is to configure the WPA2 wireless connection. For this I purpose I used wpa_supplicant tool. First the connection details have to be specified in the configuration file - I used /etc/wpa_supplicant.conf (the content of which can be found below):

network={
ssid=
proto=WPA2
key_mgmt=WPA-PSK
psk=
}

To establish connection and obtain the IP address via dhcp I created a simple script:

#!/bin/sh
wpa_supplicant -irum0 -c/etc/wpa_supplicant.conf -B
sleep 2
dhclient rum0

The first line establishes the WPA2 connection with the AP. Unfortunately the call to the wpa_supplicant was not synchronous, which means that the tool had finished before the connection to the AP was established. Therefore I had to add a sleep for 2 seconds before invoking the dhclient to automatically obtain the IP address. I know there are better ways to do it but actually I did not have too much time to work on it.

czwartek, 2 kwietnia 2009

First entry - general

I created this blog in order to collect all the experiences and solutions to the problems encountered while using FreeBSD on my desktop (FSC SCENIC W600). Why FreeBSD? A good question, at work I mostly work on Solaris and I had installed it at home as well. However in my opinion Solaris is not suited for desktops for several reasons like: small number of drivers for x86 commonly used devices, no support for WPA (WLAN) for network connection. So my natural, next choice was OpenSolaris, however the installation DVD (Nevada snv_107) hang up right after presenting the kernel information (probably because of the problem with ACPI). In such case I decided not to continue with OpenSolaris and wait for a more reliable version of the system. So I looked in the Internet for another system and found FreeBSD. What I liked from the beginning is the linux binary compatibility feature (which significantly increases the number of applications that could run on the system), support for all the devices that I have in PC, support for WPA/WPA2 and some other cool features like dtrace. Having this in mind I decided to check if that is really true...