Sunday, September 16, 2012

HP 8540w + LinuxMint 13 + un2420 Mobile Broadband Module

My HP EliteBook 8540w comes with un2420 Qualcomm Mobile Broadband Module which requires Gobi 2000 firmware and drivers. Next image shows how does it look like in Windows 7 Device Manager:

 In Windows/Linux dual boot environment if one starts Windows first (with installed drivers for un2420), Windows will preload firmware into un2420 module and it will work fine under Windows. Restarting machine (not truning it off), and starting Ubuntu afterwards will enable Ubunutu to see un2420 module in functional state since the firmware will survive restart and stay loaded inside module.

The problem is when Ubuntu is started first (after machine was turned off), then firmware is not preloaded in un2420 and linux cannot see module ready for communication.

Before loading Gobi firmware into un2420 module LinuxMint 13 Mate recognizes un2420 as (VEN=03f0,DEV=241d):

$lsusb
...
Bus 001 Device 003: ID 03f0:241d Hewlett-Packard Gobi 2000 Wireless Modem (QDL mode)
...


un2420 module LinuxMint setup



First of all one has to copy Gobi 2000 firmware binaries from Windows to LinuxMint. Gobi 2000 dirvers are three binary files;

C:\Program Files\QUALCOMM\Images\HP\0\uqcn.mbn
C:\Program Files\QUALCOMM\Images\HP\UMTS\amss.mbn
C:\Program Files\QUALCOMM\Images\HP\UMTS\apps.mbn


In Ubuntu create /lib/firmware/gobi/ folder and copy firmware files in it.

Then install gobi_loader;

$ sudo apt-get install gobi_loader


Now when you have Gobi 2000 firmware binaries and gobi loader tool installed you can manually load firmware into un2420 device with the following command:

$ sudo /lib/udev/gobi_loader -2000 /dev/ttyUSB0 /lib/firmware/gobi


Now after loading firmware into un2420 module Ubuntu recognizes it as (VEN=03f0,DEV=251d):
:

$lsusb
...
Bus 001 Device 005: ID 03f0:251d Hewlett-Packard Gobi 2000 Wireless Modem
...


Loading of firmware into un2420 will take few seconds and after that the dialog to insert SIM card PIN will pop up.

un2420 SIM unlock dialog

Now you can setup your WWAN device in Network Manager:

un2420 in Network Manager

Friday, September 14, 2012

CentOS 6 / SL 6 / RHEL 6 How to change wireless standard

1.create a file called /etc/modprobe.d/iwlwifi.conf with a single line like this:

options iwlwifi 11n_disable=1

2. Reboot (or "modprobe -r iwlwifi ; modprobe iwlwifi" as root).
This can help in case of problem with iwlwifi driver / card.
 
Found on:  https://bugzilla.redhat.com/show_bug.cgi?id=785239

Wednesday, September 12, 2012

CentOS 6.3 VMware ESXi 5 network interface problem

I’ve been running CentOS on VMware ESXi 5 hosts for quite some time without any problems. However, after updating CentOS 6.2 to CentOS 6.3 (using the trusty-old ‘yum update’) I found myself presented with the following problem after guest OS reboot:
Bringing up interface eth0: eth0: vmxnet_init_ring alloc_page failed.
RTNETLINK answers: cannot allocate memory
This error is typical for driver issues, so I quickly knew where to look.

Original text can be found on location:
http://www.syn-ack.org/vmware/centos-6-3-vmware-esxi-5-network-interface-problem/

Monday, September 10, 2012

RPMFORGE and EPEL Repos on CentOS 6.3 64bit

RPMFORGE:

rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
 
rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

EPEL:

rpm --import https://fedoraproject.org/static/0608B895.txt
 
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
 
rpm -ivh epel-release-6-7.noarch.rpm

Wednesday, August 29, 2012

Using rsync to Mirror Directories

The rsync utility can be used to mirror a directory locally or over a network. As the name implies, rsync synchronizes two directories. Key benefits of the utility include:
  • After the first copy, only differences in files are copied, not the entire file. This saves time and bandwidth.
  • rsync works with ssh so it can copy files securely over a network.
Command Basics and the slash

To copy a directory from one directory to another, they command line would be:
rsync -options --otherOptions sourceDir targetDir

Example 1: rsync -vaz ~/bk/ ~/test

This example copies the contents of the ~/bk directory to the test test directory.

Example 2: rsync -vaz ~/bk ~/test

This example creates a bk directory under the ~/test directory and recursively copies the contents of the ~/bk into this new directory. This is slighly different from the first example.

Command Line Options

A few command line options are listed in the previous example. Each of these options is described below.
Key rsync Options
Option Description
-v Turn on verbose mode
-a This turns on archive mode. Bascially this causes rsync to recurse the directory copying all the files and directories and perserving things like case, permissions, and ownership on the target. (Note: Ownership may not be preserved if you are not logged in as the root user.)
-z Turns on compression during the transfer. This option compresses the data as it is copied over the network.
 
Copying over ssh

To use ssh to copy the files over the network, just add the --rsh option to the command line. Simply specify the ssh command line as shown in the example. Also, to specify another machine as a target, precede the directory target with a host name and a colon.

Example 3: rsync -vaz --rsh="ssh -l username" ~/bk targetHost:~/test
After typing the command line, you will be prompted for your password. After entering the password, the command executes and your files are copied. You can also set the ssh command using the RSYNC_RSH environment variable. You can also avoid entering the ssh password if you use ssh keys.
 
The --exclude Option

