Saturday, October 14, 2006

ReiserFS creator charged for murder

"Hans Reiser, 42, was taken into custody at 11 a.m., hours after Oakland police and FBI technicians searched his home in the Oakland hills. His estranged wife, Nina Reiser, 31, has been missing since Sept. 3, when she dropped off the couple's son and daughter at his home on the 6900 block of Exeter Drive." -- San Francisco Chronicle

More at sfgate.com

Slashdot has an article about The Future of ReiserFS

Wednesday, October 04, 2006

Slackware 11.0 Final Release

Finally we've been presented with the final realease of linux distro Slackware.
Version 11.0 comes with X11R6.9.0 X.org X interface with the same codebase as Modular X.Org 7.0.0, full support to kernel 2.6 series and many other features

Read the officla annouce at www.slackware.com

Get now your iso and burn you official slackware 11.0 cd.

Here is a little how to on cd burning using cdrecord:
(Considering SCSI emulationg)

List your devices:
$ cdrecord -scanbus

Burn it:
$ cdrecord dev=b,t,l -v speed=8 driveropts=burnfree image.iso

Note: i'm using 4x cd burning speed with BurnFree enabled. You must have a burner with burnfree and 8x burning support. Driver options can be gathered issuing the following command:

$ cdrecord dev=b,t,l driveropts=help -checkdrive

Good burning and have fun!

Wednesday, September 13, 2006

Slackware 11 RC4

I noticed a considerable Changelog activity since RC4 was announced. People at Slackware staff is doing their best to fix things and keep all running smooth until final release. It is really hard to say a date but i bet in a final release around the end of month.
Let's see if my feeling is right!

Sorry about the blog being calm last days...

For those who want some good reading, SecurityFocus have a two-parts paper on Dynamic Linking, take a look:

Part 1 Part 2

Good reading!

Wednesday, August 30, 2006

Understanding HAL, D-BUS and udev

Definitions

"A hardware abstraction layer (HAL) is an abstraction layer, implemented in software, between the physical hardware of a computer and the software that runs on that computer. Its function is to hide differences in hardware from most of the operating system kernel, so that most of the kernel-mode code does not need to be changed to run on systems with different hardware. A HAL allows instructions from higher level computer languages to communicate with lower level components, such as directly with hardware." -- [1]

"D-Bus is a system for interprocess communication (IPC)." -- [2]

"D-Bus allows other programs to register on it for offering services to others. It also offers client programs the possibility to look up which services are available. Programs can also register as waiting for events of the kernel like hot swapping hardware." -- [3]


HAL

First of all i'll introduce the idea of a device object. By definition it is the smallest addressable unit of a hardware. To put it in a simple form, HAL can create device objets to each function of a single hardware, like one for a webcam microphone and another to the embbeded camera constituing the webcam.

The linux HAL implementation represents each device as a device object and provides an API through D-BUS allowing asynchronous notifications about hardwares modifications, making system much more compatible to plug-and-lay devices. Specific applications (callouts) are invoked by the HAL daemon to ensure the right system policy over each device and then applications are ready to get the "address" of a device through HAL and then access it through kernel. Program can locate and issue generic devices operations also by using D-BUS to communication with the abstraction layer daemon.

Intended to only provide generic operations that apply to all devices, HAL is designed to integrate with libraries supporting specific devices operations. This way hardware manufacturers can develop their own hardware support (we now that is not a common fact in linux world).


D-BUS

The bus daemon tipically has multiple instances. One of them, called system channel, is high-privileged and responsible to deliver signals from HAL daemon to any process interested in them. The others are user instances intended to provide communication between applications in the user session and they are created one per user login session.
Designed to provide communication between desktop applications and between the desktop session and the operating system as shown above, D-Bus works by sending messages.
I'm not goin to cover this topic deeply as it would become technical and out of context. More information can be found at [2] and [3].


udev

Basically udev is a userspace implementation of devfs. The /dev directory is huge and not all device files there match up to a physical device. It is also hard to keep the same device mapped to the same file like the usb problem: change usb interface for two usb printers and their corresponding /dev file will be changed, making it hard to always use the wanted hardware. This has changed with sysfs disposing device information under the /sys directory, but not solving the problem.
As a solution to the number of files listed in /dev was adopted the devfs. The concept is based on the fact kernel always knows what devices are present. This way, a ram based filesystem managed by the operating system heart is created and it shows only plugged devices.
Another problem is devfs forces device names and naming database into kernel memory and since it is not swapped out this causes an overhead when large amounts of devices are being used.
Looking for a solution for that problems, udev was intended to follow this standard:

1. Run in userspace
2. Create a dynamic /dev
3. Provice a consistent device naming
4. Provide a userspace API to access information about current system devices

The first item was achieved with /sbin/hotplug and sysfs and the other goals splitted udev in three subsystems:

1. namedev - handles all device naming
2. libsysfs - a standard libary for accessing device information on the system
3. udev - dynamic replacement for /dev

More information at [4] and [5].


That's it...
Sorry about mispellings, i posted without a revision =P
Feel free to comment and give me suggestions.

References:

[1] http://en.wikipedia.org/wiki/Hardware_Abstraction_Layer

[2] http://dbus.freedesktop.org/doc/dbus-tutorial.html

[3] http://en.wikipedia.org/wiki/D-BUS

[4] http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ

[5] http://en.wikipedia.org/wiki/Udev

[6] http://www.kroah.com/linux/talks/ols_2003_udev_paper/Reprint-Kroah-Hartman-OLS2003.pdf

Sunday, August 27, 2006

Slackware Linux 10.2 Bootsplash Quick Howto -- by Excessive

Slackware Linux 10.2 Bootsplash Quick Howto
-------------------------------------
by Excessive

