Tuesday, October 06, 2009

Mark Shuttleworth chat

Went to a Mark Shuttleworth talk in the London BT building near St. Paul's cathedral. The chat was about open source in the enterprise and was a good chance to hear someone who actually made his own company and is helping the Linux community.

Friday, August 07, 2009

Installing VirtualBox Guest Additions on Centos

Notes from:
http://forums.virtualbox.org/viewtopic.php?t=4960

Log in as root and type in terminal:


yum install gcc -y
yum install kernel sources -y
yum install kernel-devel -y



Restart the system.
Mount the VboxGuestAdditions.iso.
Move to the following directory:


cd /media/VBOXADDTIONS_2.2.4_47978



As root execute:


sh ./VBoxLinuxAddtions-x86.run



Restart the system again and good luck!

Thursday, February 19, 2009

Home wirelss network with a Cisco Aironet 1130AG

The office drop a Cisco Aironet 1130ag as they upgraded to a newer release and I was able to get hold of it. I am still trying to learn more about Cisco and hope to have my CCNA in a few months and I tested this new toy with great success..

To start, I flatshare and the broadband connection in my place is shared with other people. The access point from my ISP is on a comon room and I use wireless desktops and laptops. My test environement for the Aironet was the following:



This is read as follows:

I use an Ubuntu box as my desktop connected to the "home" wireless network. This desktop has a nic connected to a small 100Mbits switch on a "private" network. To this switch I connected a small Cisco 805 (also discarded away by my company) that I use to play with "cisco" and as DHCP server. Also connected to the switch I have a Winblowz desktop to run those win32 applications I cannot get rid off and I connected the Cisco Aironet 1130AG to it. The Ubuntu desktop is my gateway to the "home wireless network".

I know I could use the Ubuntu box also as DHCP but .... I wanted to play with Cisco and once that was working (quite easy by the way). I never removed it.

Now.. the plan was to have my private wireless network away from my "flatmates" that I could use with my laptop. At the same time I wanted to surf the net so using the existing configuration would allowed me connect to the "private wireless network" by the Aironet, use the Ubuntu box as gateway (as I do from the windoze box) and jump to the "house wireless network" to get into the internet.

All this was quite easy. Old post on this site shows how to configure the Ubuntu box as gateway and how to configure the Cisco 805 as DHCP server and now will write down the configuration of the Cisco Aironet 1130AG I used (that I got from this site).


To start...

a) connected a console cable to the Aironet and to your pc serial port. I used the ubuntu box and minicom.

b) connected the aironet to the switch using a straight through cable.

c) powered on the aironet and log in with privileged mode. It seems the default password is "Cisco".

d) to have WEP enabled just configure the following:


dot11 ssid myssid
authentication open
guest-mode
!
dot11 network-map
power inline negotiation prestandard source
!
!
username Cisco password 7 1531021F0725
!
bridge irb
!
!
interface Dot11Radio0
no ip address
no ip route-cache
!
ssid myssid
!
speed basic-1.0 basic-2.0 basic-5.5 basic-11.0
station-role root
rts threshold 2312
bridge-group 1
bridge-group 1 subscriber-loop-control
bridge-group 1 block-unknown-source
no bridge-group 1 unicast-flooding
bridge-group 1 spanning-disabled
!
interface Dot11Radio1
no ip address
no ip route-cache
!
ssid myssid
!
no dfs band block
channel dfs
station-role root
rts threshold 2312
bridge-group 1
bridge-group 1 subscriber-loop-control
bridge-group 1 block-unknown-source
no bridge-group 1 source-learning
no bridge-group 1 unicast-flooding
bridge-group 1 spanning-disabled
!



The aironet has 2 anthenas Dot11Radio1 and Dot11Radio0 for 802.11a/b/g and they are bridged to fastehternet0 therefore the ip given by the DHCP server is also the same for the wireless interfaces.

As you can see that was it.. quite simple but I guess once I get on with my CCNA and start knowing more about Cisco config I will be able to do more interesting stuff... (radius authentification for example).

This was as good thing to play with and I am sure I will be able to use the Aironet wireless in a best example in the future as right now is just to play around.







Links:
http://www.cisco.com/en/US/docs/wireless/access_point/12.3_7_JA/configuration/guide/s37frst.html#wp1036371

Saturday, January 10, 2009

My notes on Virtualbox in Windows xp

I installed Virtualbox 2.1.0 on my Windowz laptop (new office laptop with +3GB the ram) and I will install Debian etch images on it.

The "host" software installation is quite simple and the "guest" installation is straight forward both on Windowz or Debian.

One note, during setup try set the directory where to install the virtualbox images (.vdi files) on a c:\virt_images directory or similar. The reason is that the default is in your %HOMEDRIVE%HOMEPATH%\.VirtualBox\Hardrives directory that works fine but if you try to clone it using the vboxmanage clonehd the name will bring up some errors.

Example:


C:\Program Files\Sun\xVM VirtualBox>vboxmanage clonehd C:\Documents/and/Settings\username\.VirtualBox\HardDisks\debian_1.vdi C:\Documents/and/Settings\username\.VirtualBox\HardDisks\debian_2.vdi
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

