Content here is by:
Michael Still
mikal@stillhq.com

All my Open Source projects
Extracted view of CVS
Home
Site map

See recent comments. RSS feed of all comments. Raw dump of all comments for research purposes.

ImageMagick book
MythTV book








If you're interested in what patches I have submitted, and their status, then you really should be looking at this page.


Fri, 21 Aug 2009



Who writes Linux?

    This is just a quick shout out for the Who Writes Linux? report from the Linux Foundation. IT got slashdotted today, and has some interesting numbers... For example, there are over 500 companies contributing to kernel development, and the majority of code reviews are done by employees of just three companies (with Red Hat being a clear winner). Anyway, if you have some spare time and are interested in such things, its an interesting read.

    Tags for this post: linux(S)

posted at: 02:22 | path: /linux | permanent link to this entry


Mon, 08 Dec 2008



Upgrading Ubuntu Feisty now that its end of lifed

    I have a machine I neglected to upgrade before Feisty was EOLed. This was a problem, because as part of the EOL process they removed the main, universe and multiverse directories from the archive, which means mirrors don't carry them any more either. This made the upgrade tool fail, because it couldn't download all of the meta data.

    Resolution? Comment the out of /etc/apt/sources.list.

    Tags for this post: linux(S) ubuntu(S)

posted at: 20:28 | path: /linux/ubuntu | permanent link to this entry


Sun, 31 Aug 2008



TCP_DENIED/403 for cache accesses using squid

    I just spent some time debugging why squid wouldn't work for localhost, but seemed to work for other clients on my network. To cut a long story short, Linux for some reason wasn't using 127.0.0.1 for traffic to localhost. It was instead using the public IP address for the machine, which didn't match either the localhost ACL or the local network ACL. I am sure there is some fancy reason that this is the case, but if you see this problem, then consider checking your localhost ACL.

    Tags for this post: linux(S) squid(S)

posted at: 10:21 | path: /linux/squid | permanent link to this entry


Mon, 18 Aug 2008



The currently broken state of video for Linux

    I'm packing for my trip to Seattle, and I just put two web cams into my bag? Why two, well one works with video4linux v1 applications (and isn't a very good web cam), and the other one is the fancy auto focussing nice web cam which works with video4linux 2 applications. Why is it that several years after video4linux 2 shipped, I still have to deal with this problem? Grumble.

    Tags for this post: linux(S) v4l(S)

posted at: 08:55 | path: /linux/v4l | permanent link to this entry


Sat, 16 Aug 2008



Why sync twice on shutdown?

    Nelson wonders why you sync twice on shutdown. I was told in a BSD kernels class run by Kirk McKusick once that the answer is because typing the second iteration gave the machine time to actually push the bits to disk. In other words, there was no good software reason.

    Tags for this post: linux(S)

posted at: 12:26 | path: /linux | permanent link to this entry


Sun, 06 Jul 2008



v4l2 webcam software?

    I have a fancy Logitech 2 megapixel auto focusing webcam which uses the UVC USB class. The camera is well supported by the linux kernel (via the uvcvideo) module, but for some reason there still seem to be very few video4linux2 user space programs out there. Not even my own ancient code for video4linux works. So, before I have to go and port my code to v4l2, does anyone have a recommendation for a command line tool which will capture single frames from a UVC webcam for me?

    Tags for this post: linux(S)

posted at: 23:55 | path: /linux | permanent link to this entry


Sat, 03 May 2008



A ssh quickie

    I tend to have lots of ssh tunnels running with port forwarding on my laptop. The problem with that is that there are of course different host keys for localhost then. That makes me sad. Luckily, the following config option disables host key checking for localhost:

    $ cat /home/mikal/.ssh/config 
    NoHostAuthenticationForLocalhost yes
    


    Too easy.

    Tags for this post: linux(S)

posted at: 11:38 | path: /linux | permanent link to this entry


Thu, 01 May 2008



What packages are taking all my disk?

    I'm using Ubuntu here, but this would work on any Debian based distribution... I want to find out what packages are sucking up all the disk on my new laptop. So, I run:

    mikal@mikal-eee:~$ dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n
    


    Which will give you a list of packages sorted by size when installed. In my case, removing evolution and open office ill make a big difference to my free disk space.

    Tags for this post: linux(S) ubuntu(S)

posted at: 16:42 | path: /linux/ubuntu | permanent link to this entry


Sat, 29 Jul 2006



Nice touch

    Ok, so I don't know about you, but pretty much the only time I have a copy of Windows these days is when I take delivery of a new laptop like I did this morning, before I get around to installing Linux on it. To verify that my download and cdrecord had produced something valid, I just stuck the Ubuntu Dapper CD I just made into the CD ROM drive on this Windows laptop.

    It's really cool. It launches an application with the autorun stuff on Windows, and then offers to let me install open source on the Windows partition. It's like a small version of the OpenCD (and was in fact done with their help). Applications it offers to install:

    • Mozilla Firefox
    • Mozilla Thunderbird
    • Abiword
    • Gaim
    • The Gimp


    It's a nice touch that the CD can be used for this sort of thing as well. Like all ideas, it's so obvious now that I've seen it done, and it makes me wonder why other distros haven't been doing this for a while.

    Another on Mikal's rocks list for the day -- Ubuntu.

    Tags for this post: linux(S) ubuntu(S)

