Tuesday, 26 June 2007


Xen is a virtual machine monitor (VMM) for x86-compatible computers. Xen can securely execute multiple virtual machines, each running its own OS, on a single physical system with close-to-native performance.

Xen Wiki

Xen (Wikipedia)



A brief introduction to xen-tools (debian-administration.org)

Installing Xen 3.0 upon Debian Sarge

Gentoo Linux Distribution

Gentoo official page

Gentoo Linux Distribution (Wikipedia)

Gentoo Linux operating system is designed to be modular, portable, easy to maintain, flexible, and optimized for the user's machine. All tools and utilities are built from source code. For convenience, however, several large software packages are also available as precompiled binaries for various architectures via the Portage system.

It is a distro oriented to developers and network professionals. Gentoo at distrowatch

Gentoo Wiki

Packages Online Database.


Downloading Gentoo

Installing Gentoo Handbook

Linux Gazette article about installing Gentoo


HowTo build a LiveCD from scratch (Gentoo-Wiki)


#gentoo at irc.gnu.org


Embedded Gentoo

Gentoo Development Guide

Tuesday, 19 June 2007

File types and Debian packages

This article describes some file types (their extensions) and programs and debian or ubuntu packages to visualize those file types.

File ExtensionProgramDebian/Ubuntu packageFile Description
.chmxchmxchmMicrosoft help files
.djvudjviewdjview / djvulibre-pluginDjvu file format for documents (alternative to pdf)
.rarunrarunrarRar compressed file format
.flvmplayermplayerFlash video file format
.pdfxpdfxpdfPortable Document Format
.docabiwordabiwordMicrosoft Word document format
.gzgzipgzipCompressed file using Lempel-Ziv coding (LZ77) algorithm
.bz2bzip2bzip2Compressed file using Huffman coding and Burrows-Wheeler compression algorithm
.avimplayermplayerAudio Video Interleave File

Audio Video Interleave File'

Sunday, 17 June 2007

Bash tips


Customizing the bash command prompt


Linux Command Reference Index

Another command Reference

O'Reilly Command Reference

GNU/Linux Command Line Tools Sumary

Learning the Shell Tutorial

Changing X resolution

$xrandr #shows all available resolutions
SZ: Pixels Physical Refresh
*0 1024 x 768 ( 271mm x 203mm ) *61
1 800 x 600 ( 271mm x 203mm ) 73
2 640 x 480 ( 271mm x 203mm ) 73

now, to switch to 800x600 resolution we can exec:

$xrandr -s 1


$xrandr --size 800x600

wait for 5 secs and voila! resolution changed!

NOTE: another way to change resolution is pressing ctrl+alt++ or ctrl+alt+- keys

NOTE: this command is very useful to change qemu X-windows resolution when it is bigger than your screen.

Listing file sizes in human readable form:

ls -l # shows file sizes, usually in bytes.

if you want to list them in a more readable way type:

ls -lh

NOTE: this "h" switch option also works with other commands like df, du, etc.

Obtaining an ISO file from a CDRom

You need to now what device your cdrom drive is associated to: (In this example will be /dev/sdX)

exec this command:
dd if=/dev/sdX of=cdrom_image.iso bs=1000000

that makes a byte by byte copy from /dev/sdX device (our cdrom) to cdrom_image.iso file in 1000000 bytes size chunks.

NOTE: Change bs argument to suit your needs. That value has effect on the speed the copy is performed.

Tuesday, 12 June 2007

Resizing partitions with GParted

GParted stands for Gnome Partition Editor

GParted is an industrial-strength package for creating, destroying, resizing, moving, checking and copying partitions, and the filesystems on them. This is useful for creating space for new operating systems, reorganizing disk usage, copying data residing on hard disks and mirroring one partition with another (disk imaging).

Supported Filesystems

Before using GParted we should check if it supports the filesystems we want to deal with:
Filesystems supported

More info about filesystems from Wikipedia.

Getting GParted

GParted is distributed within three ways, as source code, as live cd or as live usb.

I choose to download and use the live cdrom one: GParted Live CD.

So I download and burn it to a writable cd, and then boot my computer from this cdrom.

NOTE: When booting GParted live cd, my tft screen ends black. To solve that, press ctrl+alt+del. Then at console mode exec #Forcevideo and select a supported vesa video mode for the tft.

Sunday, 10 June 2007

Installing Qemu on Windows Vista

Qemu introduction from Wikipedia

QEMU emulates a full computer system, including a processor and various peripherals. It can be used to provide virtual hosting of several virtual computers on a single computer.

Qemu author, Fabrice Bellard, also wrote a Linux kernel module (with preliminary ports to FreeBSD and Windows) named KQEMU or QEMU Accelerator, which notably speeds up i386 emulation on i386 platforms. This is accomplished by running user mode code directly on the host computer's CPU, and using processor and peripheral emulation only for kernel mode and real mode code. KQEMU also supports a kernel emulation mode in which portions of kernel mode code run on the host's CPU

Qemu official page:

Qemu ported to Windows:

First we download a zip package:

Next unzip archives to a folder.

There are some clues at file README-en.txt, and a html manual at qemu-doc.html.

