Everything is Broken

ClamAV reporting Outdated version

May 4th, 2010 admin

Just to remind myself as much as anything, as I’ve been through this a few times. ClamAV was complaining loudly in the logfiles about not having the most up to date ClamAV. I searched around and was pointed to the Debian Unstable repository to /etc/apt/sources.list (Read the whole article before you add this one …there is a better one)

After that, on running apt-get update, you get a message like this:

W: GPG error: http://volatile.debian.org etch/volatile Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY DFD993306D849617

So, take the pubkey number off the end and do this with it.

sudo gpg --keyserver subkeys.pgp.net --recv-keys DFD993306D849617
sudo gpg --armor --export DFD993306D849617 > new.key
sudo apt-key add new.key

I then got a message saying “The following packages have been kept back: clamav clamav-daemon clamav-freshclam”

By using

 sudo aptitude dist-upgrade

(NB aptitude rather than apt-get) the new packages are downloaded. However they’re still not up to the level that ClamAV is telling me to upgrade to.

So, more searching. It turns out the most up to date Ubuntu Repositories are from this page … https://launchpad.net/~ubuntu-clamav/+archive/ppa. In my case the solution was to add these lines to my /etc/apt/sources.list

deb http://ppa.launchpad.net/ubuntu-clamav/ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/ubuntu-clamav/ppa/ubuntu hardy main

And then run through the pubkey process above, with the different pubkey id number. Later distros might get away with the add-apt-key command, but I was running hardy (8.04) on this particular server.

Posted in General IT, Linux, Security | No Comments »

Adventures in unbricking a router

April 7th, 2010 admin

Another fantastic illustration of how Linux ‘gets the job’ done. Although sometimes the operator (ahem) is sometimes a bit slow on the uptake.

Anyway, I had a Linksys WRT54G router in which the wireless unit had blown up after a power outage and surge. Gotta love the Philippines. I had dd-wrt on it, but decided to try out OpenWRT. Well lets just say that OpenWRT isn’t to my taste. I wanted something which worked more or less immediately, rather than poring over documentation trying to figure out how to get the WAN interface up via a command line.

So I dropped the router into a drawer until today, when I needed to use it for something (without the need for wireless). Well of course when I needed it, it wouldn’t boot. In fact I couldn’t even ping it. This is bad news.

I tracked down an internet post which mentioned that if I held the reset button while booting, the router would go into admin mode, which meant I could ping it. I did this and it worked. I read elsewhere that in order to flash it with tftp, I needed to do so when the ping response time was 100ms, before it dropped to 64ms. Exciting stuff. I set up the tftp flashing machine and tried, possibly 50 or 60 times, to flash back ddwrt. No luck. For reference, here is the one liner:

echo -e "binary\nrexmt 1\ntimeout 60\ntrace\nput ddwrt.bin\n" | tftp 192.168.1.1

I did an nmap scan of the router and found that port 23 was open, so I managed to telnet into it. I couldn’t connect the wan interface (as previously noted), but I had a command prompt. No SSH, no web interface. So how to get the ddwrt.bin file onto the router via telnet?

Here’s how: On my PC, at 192.168.1.50, I went to the directory which held the ddwrt.bin file. At the command prompt I typed

python -m SimpleHTTPServer

This serves up the current directory over HTTP, port 8080.

In my router telnet session I went to the /tmp directory (the only place with enough space for the file) and typed

wget http://192.168.1.50:8080/ddwrt.bin

After a few seconds, the file was there! Alright!

Still in the router, I did

mtd -r write dd-wrt.bin linux

The router whirred for a while, rebooted and … ddwrt was back, in all its web-interfacy autoconfigurating glory.

What a great trick with SimpleHTTPServer. Shame I wasted hours on the tftp approach. Incidentally, there’s a similar tool which will let people upload files to your computer via HTTP, called droopy.

Posted in General IT, Linux | No Comments »

One Line Guitar Tuner

March 16th, 2010 admin

Every now and then I come across something which makes me marvel at the flexibility of Linux. This is one of these things.

I play guitar, and I’d previously written a small script to act as a guitar tuner. I generated some .ogg files of the correct pitch and then wrote a script to loop through them in sequence. “Pretty good”, I thought, “Clever Me.”

Then a few days ago I came across this little gem of a script.

for n in E2 A2 D3 G3 B3 E4;do play -n synth 4 pluck $n repeat 2;done

That’s it. Sheer brilliance. Of course you’ll need to install the sox package first.

Posted in General IT, Linux | No Comments »

Ubuntu Firefox’s Tattletale Search Query

April 23rd, 2009 admin

Search SimplificationHave you ever noticed that when you type a search term into the search box in the top right of your Firefox browser, that a load of junk gets added to the search term. For example, you search for ‘banana’ and you get something like this:

http://www.google.com.ph/search?q=banana&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a

Well what you’re effectively doing is giving Google a lot of information for free. Which irritates me. All I really need is this,

http://www.google.com.ph/search?q=banana

and if they really want to know more about me, then they’re welcome to go digging through their logs.

OK its a minor irritation, but one that we can fix! I understand that Ubuntu does it as part of a deal with Google, but there’s no reason why we can’t take matters into our own hands and change the defaults.

Read the rest of this entry »

Posted in General IT, Linux | No Comments »

Counting files in subdirectories.

February 23rd, 2009 admin

