Thursday, September 29, 2011

Linux Anti-Virus: Klamav

For a number of reasons, I reinstalled Linux openSUSE 11.4, which then meant reinstalling all the apps, including clamav, the popular anti-virus app for Linux.

This time I discovered klamav, a KDE GUI for the underlying command line interface (CLI) clamav. (There is also a Gnome GUI, but I haven't used it yet.)

klamav is a true pleasure. Very well thought out and complete, as far as it goes.

And it goes quite a way.

Use it to:
  • Schedule virus scans on any number of directories, either recursively or not: it has a very easy functional decomposition tree of the directories. If you want to go recursively there is a simple click box: click it and any particular directory in the tree and all the children are automatically checked.
  • Conduct a scan immediately. Simply click scan.
And much more.

Of course, it has a few problems:
  • It offers only two email programs to be scanned dynamically as the messages arrive: kmail and Evolution. I searched, there was a Thunderbird ("T-bird") addon that supposedly solved this, but it has disappeared for version 7.0. But that doesn't really matter, as you can manually and on schedule do the scan, as noted above. And frankly, dynamic scanning is an exercise in paranoia for most Linux users...
  • It tags and (with your permission) quarantines the entire subdirectory containing a suspect file. And it does this by default if it finds stuff it doesn't understand, like any binaries or encrypted files. But this is not a problem unless you are doing a lot of encrypted PDF and binary transfers by email, which you shouldn't be doing anyhow. Use http, ftp, BitTorrent, or whatever else, not email... And even then, it has a 'way cool "check it out" feature: once the files/messages are quarantined you can right click to have their "problem" checked out online, (I found the google link the most helpful), and then with one click, restore them.

    Most of the problems were of the "not understood" variety. I did find one file that possibly had a real virus, and deleted it.
    But it would be nice if the author were to enable quarantining just the single offending file (rather than the entire subdirectory) and include Thunderbird in his list of supported email clients, or else offer a website posting on what it would take to create a filter to do so...

    So very well done, and well recommended. Infinitely better and easier than struggling at the CLI.

    Saturday, July 30, 2011

    Screwtape Zero, Andy One


    This summarizes the features of the fresh water system in M/V Pilgrim and measures taken to repair the problem of the fresh water pump failing to turn on until pressure is non-existent.

    The freshwater pump was replaced in July 2010. The water pressure was falling to 0.5 bar before the pump would come on. It would then cut out at 1.7 bar. If you were in the shower you would have to get out of the shower to open the sink tap to trigger the pump to come on so that you could complete the shower.

    At the end of the day, the problem was the selection of pressure switches. The original installation had an outboard pressure switch installed, but the new pump had an integrated switch. Loathe to foul things up I installed the new pump without modification, bypassing the outboard switch and using the integrated switch. It turns out that the pressures on the integrated switch are too low for our needs so we needed to reinstall the original outboard switch.

    The second problem was determining maximum system pressures. There are at least six different choices, depending on which component you examine. Documentation is poor. We were unable to find documentation for the installed semi-rigid blue piping, but research indicated that most PVC piping can sustain pressures much higher than the accumulator tank (10 bar) or installed pressure gauge (4 bar). So in the end we adopted the maximum of the installed pressure gauge.

    The third problem was then adjusting the outboard switch to fall within this range of pressures. We were not able to determine whether the switch had differential setting capabilities so had to experiment. It appears that it does not. Thus we had to settle for a 2.0 bar differential between cut-in/-out. The “green zone” maximum of 2.5 was adequate but this would cause a 0.5 bar cut-in, which is too low. So we accepted 1.2/3.2 bar.

    A remaining problem may be final tweaking of the accumulator tank air pressure. It should be 0.15 bar below the pump cut-in switch. We have it somewhat less than that.

    And then finally we need to investigate why the hot water side is substantially lower than the cold water. But tomorrow is another day.

    It all looks terribly simple in the result, but life is easy when you know how and terribly difficult when you do not.

    I do now know how, at least on this bit.

    We have cut-in at 1.2 bar, cut-out at 3.2 bar, well within the pressure limits of the installed pressure gauge, accumulator tank, piping, and pump. And we no longer have to get out of the shower to open a tap to trigger the pump. Life is good.

    Full report at
    http://tinyurl.com/3j42vhp

    Friday, July 29, 2011

    Screwtape one, Andy zero

    Well maybe not.

    There were just too many moving parts, too many things amiss, so I have decided to stay until next summer.

    In the meantime, working to fix stuff.

    Starting with the anchor windlass. But the switch had packed up. So I ordered a new one.

    Incredible but true: there seem not to be any shops in London into which you can walk and obtain a part or a tube of caulking. So it is all by mail order, with the attendant delay.

    So we got the new switch, but it requires NON-silicone caulk, so we're waiting for THAT by mail.

    OK, then let's attack the water system.

    Sigh. See the attached report.

    OTOH, I get to stay in London.

    So who really won?

    Life is tough when you pay attention.

    Saturday, July 23, 2011

    Screwtape doesn't want us to leave London

    http://www.metoffice.gov.uk/weather/marine/shipping_forecast.html#All~All
    
    Oh well... :-( We wouldn't have gone anyhow, even if the windlass HADN'T packed up. Force EIGHT!! Good grief!! That's FORTY KNOTS!
    
    http://en.wikipedia.org/wiki/Beaufort_scale
    
    Gentlemen do not sail to windward. It tends to get rough and sloppy and spills the champagne and hors d'oerves, and that's simply not right.
    
    Especially at forty knots.
    
    !!!  
    
    Screwtape definitely doesn't want me to leave.
    
    In my underway checks I fixed the wrench for the cooling system, but then found that the transfer valve was frozen. So I worked that with WD-40 for a while and then it broke free - literally, with an ominous "crack" sound. Now it is *too* free. So I need to finish checking that out to see if I need to replace the valve.
    
    As for the windlass, the circuit breaker had tripped, but when I reset the breaker I found the foot switch had packed up in the UP ON position, so the windlass was continually on, even though the anchor was fully up. So I need to replace the switch.
    
    And then the cooling system cap was leaking - the gasket had expired, so I trekked to Halfords on One Mile Road. Mine is set for 19 psi but the biggest they had was 13  psi. So I bought it and then swapped out the gasket...
     
    Wow. When you go past Wapping suddenly you are in Pakistan... THAT was an experience...
    
    And then there are three connectors on a wiring harness that are dangling loose. I don't know what they are for but have kind of figured out they are connectors for a module that is not installed. But I need to confirm that,  with either the manufacturer or experimentation.
    
    And then there is the deck washing pump that brings up seawater to wash the decks, it isn't pumping except a trickle...
    
    These things happen with boats when you don't use them for a while ...
    
    So I'll get all these squared away and if there is still time head out, otherwise will leave the boat here for another year and have it all squared away and ready to sail NEXT summer...
    
    I really got spoilt having it in NL under the care of the marina - so much so that I have forgotten a lot of the details. I have them in my files but am now refreshing myself.
     
    The more you know the more you know how little you know. 

    Thursday, July 21, 2011

    Travels with Mobile Broadband

    We're on travel in the UK aboard a boat in St. Katherine's Dock, London. There are some 33 different WiFi access points, the stronger two being Boingo.com and WiFiHotzone.com. But even these have spotty connectivity. So we sought a different solution. This relates our trials (and success) in employing "Mobile Broadband" solutions.

    One alternative to WiFi is to use 3G Mobile Broadband "dongles" offered by BT, Vodafone, ThreeNet, and others. We chose Vodafone, which currently (July 2011) offers the ZTE K3570-Z "dongle".

    These dongles are essentially a cellphone on a USB stick. They appear as a CD ISO containing Mac and Windows software but then are "Modeswitched" to appear as serial modems. This is all bleeding edge technology: easy if you know how but frustratingly difficult to figure out how if you don't. It took us about a week of experimentation and googling to finally crack it.

    Part of the problem is the "can't get there from here" problem: You need to download software to install to have the thing work, but if you can't get it to work you can't connect to download! The WiFi connections have a very short timeout, the native Windows apps are huge (88MB). So finding an amazingly simple solution is amazingly difficult to do. But we did and here is how.

    First, do your homework. We went around Robin Hood's barn but by then had learned enough to be able to responsibly get an appointment with a Vodafone technician at one of the stores. The first thing he did was transfer the 88 MB software and set it up on Windows (We're running Windows XP on VirtualBox). But then two hours elapsed while he fiddled with APNs, PINs, passwords, and other things, none of which worked. So as it was time for lunch I thanked him for his time and for the software and left.

    When I got home the first thing I discovered was that he had created a second modem. I deleted it and off we went - but on Windows. Still no joy on Linux.

    There is a site (http://www.betavine.net/) that offers a bunch of Linux programs under a Vodafone logo but they are for the older Huawei modems and don't seem to work with my unit.

    But finally I found

    They have two programs: one with and one without the usb-modeswitching software. The latter uses the modeswitch software installed on your system, the former provides its own.
    • Full version embeds latest Usb-ModeSwitch version along with its device database. You should choose it if your distribution does not provide a recent Usb-ModeSwitch version, and you intend using a switchable USB modem.
    • Binary free version is architecture independent but it requires Usb-ModeSwitch being installed on your system.
    I first installed Sakis3G binary free. It connected to "Interface #3" but no packets were exchanged and ping did not respond from the gateway.

    So I deleted that and tried the full version.

    Still no joy. It connected to the network but no communications occurred. Checked the firewall, no problem...

    But then I realized that knetworkmanager was still running. Shut it down, tried again, success!

    Woohoo! Finally!

    There are some tricks picked up in the earlier travels (travails?):

    • Run the command as root. Getting the root password doesn't seem to work on my system.
    • Get the correct APN. Sakis3G helpfully lists the various options for vodafone. In my case it is the "new" PAYG APN: ppbundle.internet
    • Get the PIN and PUK codes printed on the back of the SIM card card before you throw away the residue! If you fail in this regard (throw away the residue before recording the PIN and PUK) you can read the phone number off the SIM then use the Vodafone site to request the PIN and PUK(assuming you can get some connectivity to reequest them). The PIN is 0000 by default.
    • Get the correct phone number to dial. In my case it was *99***6#. The dongles have a number of different "connection profiles" (sets of Internet settings) that vary with manufacturer and service. Here the 6 refers to the sixth connection profile.
    • Consensus of my research is that /dev/ttyUSB3 is the only one, of the five serial ports generated, that responds. Presumably this is the only one that corresponds to a modem interface on the ZTE K3570-Z.
    • Make sure you have changed the network to NOT use a network manager. Under openSUSE 11.4 this is accomplished with yast2 network > Network card > Global Options > Traditional Method with ifup. You don't actually have to use ifup since Sakis3G does that for you, but you have to do this to allow it to do it for you.

    If you want to learn more about serial ports and modems then Sakis has a comprehensive tutorial at 

         http://wiki.sakis3g.org/wiki/index.php?title=USB_interface


    So other than that, Mrs. Lincoln...

    Easy when you know how.

    Tuesday, April 26, 2011

    Choices

    I need to flash the ROM (Read Only Memory) in my Fujitsu P1630.

    I tried upgrading the RAM (Random Access Memory) to 2GB with third party memory, did not work. I then discovered the statement:

    http://www.vendio.com/stores/Mem-store.com/item/microdimm-memory/2gb-ddr2-microdimm-memory-fuji/lid=7509034
     
    It says I may have to reflash my BIOS to make the new memory work. 
     
    There is an excellent utility that creates a floppy image (1.44MB):

        http://www.linuxinsight.com/how-to-flash-motherboard-bios-from-linux-no-dos-windows-no-floppy-drive.html

    The latest (4/26/11) version of the BIOS upgrade program is at

         http://support.fujitsupc.com/CS/Portal/supportsearch.do

    It is

         MODEL #: P1630     BIOS VERSION: 1.10     DATE: 6/26/09

    This includes a program, FlashAid, to run the BIOS update. The README says:

         STARTING FLASHAID:     To start FlashAid and update the BIOS, double click on the     P1630_BIOS_V1.10_FPC46-1582-04.exe BIOS data file that you have downloaded and follow the notes displayed on the screen.

    But the Fujitsu file is 2.3 MB, too big for a DOS floppy.
    So I need a Windows boot disk.

    Allegedly, the Windows XP CD is a boot disk, so if we can boot and mount /data then we can run the program.

    So first move the program to /data/computer/admin and then run the XP disk.

    Well, it does indeed have an option (R) to run utilities, but it does not recognize the hard disk. And the CD drive requires both available USB ports, so we can't mount the outboard USB drive.

    So much for that idea.

    OK, next trick. the Ultimate Boot Disk For Windows (UBD4Win) seems well commended:

        http://www.ubcd4win.com/

    But we are chasing our tail, as it also requires Windows to build the ISO. We may come back here eventually or use a friend's Win machine to build the CD.

    It requires:
         ✓1. CD Burner and blank CD
         ✓2. Windows® XP CD, with at least Service Pack 1
            3. Download UBCD4Win
            4. Run the UBCD4Win EXE file (obviously needs Windows).
            5. Insert your XP CD with SP1/SP2 into a CD Rom drive.
                a. Create a "XPCD" folder on one of your internal hard drives.
                b. In Windows Explorer, select from the menu: Tools > Folder Options > View tab.
                c. Check that the [show hidden files and folders] radio button is selected and the [hide protected operating system files] is unchecked.
                d. Now copy the folders and files from your CD drive to the "XPCD" folder on your hard drive.
            6. Launch UBCD4WinBuilder.exe (located in your C:\ubcd4win folder)

    And much much more (another nine huge steps...)

    OK, but think again.

    Now, Wine is just an API, right? So if the EXE will run on wine will it access the hardware directly?

    OK, give it a try, if you don't hear from me soon it didn't work and I'm reinstalling openSuSE 11.4.  But I've read my email, backed up everything, so give it a shot:

    Hang on, no guts no glory. Let's try it first on the P1610!

    Well, that doesn't work because there is no ROM update for the P1610 and, besides, we have already seen that the memory works there.

    So the options are:
    • Gamble with wine
    • Go through the complicated UBCD4Win routine
    • Bite the bullet and get the memory from Fujitu (demanding in advance that they assure us it will work without a ROM flash)
    • Put it off for another day
    I vote for the last.

    I only need it if I'm trying to run Windows interactively with Linux; otherwise it swaps Linux to disk or is not needed at all. The Fujitsu price is almost half way to the price of a new complete tablet, so I'd be better off spending the money there, once I have it (which I don't right now).

    So onward to other mysteries...

    Friday, April 15, 2011

    The entire political process is disgusting. But let's get explicit:

    Today the media are whooping and hollering about "Woohoo! $38 Billion Cut in Spending."

    E.g.,
    http://www.latimes.com/news/politics/la-na-congress-spending-20110415,0,6839980.story

    Come on people, give me an effing break. These are mere spits in the  bucket, whether a risible $38B or the even more risible and infinitesimally small $352M.

    The true answer is that the cuts apparently are less than one thousandth of one percent of the total budget!!!

    Good Grief! And we were going to close down government over that? Democrats, get real.

    Total smoke and mirrors, by their own announcements, if anyone knows how to use a calculator.

    Don't people have a clue as to the magnitude of our debt??? Get a life, shut down the TV, and break out a calculator or spreadsheet:
    • + The total 2011 Federal budget is 3.83 TRILLION
              http://en.wikipedia.org/wiki/2011_United_States_federal_budget

    That is:
              3,830,000,000,000          (3.83x10^12)
    • The alleged cut is 38 billion:
              38,000,000,000               (3.8x10^10)
    • The ratio (cuts divided by Federal):
              0.010                                (That is less than ONE PERCENT: 10^(-2))

    Even if it is true.

    Which apparently it isn't:
    http://www.npr.org/blogs/itsallpolitics/2011/04/14/135404502/how-washington-turned-38-billion-into-352-million

    So now the math is
    • Analyzed cut is 352 million:
              352,000,000                    (3.52x10^8)
    • The true ratio (true cuts divided by Federal budget):
              0.000092                         (9.2x10^(-5) Less than one thousandth of one percent)

    Good grief!!! Can I stop laughing now? This is extremely risible.

    And therein lies the problem.

    There it is again, that 98th percentile number:
    • 98% of the population haven't a clue what risible means. 
    • 98% of that population don't care.
    • 98% of those don't have a clue where to go to find out. Even if they cared.
     How can we quantify risible to the third power?

    Shame, shame, shame.

    But you can't shame people who have no pride and no self-respect. Which is the category into which I place the majority of our current political leadership.