Qemu is now ready to be run:
so exec qemu-win.bat and a small linux test image "linux.img" is emulated.

NOTE: When a mouse cursor is missing, type Ctrl and Alt key together. Please use Alt
and Tab on WindowsMe.

NOTE: To exit from Linux, press Ctrl-Alt-2 keys together then you will see (qemu) prompt.

Then type quit: (qemu) quit

Running Qemu:

I have downloaded a Ubuntu iso cdrom image: ubuntu-7.04-desktop-i386.iso

First I exec C:\Windows\System32\cmd.exe to open a comand line window, and then:
>cd <qemu-directory-path>
>qemu -L . -m 512 -cdrom ubuntu-7.04-desktop-i386.iso

Argument options have the following meanings:
-Lbios pathin our example actual directory "."
-mavailable memoryDefault is 128 meg, I set it to 512
-cdromiso cdrom image pathIso image to emulate a cdrom

Qemu gives this warning:
Could not open '\\.\kqemu' - QEMU acceleration layer not activated

To avoid this message, install qemu accelerator, which will improve qemu speed:
(NOTE: uninstall any previous version accelerator you have before installing this one)
Qemu accelerator Kqemu-1.3.0pre11


Right now we don't have network available. We check at this doc for some clues: HowToNetwork-en.html

I have decided to use a TAP (virtual ethernet network interface) to have full internet access: TapWin32-en.html

First we need a VPN driver for windows: OpenVPN driver download page.
Download and install this program: openvpn-2.0.9-install.exe

Once installed go to Programs menu and then
-> OpenVPN -> Add a new TAP-Win32 virtual ethernet adapter

If all has gone fine, a tap device will appear at:

Control panel -> Network and Sharing Center -> Manage networks

Remember the TAP interface name because it will be passed as an argument to qemu, i.e. in my computer is "Local area connection 2"

Now we have to establish a NETWORK SOFTWARE BRIDGE in windows vista.

Network bridge (Wikipedia)

A network bridge connects multiple network segments at the data link layer (layer 2) of the OSI model.
In our case the bridge will interconnect a real network interface with our TAP interface at data link layer, so both interfaces will share same IP address.

Howto set up a network bridge at windows xp and vista: Win XP network bridge set up.

Select both interfaces pressing ctrl key, and right click the mouse.
Select "Bridge connections" at the pop up menu and wait till network bridge will be completed.

After bridge completion gonna set up its network configuration:
right click at bridge icon -> properties -> Internet protocol version 4

If you have a dhcp server you can set bridge interface to automatically get its IP address.

I use a static network configuration at my LAN.

(change values to suit your network.)


To check the network at console window we can make some pings:
ping (checking gateway)

Time of truth arrives, we launch qemu:
qemu -L . -m 512 -cdrom ubuntu-7.04-desktop-i386.iso -net nic -net tap,ifname="Local area connection 2"

at ubuntu guest system I configure the network with a free IP address on my LAN:
DNS 194.179...

pings work:
ping (checking the gateway)

If you have Internet access through your LAN, you can now open a browser and surf on the Internet from inside your qemu guest system. :-)

More info about bridging:


Qemu HowTo Floppy Cdrom

Friday, 8 June 2007

Debian GNU/Linux Distribution

Debian GNU/Linux is an complete Operating System based on the Linux kernel(there are also other platforms available).

It is developed in an open way by volunteers all over the world.

Debian (from Wikipedia)


These documents describe Debian philosophy.

Debian Manifiesto
Debian Social Contract - Describes Debian Goals.
Debian Free Software Guidelines - Requirements software has to accomplish to be accepted as Debian Free Software.

Debian currently provides over 26000 software packages, and targets eleven hardware architectures.

Ubuntu distro and others like Damn Small Linux, Knoppix, Xandros, etc are Debian based distributions.


Debian has three main branches: unstable (sid), testing and stable.

The stable one is suited for server environments. Packages at this version are frozen, and there are only security updates. (Debian Security Faq)

Usually newer software package versions are added to the unstable branch. If no serious bugs are found, after some time, the package migrate to testing branch (its dependencies also have to be in the testing branch).

Stable branch regularly receive security updates. Using Debian Sid (unstable) means that you have the latest package versions at the cost of stability and security.

Debian repositories are separated into several categories:

  • main
  • contains the main Debian repository.

  • contrib
  • contains software deployed under a free license but with non-free dependencies.

  • non-free
  • software that does not adhere to Debian free software guidelines.


APT (Advanced Packaging Tool) is the Debian Package Management System. It is a user interface to some libraries that deal with software installation.

It comprises a set of tools. e.g: apt-get, apt-cache, apt-cdrom, ...

APT tracks dependency problems, performing installation and removing of packages in the most suitable order. When you install a package APT automatically installs all required dependencies. APT allows installing packages via network.

Apt, Aptitude, Dpkg Reference Article.


Documentation about creating and maintaining Debian packages.

Developer manuals

Debian New Mantainers' Guide


Debian Wiki

Debian Reference (debian.org)

Debian FAQ

Getting support for Debian GNU/Linux.

Debian package list

Debian Forums

Debian Administration


#debian irc channel at irc.gnu.org server.