posted at: 15:07 | path: /linux/ubuntu | permanent link to this entry


Tue, 25 Jul 2006



Debian / Ubuntu packaging

    Jon kindly dropped in on Google on the way to Oscon, and presented a talk on Debian (and therefore Ubuntu) packaging. Here it is:



    Tags for this post: linux(S) ubuntu(S)

posted at: 08:13 | path: /linux/ubuntu | permanent link to this entry


Sun, 19 Mar 2006



Ubuntu, Dapper Drake, and that difficult Dell e310

    I upgraded to Dapper Drake flight 5 (the beta of the latest Ubuntu) today in order to get the on board USB controlled in my difficult Dell media center PC working nicely. It worked, and all is now well.

    There were some warts in the install though. I installed with a dist-upgrade remotely over ssh, and the machine locked up at the updating PCMCIA stuff point. The box then wouldn't boot, I suspect because the initrd was horked. On boot there were errors finding the disk the root filesystem is on.

    So, I downloaded the Dapper install CD, booted in rescue mode, chrooted to /target (where I had mounted the root filesystem from the machine), and ran dpkg -configure -a. All is now well again.

    Oh, and the USB controller works just fine now thanks.

    Tags for this post: linux(S)

posted at: 22:03 | path: /linux | permanent link to this entry


Fri, 16 Dec 2005



About to resize my LVM

    When I created my USB2 mirrored LVMed disk array I go asked a few questions about performance of the disks, how long it took to setup, and stuff like that.

    At the time it was too late to get that data as I already had things I cared about on the disk array. Now it's time to grow the array so I've picked up two more disks. I've collected some data, so I now have data on the setup process for a new LVM from two USB 2 disks, and bonnie results for the filesystem on those disks. I don't have the date with me though, so I will write it up in the next few days.

    Is there anything else people would like to know before I put these disks into action?

    Oh, and yes this does mean that there is now a terrabyte of disk in that array. That brings the total amount of storage I have online at my house to 1.2 terrabytes. That doesn't include the old disk array still running in Australia either. Fun fun fun.

    Tags for this post: linux(S)

posted at: 09:28 | path: /linux | permanent link to this entry


Thu, 24 Nov 2005



Adventures in Ubuntu Breezy Dovecot

    I mentioned the other day that I am having problems with Dovecot on Ubuntu Breezy. Now's the time to debug it, and here are my notes...

    No inetd.conf

      sed: can't read /etc/inetd.conf: No such file or directory
      


    This first error is because of this poorly implemented test:

      # The init script should do nothing if dovecot is being run from inetd
      for p in `sed -r "s/^ *(([^:]+|\[[^]]+]|\*):)?(pop3s?|imaps?)[ \t].*/\3/;t;d" \
        /etc/inetd.conf`
      do
        for q in `sed -r "s/^ *protocols[ \t]*=[ \t]*(([^\"]*)|\"(.*)\")/\2\3/;t;d" \
          /etc/dovecot/dovecot.conf`
        do
          if [ $p = $q ]; then
            exit 0
          fi
        done
      done
      


    You can see from the comment that the intention is that the init script doesn't do anything if dovecot is running from inetd. The error message is kinda bogus though, in that the code keeps executing after that failed line with the sed call in it. If you find the error annoying, then make it go away:

      touch /etc/inetd.conf
      


    In a perfect world, you'd hope that the packager would change the script to do something more like this:

      for p in `sed -r "s/^ *(([^:]+|\[[^]]+]|\*):)?(pop3s?|imaps?)[ \t].*/\3/;t;d" \
        /etc/inetd.conf 2> /dev/null`
      


    Moving right along...

    It doesn't start the service

    I had enabled the imap_listen variable in the dovecot.conf file, but not put it in the protocols variable. The init script checks this, and bugged out without an error message. I would think an error message would be nicer.

    And now it works.

    Tags for this post: linux(S) ubuntu(S)

posted at: 20:40 | path: /linux/ubuntu | permanent link to this entry


Stuffit expander for linux, but open source

    I've been working with publishing people recently, and they're all Macintosh users. There is a trial version of Stuffit expander for linux, but they really want me to give them money after 15 days... I've googled for an open source alternative, but can't find one. Is that because one doesn't exist?

    Tags for this post: linux(S)

posted at: 14:30 | path: /linux | permanent link to this entry


Wed, 23 Nov 2005



Ubuntu Breezy and Dovecot hate me

    I've got a new laptop, and have installed dovecot. Now it wont start, with an error about not being able to find the inetd.conf config file. That's because inetd isn't installed.

    Is the dovecot package just broken? Is there something obvious that I am doing wrong?

    Tags for this post: linux(S) ubuntu(S)