This document explains how to set up Bootsplash on a Slackware Linux 10.2 with Kernel 2.6.17.7.

1. Getting files

First, we have to get the required packages from www.bootsplash.org:

a. Bootsplash kernel patch:
ftp://ftp.openbios.org/pub/bootsplash/kernel/bootsplash-3.1.6-2.6.15.diff

b. Bootsplash utilities:

ftp://ftp.openbios.org/pub/bootsplash/rpm-sources/bootsplash/bootsplash-3.0.7.tar.bz2

c. Generic Linux theme:
ftp://ftp.openbios.org/pub/bootsplash/themes/Theme-Linux.tar.bz2

Please extract these archives to seperate folders. For example:

bootsplash-3.0.7.tar.bz2 to ~/bootsplash/tools
Theme-Linux.tar.bz2 to ~/bootsplash/themes

with tar or Midnight Commander (mc) before proceeding.

2. Preparing:

a. Patch your kernel:

Become root (via su) and navigate to /usr/src/linux directory (provided it is pointing the 2.6.17.7 kernel)

# cd /usr/src/linux

# patch -p1 < /path/to/bootsplash-3.1.6-2.6.15.diff

file drivers/char/keyboard.c
Hunk #1 succeeded at 1160 (offset 98 lines).
patching file drivers/char/n_tty.c
Hunk #1 succeeded at 1298 (offset 6 lines).
patching file drivers/char/vt.c
Hunk #1 succeeded at 3238 (offset -22 lines).
patching file drivers/video/Kconfig
Hunk #1 succeeded at 1473 (offset 4 lines).
patching file drivers/video/Makefile
patching file drivers/video/bootsplash/Kconfig
patching file drivers/video/bootsplash/Makefile
patching file drivers/video/bootsplash/bootsplash.c
patching file drivers/video/bootsplash/bootsplash.h
patching file drivers/video/bootsplash/decode-jpg.c
patching file drivers/video/bootsplash/decode-jpg.h
patching file drivers/video/bootsplash/render.c
patching file drivers/video/console/bitblit.c
patching file drivers/video/console/fbcon.c
Hunk #4 succeeded at 1104 (offset -4 lines).
Hunk #5 succeeded at 1729 (offset -6 lines).
Hunk #6 succeeded at 1819 (offset -4 lines).
Hunk #7 succeeded at 1965 (offset -6 lines).
Hunk #8 succeeded at 2083 (offset -3 lines).
Hunk #9 succeeded at 2207 (offset -3 lines).
Hunk #10 succeeded at 2413 (offset -3 lines).
patching file drivers/video/console/fbcon.h
patching file drivers/video/vesafb.c
Hunk #1 succeeded at 167 (offset -34 lines).
patching file include/linux/console_struct.h
patching file include/linux/fb.h

#

b. Now your kernel is patched, its time for us to enable bootsplash in the kernel:

# make menuconfig

Under Device Drivers > Block Devices

<*> RAM disk
(1) Default number of RAM disks
(4096) Default RAM disk size (kbytes) (NEW)
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support

Under Device Drivers > Graphics Support

<*> Support for frame buffer devices
[*] VESA VGA graphics support

Under Console display driver support

[*] Video mode selection support
<*> Framebuffer Console support
[*] Select compiled-in fonts
[*] VGA 8x8 font
[*] VGA 8x16 font

Under Logo configuration

[ ] Bootup logo (Disable it)

Under Bootsplash configuration

[*] Bootup splash screen

Save your new kernel configuration and compile:

# make ; make install ; make modules_install

CHK include/linux/version.h
CHK include/linux/compile.h
Kernel: arch/i386/boot/bzImage is ready (#6)
Building modules, stage 2.
MODPOST
Added Linux *
INSTALL drivers/hwmon/hwmon.ko
INSTALL .....
.
.
if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map 2.6.17.7; fi

#

c. Compile the splash utility:

Navigate to the directory which you extracted the utilities (as a normal user):

$ cd ~/bootsplash/tools/utilities
$ make splash
gcc -Os -Wall -I/usr/include/freetype2 -L/usr/lib splash.c -o splash

Now become root and copy splash to /sbin/ :

# cp splash /sbin/

d. As now everything is in order, let's create our bootsplash configuration:

# mkdir /etc/bootsplash
# mkdir /etc/bootsplash/themes/

After creating directories, copy the contents of ~/bootsplash/themes to /etc/bootsplash/themes directory.
Again, copying with Midnight commander is easiest :)

After copying the contents of themes directory, a directory named Linux will be created at /etc/bootsplash/themes directory.

Let's create our initrd image with splash utility:

Recommendation: if you have a /boot/initrd.splash, remove it before issuing the command above.

# /sbin/splash -s -f /etc/bootsplash/themes/Linux/config/bootsplash-1024x768.cfg >> /boot/initrd.splash

Now, open your /etc/lilo.conf and add three lines:

vga = 791 (under # VESA framebuffer console @ 1024x768x64k line)
append="splash=silent" (under root = /dev/*** line)
initrd=/boot/initrd.splash (under append="splash=silent" line)

and save lilo.conf. after saving, execute the command:

# lilo
Added Linux *
#

and reboot.

Congratulations! You now have a brand new Bootsplash background under your beloved Slackware 10.2 system.
You can change the images of your theme at /etc/bootsplash/themes/Linux/images. Be sure to use:

# rm /boot/initrd.splash
# /sbin/splash -s -f /etc/bootsplash/themes/Linux/config/bootsplash-1024x768.cfg >> /boot/initrd.splash

after changing your images. If for some reason, your image doesn't show up at the console, check the size
of the image, and resave it with gimp. It will work that way.


You may send your problems to texcessive@gmail.com