Cleanup After Linux Kernel Updates 1

Posted by John 30 Jan 2010 at 08:49

If you run Ubuntu Server LTS releases like I do, you are probably wasting disk space and, because of that, backup storage because old files tied to old kernels aren’t cleaned up automatically.

After locating and cleaning up the old kernel files, I regained over 1GB of space. I was getting low on storage on / otherwise I wouldn’t have bothered.

First Method – Package Manager

When you use a package manager for installations, you want to use it for removals too.
First, I want a list of installed kernel specific packages

sudo dpkg-query -l | egrep -i ‘2.6.17|2.6.2[0-3]’

Ouch. That’s a big list with many old, unused packages still installed. If you have Synaptic installed, using the search in that tool will let you easily multi-select packages for removal. Without X/Windows, you’ll be at the command line with me. Time to start removing them with cmds like this.

sudo apt-get remove linux-source-2.6.17 vmware-player-kernel-modules-2.6.17-10 xen-image-xen0-2.6.17-6-generic-xen0 linux-image-2.6.20-17-generic linux-restricted-modules-2.6.20-17-generic

Package managers remove libraries and programs, but avoid removing configuration files, since the next version of a tool probably needs them. If you are truly removing an application, you’ll probably want to purge the install to remove the conf files too.

Second Method – Find and Locate

I use locate and updatedb. I can’t imagine running servers without these tools. To start, I wanted a list of locations to look through and determine how much waste I had. On the server, we are using kernel 2.6.24-26-generic today. To find almost all the files, use

locate  2.6.24 | egrep -vi /backup > /tmp/old-kernel-files

These commands return a list of files, remove backups from that list and put the list into a /tmp file for reference.

On my Ubuntu system, files were located in:

/boot
/lib/modules
/lib/firmware
/linux-restricted-modules/
/usr/src

I had about 10 old kernels lying around beginning with 2.6.17. Because I wanted to be very careful with removing these files, I manually typed the cleanup commands in each directory. A few examples:

sudo rm -rf 2.6.17-*
sudo rm -rf 2.6.24-2[3-4]*
sudo rm -rf linux-headers-2.6.17-1*
sudo rm linux
sudo rm -rf linux-source-2.6.17 orig-linux-headers-2.6.17-10*

Definitely be careful. It is easy to remove the wrong files by accident with a bad pattern.

Good luck getting that space back!

Does Windows7 Run .... X

Posted by John 29 Jan 2010 at 07:38

I follow a few email lists. Whenever they list is not related to Linux, there are always MS-Windows questions. With the release of Windows7, more and more of those questions are about specific software working under Windows7, especially when there were issues under Vista. Most of this article was taken from an email concerning Investors Toolkit, TK6, and whether it will run on Win7 on a Netbook.

The Questions

Can Window7 run … whatever-program

Top Old School UNIX Tools I Can't Live Without

Posted by John 27 Jan 2010 at 09:58

  1. tcsh – the one true shell (bash is workable)
  2. ssh
  3. perl
  4. locate
  5. vim
  6. cron / at
  7. aliases – mainly to correct common misspellings
  8. egrep
  9. pushd/popd
  10. find
  11. man

Solved - Dell Studio 1535 Keyboard Issues

Posted by John 27 Jan 2010 at 09:22

When a keyboard misbehaves, it is maddening. My Studio 1535 keyboard has been getting worse and worse the last few days for no apparent reason. Basically, keys get stuck down or refused to work at all. I’m talkin’ bout many keys just not working right, over 10 of them. I figured it was too early for a replacement keyboard – I’ve replace Dell laptop keyboards before, but that was after 3 years of use, not 18 months.

Using the internet, I found a possible fix. It didn’t make any sense, but I needed to try something since it was impossible to type with the issue.

It worked. I’m typing as fast as ever now after taking the following steps.

Pondering File Transfer Speeds 1

Posted by John 26 Jan 2010 at 08:17

I move files around my network alot. Most of the time, these transfers are between wired GigE connected systems and are limited by disk performance, not the network. It is good and fast. Multi-gigabyte files transfer in seconds.

However, there are some tools that only work on Windows and my only Windows machine is a WiFi (G) connected laptop. Yes, I can wire it into the GigE network and see huge transfer speeds only limited by the laptop disk drive, but that is usually not how I do it. Yes, I use WiFi for convenience.

Why is 1 tool 2x faster than others? Why?

Haiti Corruption

Posted by John 25 Jan 2010 at 11:10

The entire world knows that Haiti was hit by an magnitude 7 earthquake recently. This was a terrible disaster.

The Haitian government said in this article that they can lead the rebuilding effort.

Haiti’s government is ranked 168 out of 180 on the Corruption Perceptions Index. Should a government with that level of worldwide mistrust be allowed to manage this amount of money?

Virtualization Primer Found

Posted by John 23 Jan 2010 at 10:05

I came across a virtualization primer

KVM is what Ubuntu 9.10 and later support natively thanks to the additions by the Linux Kernel team. For this reason alone, it makes sense for almost all Linux power users to take a look at KVM as a hypervisor, Dom0, as it were.

Linux Media Server with miniDLNA 3

Posted by John 22 Jan 2010 at 11:23

I received a WD TV Live, TVL, for Christmas to replace my aging MediaGate MG35 network media player. The MG35 is still working and has a nice GUI, but doesn’t support many of the newer media file formats like x264, mkv or high definition content. Also, the MG35 requires anonymous access via samba to the media. I’ve locked it down by IP, but would rather have userid/password controls.

Install miniDLNA instructions below.

32 Million Passwords - Most Bad

Posted by John 21 Jan 2010 at 09:30

Passwords are boring. Knowing how to choose a good password has been covered here and elsewhere many, many times. Yet, most people still don’t choose good passwords.

Today, we’ll take a different view of passwords. What are bad passwords by looking at results from actual passwords used by real people on a web site with 32 million users. The source article.

Top 20 Passwords Used Ranked

How to Reset Adito Passwords 3

Posted by John 20 Jan 2010 at 04:53

The Adito administrator has control over whether users may change their passwords or not. In some situations, an administrator may decide to prevent password changes, so the user may not see that option at all.

If you can’t locate the password reset in the web interface, contact your VPN administrator and ask whether it is possible to change the password with your level of Adito VPN access. Otherwise, the password reset function isn’t hidden.

This article was written based on search results from web search engines.