posted at: 14:54 | path: /linux/ubuntu | permanent link to this entry


Sun, 13 Nov 2005



Linux USB quandary

    I've got two USB high speed disks. If I plug them into the machine with the Via 6202 PCI controller before boot, they get detected as full speed (i.e. slow) devices. If I plug them in later, they get detected as high speed devices.

    But md only detects devices at boot.

    So, how do I get the USB detection to work? Or, how do I detect md's after boot?

    Tags for this post: linux(S)

posted at: 02:07 | path: /linux | permanent link to this entry


Sat, 12 Nov 2005



SMART and USB storage

    One thing I didn't think about when I set up my new disk array is that SMART doesn't seem to be available on USB storage provided disks. I've just had a disk hiccup while getting ready to move it all to the US, and now I'm trying to investigate why. SMART would make that a lot easier. At this point I suspect that it's the USB storage layer, not the disk, which is having problems.

    Tags for this post: linux(S)

posted at: 00:27 | path: /linux | permanent link to this entry


Fri, 11 Nov 2005



Adding space to the disk array

    As discussed earlier, I have an LVM and MD based USB 2.0 disk array for all my storage now. I wanted to extend the logical volume (the bit with the filesystem on it) a little, and thought I should write down the commands I used so I could remember them next time.

    It was as simple as (with the filesystem unmounted):

      lvextend -L+6G /dev/data/datalv
      e2fsck /dev/data/datalv
      resize2fs /dev/data/datalv
      


    Very nice.

    Update: Fixed the command line above to be correct. Additionally, I had some troubles with the fsck eating all of the RAM on the machine (it didn't have much), and I've had to add more RAM to the machine to get the commands above to work.

    Tags for this post: linux(S)

posted at: 21:21 | path: /linux | permanent link to this entry


Tue, 25 Oct 2005



Building my new disk array

    I have an opportunity to build a new disk array for when I move house. I made a few mistakes when I built the last one (although perhaps they were because it was the best that could be done at the time), and I don't intend to repeat those mistakes. I put out a call for suggestions a little while ago, and now I've built an array I'm pretty happy with. Let's walk through it.

    First off, let's start with a reminder of the requirements. Here's what I said in the previous post:

    • Reliable: be that mirrored or RAIDed
    • Expandable: I want to be able to drop in a new disc when I run out of space. I don't mind needing to add two identical discs if that makes point 1 easier
    • Rethingable: I want to be able to remove unreliable discs from the set. If there are paired discs, then I can handle having to cycle out both at the same time.
    • Non-sucky


    The hardware

    I now have two identical USB 2.0 external hard disk enclosures, each with a 250gb Seagate Barracuda drive in it. I picked USB 2.0 because I want the disks to be easy to move, and I picked external enclosures in the hope that this would ruggedize the disks for the trip to the US just a little. They'll be travelling in my carry on luggage.

    The mirroring

    Both of the disks are part of a MD mirror pair, and I must say that MD is a lot nicer than last time I played with it. Here's all I needed to do to set it up (sdb2 and sdc2 are the partitions with the MD on them):

    mdadm --create /dev/md1
          --raid-devices=2
          --spare-devices=0
          --level=1
          /dev/sdb2 /dev/sdc2
    
    mdadm --detail /dev/md1
    


    No config files in /etc like you used to. No need to do more configuration. It just works. What happened to the first partitions on the discs? They're each an 8 megabyte FAT partition with nothing in it but a meaningful name. This is so that I can tell which disk is which no matter what if they end up falling out of their labelled cases or something.

    So, we have redundancy... Let's make it expandable and shrinkable

    Then I used LVM to create a volume group and a logical volume on md1, which is where I will store the data. This is so I can expand and shrink the filesystem as my storage needs grow and disks fail. I currently get a disk failure per year with the current disk array (which is currently four disks), and I currently consume a little over 230gb. Yes, I know I'm going to need to buy more disk real soon, but I thought I would wait until I am in the US.

    Creating the LV:

    pvcreate /dev/md1
    vgcreate data /dev/md1
    lvcreate -L<size> -ndatalv data
    vgdisplay data
    
    mkfs -text3 /dev/data/datalv
    


    And we're done. Any comments?

    Tags for this post: linux(S)

posted at: 00:49 | path: /linux | permanent link to this entry


Thu, 15 Sep 2005



Overflow rooms

    (This is only tangentially related to linux.conf.au 2006, I have no idea what they're doing for room allocation). For linux.conf.au 2005 we discussed the use of overflow rooms to deal with having too many registrations. In the end we decided against it, the crux of the logic being sheer logistics, and value for money (if people pay to attend, they should be able to be in the same room). Anyways, Microsoft's PDC has sold out, and they ended up using overflow rooms. It seems to be working for them so far, and the infrastructure sounds interesting.

    I'm thinking this should be seriously considered if we end up with a sellout situation for a linux.conf.au in the future.

    Tags for this post: linux(S) conference(S) opensource(S) lca2006(S)

posted at: 02:24 | path: /linux/conference/opensource/lca2006 | permanent link to this entry