msgbartop
A cronological documentation test project, nothing serious, really!
msgbarbottom

10 Apr 2011 Enable wireless in Ubuntu 11.04 Beta1 on a HP 8540p

This post is a short description on how to enable the wireless interface on my HP 8540p in Ubuntu 11.04 Beta 1 (Natty Narwal).

A little information about the wireless interface

# lspci
...
44:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)
...

# lspci -n
...
44:00.0 0280: 8086:4239 (rev 35)
...

According to the Debian GNU/Linux device driver check page this wireless interface should use the iwlagn kernel module.

After searching a little i found this forum thread on Ubuntuforums that described this problem quite well.
A short description of the problem is that there is some problems with Wireless N on the iwlagn Intel drivers preventing the interface to function properly.
The solution to the problem should also work on Ubuntu 10.04 and 10.10.

First we determine if the iwlagn module is present on the system

# lsmod | grep iwlagn
iwlagn                333500  0
iwlcore               167503  1 iwlagn
mac80211              294370  2 iwlagn,iwlcore
cfg80211              178528  3 iwlagn,iwlcore,mac80211

You can proceed if the result after running the command contains the iwlagn module

Now we can disable the Wireless N feature in the Intel iwlagn kernel module

# gksudo gedit /etc/modprobe.d/intel_11n_disable.conf

Add the following line to your newly opened file

options iwlagn 11n_disable=1

Save and exit the file.

Unload and load the kernel module

# sudo modprobe -r iwlagn
# sudo modprobe iwlagn

Update initramfs before you perform a reboot

# sudo update-initramfs -u

After a reboot has been performed it’s time to check the wireless interface.

The Wireless network state on my HP 8540p

# sudo lshw -c network

  *-network DISABLED
       description: Wireless interface
       product: Centrino Advanced-N 6200
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:44:00.0
       logical name: wlan0
       version: 35
       serial: 00:aa:bb:cc:dd:ee
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlagn driverversion=2.6.38-8-generic firmware=9.221.4.1 build 25532 latency=0 link=no multicast=yes wireless=IEEE 802.11abg
       resources: irq:48 memory:d3300000-d3301fff

My wireless interface was not enabled so I had to UP it myself.

# sudo ifconfig wlan0 up
# sudo ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:aa:bb:cc:dd:ee
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Now when I perform a lshw command

# sudo lshw -c network
  *-network
       description: Wireless interface
       product: Centrino Advanced-N 6200
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:44:00.0
       logical name: wlan0
       version: 35
       serial: 00:aa:bb:cc:dd:ee
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlagn driverversion=2.6.38-8-generic firmware=9.221.4.1 build 25532 ip=192.168.1.104 latency=0 link=yes multicast=yes wireless=IEEE 802.11abg
       resources: irq:48 memory:d3300000-d3301fff

All I had to do now was to check “Enable Wireless” from the Network menu located on top right of the Unity window next to the clock.

Tags: , , ,

Posted by

12 May 2010 Howto remove orphan packages in Ubuntu

There is usually some orphan packages left on the system after upgrading Ubuntu from one major version to another. These packages can cause strange errors like Ubuntu bug #151045. The solution to this problem is a package named deborphan. deborphan removes orphan packages that are left on your Ubuntu installation and you should run this program after any major Ubuntu upgrade.

Install and run deborphan

# sudo aptitude install deborphan
# sudo deborphan

Result

liblzo1
libdb4.3
libsasl2

These files were listed on one of my Ubuntu 8.04 installations. This installation had been upgraded from a previous LTS version.

All we have to do now is to remove those orphaned packages

# sudo deborphan | xargs sudo aptitude purge -y

This howto has not been tested on a Debian distribution, but I guess it will work there also.

Tags: , , , , ,

Posted by

18 Apr 2010 Ubuntu and clicking sound from the harddrive

I have experienced that my harddrive makes a clicking sound about every 10th second on my Ubuntu 9.10 and a fix to this problem is to disable APM using hdparm.
This behaviour comes from very activ APM modes that some drive manufacturers use and that leads to excessive head parking and can reduce a harddrives life.

You can perform a quick test if your drive is affected by this issue

# hdparm -B 255 /dev/sda

Some harddrives do not accept value 255 (disable APM), then you could try value 254 (almost disabled APM).

A permanent fix to this issue is to add the following line to your /etc/hdparm.conf file

/dev/sda {
        apm = 255
}

In my example the sda drive is clicking. These settings is not active until you have rebooted your machine.

To verify that the value is active you could issue the command

# sudo hdparm -I /dev/sda | grep "Advanced power management level:"

Determine the number load cycles your harddrive has gone through

# sudo aptitude install smartmontools
# sudo smartctl -A /dev/sda|grep "Load_Cycle_Count"

These examples has been tested on my HP 8530p and worked like a charm.

Tags: , , , , , ,

Posted by

12 Feb 2010 Logon to Norsk Tipping using Ubuntu 9.10

This post is a short howto how I managed to use my Ubuntu 9.10 (Karmic Koala) to log on to the web pages of Norsk Tipping using a USB CardMan 3121 buypass card reader and Firefox web browser.

First of all you need to install Java to login to Norsk Tipping webpages.

# aptitude install sun-java6-jre sun-java6-plugin

I got the following error message while trying to login “Feilreferanse 31503″.
Installing the following packages solved the problem and I am now able to use the webpages to Norsk Tipping just like I do in Windows.

# aptitude install libccid libpcsclite-dev pcscd libpcsclite-dev

Tags: , , , ,

Posted by

07 Oct 2009 Create a Debian Lenny installation USB stick

This is a short post that describes how to prepare your USB memory stick for a base installation of Debian Lenny. This will most likely also work on Debian based distributions like Ubuntu.

Download the latest Debian boot.img.gz file

# wget http://people.debian.org/~joeyh/d-i/images/daily/hd-media/boot.img.gz

Download the latest Debian netinst ISO image

# wget http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/debian-testing-i386-netinst.iso

Connect the USB stick in the computer and verify that the drive is recognized in /var/log/messages.

It is now time to write the downloaded files onto your USB stick.

First write the boot information to the stick

# zcat boot.img.gz > /dev/sdb

I am assuming that /dev/sdb is the memory stick. Always check that you are writing to the right device!

Mount the USB stick and copy the installation files from the ISO image

# mount /dev/sdb /media/memstick
# cp debian-testing-i386-netinst.iso /media/memstick

The USB stick is now ready to be used as a boot media just like a CDROM.

Edit:
You can also use UnetBootin, a graphical (GUI) thats lets you choose distributions etc and create a bootable USB stick.

Tags: , , ,

Posted by