This option allows you to exclude certain files and directories from the copy process. You can exclude by specific names or by using wildcards.
Example 4: rsync -vaz --exclude=log/ --exclude=*.xml ~/bk targetHost:~/test
In this example, the log directory is excluded from the copy as well as any file with a .xml extension.

The --delete Option

This option deletes any files that exist in your target directories but that do not exist in the source directory struction. Using this option truly keeps your files synchronized. However, use this option with caution. It can delete a lot of stuff on the target machine if you aren't careful.

Tuesday, August 28, 2012

Centos 6/RHEL install Deluge Bittorrent client from repo

Deluge is a full-featured cross platform  BitTorrent client created in Python. It makes use of libtorrent and features multiple user-interfaces including: GTK+, web and console

Deluge features a rich plugin collection providing much of its  functionality and is made freely available at

http://deluge-torrent.org/ although compiling from source is probably not the easiest way for the average user to obtain it.

It will work with multiple Desktops including, but not restricted to, GNOME, KDE, XFCE, FLUXBOX and others.

It has a large array of features as below

Core/UI split allowing Deluge to run as a daemon
Connect remotely to the Deluge daemon
Web UI
Console UI
GTK+ UI
BitTorrent Protocol Encryption
Mainline DHT
Local Peer Discovery (aka LSD)
FAST protocol extension
μTorrent Peer Exchange
UPnP and NAT-PMP
Proxy support
Web seed
Private Torrents
Global and per-torrent speed limits
Configurable bandwidth scheduler
Password protection
RSS (via Plugin)
Other  libtorrent feature

It has quite a number of dependendies, making it not such a great candidate for a quick compile and install from source, although you are welcome to try if you have a lot of spare time.

Fortunately, the guys at nux-dextop have seen fit to compile a nicely working rpm for Centos 6/RHEL,and this is how I'd recommend installing Deluge.

To obtain the repo first install wget if not installed.

$sudo yum -y install wget                           

$wget http://li.nux.ro/download/nux/dextop/el6/i386/nux-dextop-release-0-1.el6.nux.noarch.rpm

or

$wget http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-1.el6.nux.noarch.rpm

for the repo pack       

$sudo rpm -Uvh nux-dextop-release-0-1.el6.nux.noarch.rpm

to install it.

$sudo vi /etc/yum.repos.d/nux-dextop.repo   

set 'enabled' to '0'

$sudo yum -y --enablerepo=nux-dextop install deluge

After installing a few python packages you are set to go  

To run it just type

$deluge

Autostart

To have it autostart when rebooting (in Fluxbox)

$sudo vi /etc/X11/xinit/xinitrc             add the line

startfluxbox                                save it, then

$vi /home//.fluxbox/startup      add the line

/usr/bin/deluge &                        (with ampersand)

Just before the 'exec fluxbox' line         

If you check 'start in tray' in preferences it will autostart

already in your tray.

Other desktop users can check here

Set it up to open torrent files by default in your browser settings. Typically, when downloading a file in Firefox, just select the 'Open with Deluge' option which should appear. If you do download the torrent file then right click on it and do the same.

Go into preferences where you can set up port forwarding and adjust many other settings to ensure optimum performance of the program.

So this is the simple way to obtain Deluge thanks to the nux-dextop guys.

Monday, August 27, 2012

How to Configure RPMforge Repository on CentOS 6.3

RPMforge repository is a collaboration of Dag, Dries, and other packagers. The default RPMforge repository does not replace any CentOS base packages. This post covers the steps to configure RPMforge repository on linux CentOS 6.3. This steps has been tested on CentOS 6.3 and should be working on Redhat linux Enterprise 6.
1. Download the rpmforge-release package and DAG’s GPG key :
[root@centos63 ~]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
[root@centos63 ~]# wget http://apt.sw.be/RPM-GPG-KEY.dag.txt
2. Install DAG’s GPG key :
[root@centos63 ~]# rpm --import RPM-GPG-KEY.dag.txt
3. Verify the rpmforge-release package that you have downloaded :
[root@centos63 ~]# rpm -K rpmforge-release-0.5.2-2.el6.rf.i686.rpm
rpmforge-release-0.5.2-2.el6.rf.i686.rpm: (sha1) dsa sha1 md5 gpg OK
4. If ok, proceed to install the rpmforge-release package using this command :
[root@centos63 ~]# rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm
Preparing...                ########################################### [100%]
   1:rpmforge-release       ########################################### [100%]
5. Proceed to configure RPMforge repository. Open the RPMforge configuration file and insert “priority=3″ after “enabled = 1″ in the [rpmforge] section as below :
[root@centos63 ~]# vi /etc/yum.repos.d/rpmforge.repo
### Name: RPMforge RPM Repository for RHEL 6 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
priority = 3
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
 
[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
 
[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
6. Check the updated repository list in /etc/yum.repos.d using the following command :
[root@centos63 ~]# yum repolist
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * extras: mirrors.hostemo.com
 * rpmforge: mirror.oscc.org.my
 * updates: mirrors.hostemo.com
repo id                                    repo name                                          status
CentOS6.3-Repository                       DVD-CentOS6.3 repository                           4,776
base                                       CentOS-6 - Base                                    4,776
extras                                     CentOS-6 - Extras                                      4
rpmforge                                   RHEL 6 - RPMforge.net - dag                        4,448
updates                                    CentOS-6 - Updates                                   202
repolist: 14,206
7. You can start using RPMforge Repository on your RHEL 6 or CentOS 6 linux server :
[root@centos63 ~]# yum install clamd -y

How to use DiskSpd to simulate Veeam Backup & Replication disk actions

This HOW-TO contains information on how to use Microsoft© DiskSpd to simulate Veeam Backup & Replication disk actions to measure disk pe...