ze countOK, it sounds simple, and it probably is if you’re sitting at your desktop with Gnome or KDE fired up. However if you’re looking on a server half way across the world, using the command line its not so easy.

There are a number of tools which are useful in finding out things about your filesystem. ls, du, df are three of them, but sometimes they just don’t give you the information you need. In my case I’m backing up a server to a remote location. The script was timing out becase I was trying to back up too many files at once, so I needed to find the number of files in each subdirectory.

Read the rest of this entry »

Posted in General IT, Linux | No Comments »

Z-star Video Camera working in Ubuntu Intrepid

January 3rd, 2009 admin

At last. Its a lazy Saturday after New Year, and I just got around to fixing another one of the things which broke when I upgraded to Intrepid – the video camera. Actually I don’t really use it much, hence it got dropped to the back of the queue, but its nice to get things working again.

Here’s the relevant info: Read the rest of this entry »

Posted in General IT, Linux | 1 Comment »

Linux Memory Usage Summary Script

November 20th, 2008 admin

I was having trouble with a webserver this week, which I’d just set up for a client. When it went live, it seemed OK initially, but when we left it overnight it curled up its toes and died. It was so dead that I couldn’t even ssh in to reboot it, so we had to do a remote reboot. Crunch.

Anyway, on getting it back up, I poked around in the logs and found that it was running out of memory, which it really shouldn’t do given that it was a fairly low load on the webserver, and only apache, mysql and php were running on it. I looked around the Interwebs and found an excellent resource called Troubleshooting Memory Usage, which gave me some pointers about how to rein in apache and stop it from eating up memory so quickly. Thanks!

Anyway on the page was a script for summarising memory usage, which I thought was a good idea, so i grabbed that one and adapted it to my own purposes. I thought I’d make the results available here, so feel free to grab it and adapt it to your own needs. Read the rest of this entry »

Posted in General IT, Linux | No Comments »

Ubuntu 8.04 to 8.10 upgrade.

November 14th, 2008 admin

A lot of commentators in the blogosphere have shown disappointment at the fact that little seems to have changed with Ubuntu 8.10. My answer to them is that in fact a lot has changed, but not much of it is visible. To my mind a lot of these under-the-hood changes have addressed fundamental issues which needed to be fixed as a priority, so that normal users could just get on with the business of using Linux, rather than scrabbling around in config files.

Also, Ubuntu has an aggressive schedule, which means release are made every 6 months. I believe the purpose of the April (.04) releases is to introduce new features, and the October (.10) release is to refine them and fix any breaks. Compare this approach to Windows or Macintosh, where releases are made around every three years, and you can appreciate that releasing little and often means that changes are more diffuse and less apparent. Read the rest of this entry »

Posted in General IT, Linux | 1 Comment »

Ubuntu 8.04 Dual Head setup on Dell Vostro.

November 11th, 2008 admin

I keep hearing how Ubuntu has finally nailed the dual head hassles of the past, and now you can just plug in an external monitor and go. Alas I’ve never had that experience, either with this Dell Vostro 1400 or either of the two IBM Thinkpads I’ve run Ubuntu on.The IBMs were both 1024×768 resolution, as is my external monitor. The Dell is a less standard 1280×800 resolution. I also, on occasion plug it into my LCD TV, but that’s another story.

Read the rest of this entry »

Posted in General IT, Linux | No Comments »

Ubuntu Touchpad toggle tweak

November 10th, 2008 admin

I’ve been getting irritated with the touchpad on this new Dell Vostro 1400. I type for a while, and then my palm touches the touchpad, sending the pointer skimming into the line above, or clicking on buttons I don’t want to click on. So, I looked around and figured out a solution. Over the past two years, I’ve had to update this post for every single new version of Ubuntu, which has been a pain, so look for the heading below which corresponds to your version of Ubuntu.

Ubuntu Hardy 8.04

First of all, you need to edit your /etc/xorg.conf file, for which you’ll need root privileges – use sudo.You just need to add one line in the input device section, which is the one in bold below. (Intrepid 8.10, see below)

Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
        Option          "HorizEdgeScroll"       "0"
        Option          "SHMConfig"
EndSection Read the rest of this entry »

Posted in General IT, Linux | 3 Comments »

« Previous Entries
  • Recent Posts

    • ClamAV reporting Outdated version
    • Adventures in unbricking a router
    • One Line Guitar Tuner
    • Captcha Madness
    • Ubuntu upgrade 9.04 to 9.10
  • Sing for your supper

  • Static

    • About
    • Privacy Policy
  • Tags

    apathy apple calendar chkconfig collanos cross-platform eee evolution firmware google grub hotspot id card lightning Linux Mandriva notebook partitioning pclinuxos pclinuxos 2008 Philippines power management re-install sane scanner scheduleworld script Security slow sysv-rc-conf thinkpad thunderbird trust ubuntu ultraportable usb virtualisation vmware vpn wifi wireless workspace sharing xsane yahoo zombie
  • Blogroll

    • Datalude
    • Digital Life
    • Engage the World
  • Archives

    • May 2010
    • April 2010
    • March 2010
    • November 2009
    • October 2009
    • June 2009
    • May 2009
    • April 2009
    • February 2009
    • January 2009
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • April 2008
    • March 2008
    • February 2008

Everything is Broken runs on WordPress. Theme by Bob. All content Copyright © Datalude 2008+.

Bad Behavior has blocked 17 access attempts in the last 7 days.