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: aptitude, deborphan, howto, Ubuntu, ubuntu hardy, xargs
Posted by Hans-Henry Jakobsen
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: 8530p, APM, hdparm, HP, smartctl, smartmontools, Ubuntu
Posted by Hans-Henry Jakobsen
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: 9.10, Karmic Koala, norsk tipping, sun java, Ubuntu
Posted by Hans-Henry Jakobsen
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: Debian, howto, memory stick, Ubuntu
Posted by Hans-Henry Jakobsen
I’ve recently experienced that my workstation (Ubuntu Jaunty Jackalope, 9.04, x86_64) “hangs” periodically when my internet browser, Mozilla Firefox, has a lot of active tabs.
In my case I had > 100 active tabs in more than 20 windows. I know I should have closed some of them but that is not an option right now.
The problem reveiled itself doing a dmesg on my workstation
# dmesg [1737157.057528] nf_conntrack: table full, dropping packet. [1737157.160357] nf_conntrack: table full, dropping packet. [1737157.260534] nf_conntrack: table full, dropping packet. [1737157.361837] nf_conntrack: table full, dropping packet. [1737157.462305] nf_conntrack: table full, dropping packet. [1737157.564270] nf_conntrack: table full, dropping packet. [1737157.666836] nf_conntrack: table full, dropping packet. [1737157.767348] nf_conntrack: table full, dropping packet. [1737157.868338] nf_conntrack: table full, dropping packet. [1737157.969828] nf_conntrack: table full, dropping packet. [1737162.214064] __ratelimit: 53 callbacks suppressed
This bahaviour looks like Denial-Of-Service and is caused by a full iptables connection_table.
The default size of the iptables connection tracing table is
# cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max 65536
The solution I went for was to double the size of connection table to 131072 and restarted firefox.
# echo "131072" > /proc/sys/net/ipv4/netfilter/ip_conntrack_max
This value is a 32-bit integer so the table size can be quite large and you will need much more RAM before you can use this size.
To make this solution permanent I added the following line to /etc/sysctl.conf
net.ipv4.netfilter.ip_conntrack_max = 131072
You can test this by executing the following command
# sysctl -p 131072
This command loads the /etc/sysctl.conf settings.
Tags: iptables, Ubuntu, ubuntu jaunty
Posted by Hans-Henry Jakobsen