Author: Mike Meredith

  • Upgrading to Ubuntu 8.10; An Alternative Method and Some Rough Edges

    Well I decided it was time to upgrade my main workstation to Ubuntu 8.10 from 8.04. This was a somewhat nervous upgrade because the SATA disks are connected to a controller that gives me trouble when booting … the last few times I rebooted the machine I have had to re-assemble one of the mirrors at the “miniroot” (the shell you get from the initrd environment).

    Given the trouble I wanted the option to revert back to the current install if everything went wrong … something I have described in the past.

    Environment

    I have four SATA disks in my main workstation that are mirrored and encapsulated into a single volume group with numerous logical volumes. So /dev/md0 is constructed of a mirror of /dev/sda2 and /dev/sdb2 and /dev/md1 is constructed of a mirror of /dev/sdc1 and /dev/sdd1. /dev/sda1 is used as /boot and /dev/sdb1 is “spare”.

    The volume group datavg has two “physical disks” in it – /dev/md0 and /dev/md1. In that volume group are (amongst others) two logical volumes of interest – 804root and 804var.

    Preparation

    First I ensured that /dev/sdb1 contained an up to date copy of /boot :-

    mkfs -t ext2 /dev/sdb1
    mount /dev/sdb1 /mnt
    star -copy /boot /mnt
    umount /mnt

    The next step was to create two new logical volumes to be used (eventually) for the new release of Ubuntu :-

    lvcreate --size 12G -name 810root /dev/datavg
    lvcreate --size 3G --name 810var /dev/datavg
    mkfs -t xfs /dev/datavg/810root
    mkfs -t xfs /dev/datavg/810var

    The next step was to copy the filesystems across – at this point no further non-upgrade activity took place :-

    mount /dev/datavg/810var /mnt
    star -copy -xdev /var /mnt
    mount /dev/datavg/810root /mnt
    star -copy -xdev / /mnt
    (edited /mnt/etc/fstab to change references to 804 to 810)
    umount /mnt

    At this point the remaining task (or so I thought) was to change the references in /boot/grub/menu.lst so that Grub would boot the kernel with 810root as the root filesystem.

    I then rebooted to check the functionality and discovered that for some reason /var/run/network had not been created on the new /var but that seemed to be the only issue. I re-created this directory and rebooted to be sure (and Linux without a loopback device behaves very strangely!).

    I then in theory had an environment I could revert to with a bit of fiddling with grub so was happy to attempt the upgrade.

    The Upgrade Itself

    I then started the upgrade (sudo update-manager -d) only to be told I did not have enough disk space with the suggestion that I run sudo apt-get clean to free up enough space. I tried this and the update started on the next time through. Why doesn’t the upgrade process automatically run apt-get clean ? In fact why doesn’t the upgrade process realise that it is on a system with LVM available (with plenty of free space) and create a new LVM especially for the upgrade files ?

    Anyway the second attempt to run update-manager did start downloading files so I settled down for a well earned beer.

    After the files had downloaded the actual upgrade process began. At some point the process stopped whilst a certain upgtade (libpam) asked whether it should restart certain services (including gdm which is the graphical login). Unfortunately it did not explain clearly what it was doing, why, or even if restarting gdm would terminate the current X session. Perhaps it is something that would only “worry” someone with a dangerous amount of knowledge, but perhaps the prompt could be improved slightly.

    As a later example of how it should be done, the dialog warning about changing the ssl certificate was ideal … basically saying “if this doesn’t mean much to you, don’t worry about it”.

    The use of dialogs during the upgrade does raise a couple of issues though :-

    1. Apparently not “stopping the clock” whilst waiting for the user to respond to dialogs caused the estimate of how long the upgrade would take place to increase dramatically. Just after dealing with that libpam prompt I was slightly alarmed by the estimate of 6 further hours to complete (as it was already 21:30) only to be reassured by the rapid drop to 2 hours.
    2. From a users perspective it would be preferable to ask all questions at the beginning or at the end of a long process. Keeping an eye on the upgrade whilst it was churning through the bulk of the upgrade (which took place without user intervention) was somewhat tedious.

    The unfortunate thing was that at this point, the upgrade process ran out of space. It also left my machine in an unbootable state … from what little investigation I made it would appear that the initrd file was not created. Perhaps because of the lack of space, but others have also encountered this problem.

    Obviously the Ubuntu upgrade process should be a little more careful about estimating the amount of space available. It would also be nice if it would notice that it was installed on an LVMed system with free space available … it could create a new LVM of an appropriate size and use that.

    Recovery

    Fortunately my preparation left me with a root filesystem that I could revert to by selecting one of the older kernels in the grub menu, editing the command used to boot, and by replacing the root filesystem with “804root”. This resulted in a system almost identical to that before the upgrade process.

    I re-tried the “Preparation” stage, ensuring that /var was a little bigger and restarted the upgrade process …

    Upgrading (The Second Attempt)

    The second upgrade went through pretty much the same process as the first … except that it did not run out of disk space. This let it complete apparently normally with a warning about removing several hundred packages (!).

    Finally it suggested rebooting to finish the upgrade.

    The First Boot

    The first boot was a triffle problematic … firstly I still had to manually assemble /dev/md0 and the process that built /boot/grub/menu.lst hadn’t noticed that an invalid root filesystem was specified. Whilst the later was my fault, it would be nice if it had realised that it was invalid and had warned me. The former is a long standing problem and is not the result of the upgrade.

    Apart from that, the standard user interface looked ok, but it had messed around with the Enlightenment window manager. I had to re-install the package, my settings and menus had disappeared. Whilst I am an “unusual” user in not using the standard user interface, this was not something I was happy with!

  • OSX Breaking The Principle Of Least Astonishment

    Normally OSX is quite good when it comes to useability and not breaking the principle of least astonishment (roughly computers should avoid doing things to ‘surprise’ the user), but I re-encountered one poor area again tonight.

    I was burning a CD image to a CD-R – something which is admittedly an action most commonly done by the geekier users. I normally use my Ubuntu workstation for things like that, but I suspect my CD drive is going south.

    Anyway, I did the obvious thing – selected the ISO file in Finder and selected “Burn to Ubuntu.iso to Disc”. Yes you chortling OSX experts out there in the back, I did indeed end up with a CD containing a single file named “Ubuntu.ISO” on it. Or in other words I had a CD containing a file with an image of a bootable CD in it – which won’t of course boot.

    So what did OSX do that was wrong ? Well there’s two things :-

    1. The message saying what it was doing should have been clearer; something along the lines of “I am about to burn a CD containing one file called Ubuntu.ISO” would have indicated that I was doing something wrong and given me the chance to hit Cancel and avoid yet another drink coaster.
    2. Finder should be capable of realising that something that looks like an ISO image needs to be burnt “as is” rather than making a file system containing that file.

    And yes I did eventually realise that I needed to use “Disk Utility” to burn the CD.

  • UK Data Leaks: Public Sector Vs. Private Sector

    Today we woke up to learn of yet another UK government data leak. Apparently a memory stick was left in a pub car park. Of course as always, not is all quite as it seems; the person who actually left the memory stick where it was, actually worked for a private sector company doing contracting work for the government. So was this really a UK government data leak at all ?

    Well yes, the data was government data and it does not matter who leaked it. From memory (i.e. I am too lazy to hunt down the links to check) this is not the first time that government data leaks have been caused by private contractors. Perhaps the government should stick to doing their own work when it comes to working with data that contains personal information; if there is anything more aggravating than being slated for your own stupidity it is being criticised for someone else’s stupidity.

    Of course most people will be under the impression that data leaks pretty much only occur when the government is involved; somehow data leaks from private sector companies never seem to hit the headlines in quite the same way. For instance the headlines for this morning’s leaks were all about the government role in the data loss and no mention of the private sector firm involved :-

    • “Government memory stick found in pub” – Independent on Sunday.
    • Government passwords left at pub” – Guardian; also “Fears for personal data after government passwords left in pub car park”.
    • Brown says government cannot ensure data safety” – Times.

    I have left out a few … I could not find the story on a few websites belonging to the gutter press, and lost interest after one too many pages with lurid colours and half-naked women popping out at me. But it’s all “the government” in those headlines; although they do in the end point out that it was a private contractor who lost the data.

    Anyone reading (and trusting!) the media would be under the impression that the Government cannot be trusted with our personal information whereas private sector companies can because they rarely end up as front-page stories for losing data. Well I am not totally convinced that the Government has a monopoly on stupidity; there seems more than enough to go around.

    Hunting down stories about private sector data leaks is kind of tedious because there does not appear to be that much out there, but a few stories did show up (not linking to anything before 2007) :-

    The last story is particularly interesting – 56 reported data leaks from financial firms in 2008 (who are not required to report data leaks). In a report by Verizon, it is estimated that of all private sector data leaks, only 14% of leaks are from financial firms; doing a little arithmetic indicates that there have been at least 400 data leaks this year.

    So is the private sector any better or worse than the public sector ? They are probably just the same – woefully irresponsible. People rarely care about information security of others in their daily lives; in fact they are often also completely naive about their own information security.

    So why does the government come in for so much criticism in comparison to the private sector ? Partially it is simply that we do not get a choice in the matter of whether to do business with the government or not. And partially it probably makes for a better media story. Or perhaps the media just wants to attack the government.

    Perhaps some journalist can take a proper look at the private sector leaks, do the job properly and just for once the private sector can get some justified criticism. They might also want to take a closer look at the media’s preference for attacking the government on this matter.

    Onto another matter; encryption. The government response was that the only personal data leaked in this case was encrypted as though that would protect the data. Well maybe, but only if it was strong encryption. Most people who use encryption are not aware of whether the encryption method is strong or not. For instance a quick google for “Word document password recovery” returns a huge list of choices for applicatiosn which will break the encryption on Word documents – making the encryption built into Word completely pointless. But how many people who use this encryption know that they are getting a false sense of security ?

  • Film Review: No Country For Old Men

    Format: Blueray

    IMDB entry: here.

    On the surface this seems to be a simplistic story about a man who stumbles on a drug trade gone wrong, picks up some money, and finds himself pursued by those who want it back at any cost. But there is a far more complex story going on hidden beneath the violence having to do with the thoughts and feelings of an old sherif who follows on behind trying to pick up the pieces.

    The added complexity adds interest and makes this interesting than a typical action film. It keeps your interest during a lazy rainy afternoon and is worth the time.

  • Pink Floyd Rambling

    I have just watched a documentary on Pink Floyd, which I had unfortunately messed up the audio and video synchronisation which made the viewing somewhat peculiar – perhaps somewhat appropriately.

    To me it seems that Pink Floyd is one of those bands where everyone meets. Amongst friends who listen to music, they have widely varying tastes in music and everyone has their own list of favourite bands. Oddly enough that rarely includes Pink Floyd, but when asked the response is almost always “Yeah! Them too”. And usually they will have every studio album produced by Pink Floyd even if they do not have every studio album of their favourite band – I have every Pink Floyd album, but not every Black Sabbath album.

    It is almost as though there is no need to mention Pink Floyd as a favourite because anyone with any serious interest in music of almost any kind will have Pink Floyd as a favourite. I do not spend a great deal of time thinking about what music to listen to on my iBox, but every few weeks I find myself listening to Pink Floyd.

    In some ways, we all hunting for another band as good as Pink Floyd.