[!] FAILED calling virtualBox->OpenHardDisk2(src, srcDisk.asOutParam()) at line
372!
[!] Primary RC = VBOX_E_IPRT_ERROR (0x80BB0005) - Runtime subsystem error
[!] Full error info present: true , basic error info present: true
[!] Result Code = VBOX_E_IPRT_ERROR (0x80BB0005) - Runtime subsystem error
[!] Text = Could not get the storage format of the hard disk 'C:\Documents\and\Settings\username\.VirtualBox\HardDisks\debian_1.vdi' (VERR_PATH_NOT_FOUND)
[!] Component = HardDisk2, Interface: IHardDisk2, {ed6e2525-c2fd-42a4-917a-7a9045ac9e15}
[!] Callee = IVirtualBox, {339abca2-f47a-4302-87f5-7bc324e6bbde}

C:\Program Files\Sun\xVM VirtualBox>



You can solve this by simple adding "" on the file paths



C:\Program Files\Sun\xVM VirtualBox>vboxmanage clonehd "C:\Documents and Settings\username\.VirtualBox\HardDisks\debian_1.vdi" "C:\Documents and Settings\username\.VirtualBox\HardDisks\debian_2.vdi"
VirtualBox Command Line Management Interface Version 2.1.0
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: e78ab4e8-5666-4bea-a592-b277265c5b19

C:\Program Files\Sun\xVM VirtualBox>




Moving forward, once Virtualbox is installed you can install Debian as normal on one of the images. It will ask for a name, type (linux, windows, etc), memory amount and hard disk image. As it is a new installation we create a new one.

Debian installation is as normal and you shouldn't have any problem. Note I change the networking settings from "NAT" to "host interface" so I can have an IP from my dhcp server and be able to ssh to the "virtual disk".

Once you have Debian installed you need to install "Virtualbox Guest Additions" on it. This was the tricky part for me, the host box would have an iso that can be mounted "dinamically" by going to the "Devices/Install Guest Addtions" guest window menu and it should mount the iso automatically on /media/cdrom but it my case it didn't work. To solve this I install ssh - apt-get install ssh - and copy the iso image from my windows host to the debian guest.

Next I did a:


apt-get install gcc
apt-get install build-essential module-assistant



Next step is buidling the kernel modules


m-a prepare



Next mount the iso file sftp before to you disk:


debvirt01:~# mount -o loop -t iso9660 /home/ricardo/VBoxGuestAdditions.iso /media/cdrom



And finally run the Virtualbox setup:


debvirt01:~# cd /media/cdrom
debvirt01:/media/cdrom# ls
32Bit VBoxLinuxAdditions-amd64.run VBoxWindowsAdditions-amd64.exe
64Bit VBoxLinuxAdditions-x86.run VBoxWindowsAdditions.exe
AUTORUN.INF VBoxSolarisAdditions.pkg VBoxWindowsAdditions-x86.exe
debvirt01:/media/cdrom# sh /media/cdrom/VBoxLinuxAdditions-x86.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 2.1.0 Guest Additions for Linux installation.......................................................................................................................................................................................................
VirtualBox 2.1.0 Guest Additions installation
Building the VirtualBox Guest Additions kernel module...
Building the shared folder support kernel module...
Installing the VirtualBox Guest Additions...

Could not find X.org or XFree86 on the guest system. The X Window drivers
will not be installed.
debvirt01:/media/cdrom#




Ok, that's it. It should fully work now (The x window drivers message is due the fact I didn't install anything else on my original debian install)

To check the modules are running you can do the following:


debvirt01:~# dmesg | grep vbox
vboxadd: Successfully loaded version 2.1.0 (interface 0x00010004)
vboxvfs: Successfully loaded version 2.1.0 (interface 0x00010004)
debvirt01:~#

user@debvirt01:~$ lsmod
Module Size Used by
vboxvfs 41504 0
vboxadd 62816 2 vboxvfs
user@debvirt01:~$




Last thing, I couldn't boot the the image cloned from the original. Both grub and lilo fails to boot and I don't know who to restore fix it. I am trying to find out how to boot with a rescue disk on the "virtual" box and try to restore grub but couldn't find out how yet. Any notes let me know..

---- out of topic -----

Debian Lenny has packages that helps on the process above but when addng the repository on source.lists and running an apt-get update we get the following error:


debvirt01:/etc/apt# apt-get update
W: GPG error: http://download.virtualbox.org etch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY DCF9F87B6DFBCBAE
W: You may want to run apt-get update to correct these problems
debvirt01:/etc/apt#




This error is the following: "Those are just letting you know the GPG keys arent saved to the disk. The mastering process for some reason deletes the additional keys.....The problem being the sites change gpg codes constantly.."

To solve it just run the following command:



debvirt01:/etc/apt#
wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc \
-O- | sudo apt-key add -



You will be able to run apt-get update normally and therefore retrieve the necessary virtualbox packages.

Other link with details:

http://johnbokma.com/mexit/2008/11/27/virtualbox-puel-ubuntu.html

Sunday, January 04, 2009

Adding a css to my blog

I noticed that I don't find optimal to find what is commands entry from clear text on my blog so surfing around I found this css entry that I am will start applying whenever I enter a command or code to the page.

On Blogger, on the Layout tab I selected "edit html" and added the following:

/* Added by RB
----------------------------------------------- */

.command{ padding:1em;
border:1px
dashed #2f6fab;
color:black;
background-color:#f9f9f9;
line-height:1.1em;
font-family:Courier New,Courier,mono;
font-size:12px;
font-style:italic
}

Example:

tar -xzvf speex-1.2rc1.tar.gz



:)