Recovering 5.25″ Floppy Disks

When I was at the University College of Wales, Aberystwyth they were just starting to supplement their serial terminals connected to X.25 PAD’s with some PC’s (Viglen I think), complete with hard disks and 5.25″ floppy drives. So I have had two boxes of 5.25″ floppies which dutifully came out to Australia with me when I emigrated from the UK back in 2002. These floppies are now well over 20 years old so I reckoned it would be about time to see whether they were still readable and, if so, what was on them. Labels like “Honeywell Backup Disk #1” only say so much.. 😉

The first problem was that I didn’t have a 5.25″ floppy drive. Luckily my boss at VLSCI was able to lend me one. The second problem was I didn’t have a floppy cable with the 5.25″ connector on it. Fortunately Bernie at work had an old PC that was in bits which did have one, so I was able to borrow that. Then I found that the old Dell PC I was thinking of using had a really weird connector and wasn’t going to be that useful. My even older Olivetti Netstrada (a quad processor Pentium Pro monster) did have IDE, but the cables were going to be rather hard to get to as it has a bunch of SCSI drives and the cables for them were going to make it hard.

My final box was an VIA EPIA V box (originally from EverythingLinux back in 2003) which did have an easily accessibly floppy connector on the mother board, but only a single power connector for a drive. So it was either the internal IDE disk, or the floppy, but not both. I could have gone and bought a power splitter, but I thought I’d take the cheaper way and netboot it (the onboard ethernet chipset has PXE support) – it should be pretty easy.. Hah! 🙂 This is what the box looked like after some careful assembly..

Resurrecting 5.25" floppy disks - hardware

The first test was to see if the 5.25″ floppy disk drive worked. Luckily I had a floppy labelled as “system boot disk” and after some mucking around in the BIOS (it turns out you can set it to boot from floppy without having enabled the floppy controller, which results in it not booting from floppy and much cursing until you discover it) it booted first time – a 23 year old DOS boot disk complete with partly bilingual Welsh/English welcome screen from 1988!

UCW Aberyswyth 5.25" floppy system disk from 1988

This was very promising – the first disk had worked first time and a quick test of swapping it out for another and doing a “DIR” also worked. Now to get the data off these before they went to the great /dev/null in the sky..

My plan to recover the info was to netboot this machine as a Mythbuntu diskless front end box – Mythbuntu makes that easy to set up and with a little fiddling of the DHCP server to make sure it would only every try and serve this box, and do so with a static address, it worked. Or at least it would load the kernel. Which then complained that it couldn’t boot as it needed a CPU which had PAE support. 🙁

This VIA EPIA V has a low power (5W) 533MHz VIA Eden CPU (appropriately the kernel detects it as a VIA Samuel 2) and whilst it is IA-32 it doesn’t have some of the newer features which are selected for Pentium class processors in the current Linux kernel.

Oh well, that’s fine, I knew I could use Debian instead, so I used the ltsp-build-client (creating an /etc/sysconfig/ltspdist file first containing the line VENDORDEF="Debian" first so it would use the right set of scripts), thus:

ltsp-build-client --chroot sid --mirror http://mirror.internode.on.net/pub/debian/ --dist sid --purge-chroot --arch i386 --accept-unsigned-packages

Problem was that all the various kernel command line options for specifying the NFS server for the root filesystem just didn’t seem to work, it would just sit there saying something like “Waiting for root filesystem” and eventually give up and drop me to a busybox shell prompt, and a simple cat of /proc/cmdline showed the options were being set correctly. A little more thought and an examination of the config file for the kernel showed that Debian doesn’t ship kernels with CONFIG_NFS_ROOT set, so it was never going to work. 🙁

Whilst I could have rolled my own kernel I decided to instead have a look to see if I could find a Linux distro that included PXE booting as an option and a Google search for “linux distro pxe” turned up PLoP Linux as the first hit.

PLoP Linux is a small (75MB) distro aimed at data recovery operations that comes as an ISO, tar.gz or zip file for i586, x86-64 and (crucially for me) i486 processors. They even have a separate tar file for the PXE files. It was easy to set up and so I booted the PC with high hopes. Then I got the same error about the kernel requiring PAE support in the CPU that I got with Ubuntu. Whilst there was an i486 tar file there wasn’t an i486 PXE tar file! That was easily solved by grabbing the i486 ISO, doing a loopback mount of it and stealing the kernel and initrd.img files from it instead.

This time it booted, and I found that it had just what I was after – a Linux shell prompt, working networking, mtools (for mcopy and mdir) and (most importantly) ddrescue to let me create complete images of the floppies. I created a directory for each floppy disk and then did ddrescue /dev/fd0 floppy.img to make the image. I created another directory called Contents and from there did mcopy -vms a: (yes, I ordered the options that way deliberately) to copy all the files and subdirectories off complete with their last modification times (from 1987 and 1988 generally).

In all I was able to recover 20 of the 21 floppies with no errors at all, which amazed me as I was expecting them to have degraded over time (especially as one box was just a flimsy cardboard box). I was hoping to have original B source code from HoneyBoard (the bulletin board that Alan Cox and others I knew there wrote) and AberMUD from the Honeywell L66 but sadly that doesn’t appear to be the case. There are 3 B programs but one is just just 3 lines (calling a drl) and the other two appear to be two versions of some sort of shell which I didn’t write as the first has a btidy timestamp from April 1987, before I arrived at Aberystwyth.

The 21st disk was completely unreadable – the drive didn’t seem to want to acknowledge its existence and ddrescue couldn’t see anything as the floppy driver in the kernel couldn’t get the drive to provide any data. I might try ddrescue’s mode of copying data in reverse to see if that manages any better..

How to test a WordPress install against a new version, without breaking the old one

One problem with upgrading any piece of software is the question of what’s going to break? WordPress is no different in this regard than any other piece of software so before major upgrades I run a test upgrade whilst leaving my real blog alone. There’s no substitute to testing with your real data so what I do is run another WordPress instance under a different virtual domain with a copy of both the database and the installation.

The rough steps I use are:

  • Create a new test domain in DNS
  • Copy the database WordPress uses to a new one and set up appropriate grants on it
  • Go to the options table in the database and change the two references to the old URL of the blog (the siteurl and home rows) to the new URL (otherwise you’ll find yourself constantly getting redirected to the production blog!)
  • Copy your WordPress installation to a new directory (I use rsync -aP to preserve permissions) and configure Apache to serve the new domain from it
  • Edit the copies wp-config.php file to match the new database copy and the username and password for it
  • Go to the new domain and make sure it works!

That should be it really. I first did that for my upgrade to WordPress 2.5 RC1 and it just worked for WordPress 3.2.1.

Caveat emptor: Now warranty, batteries not included, if it breaks you get to keep both parts! 🙂

New open source compiler on the way

Some interesting news overnight, the company PathScale have announced their EKOPath4 compiler will be released under open source licenses:

PathScale announced today that the EKOPath 4 Compiler Suite is now available as an open source project and free download for Linux, FreeBSD and Solaris. This release includes documentation and the complete development stack, including compiler, debugger, assembler, runtimes and standard libraries. EKOPath is the product of years of ongoing development, representing one of the industries highest performance Intel 64 and AMD C, C++ and Fortran compilers.

This is the compiler that, when first launched, the company said that if another compiler generated faster code then you should submit a bug report to get it fixed. 🙂

In conversation on the Beowulf list I asked about the licenses and the code and their CTO replied, saying:

Main compiler is GPLv3, v2+ and LGPL – Other parts are a mix of permissive licenses.

and that the code itself was going to be available from the PathScale GitHub account, alongside their existing open source projects.

NUMA, memory binding and how swap can dilute your locality

On the hwloc-devel mailing list Jeff Sqyres from Cisco posted a message saying:

Someone just made a fairly disturbing statement to me in an Open MPI bug ticket: if you bind some memory to a particular NUMA node, and that memory later gets paged out, then it loses its memory binding information — meaning that it can effectively get paged back in at any physical location. Possibly even on a different NUMA node.

Now this sparked off an interesting thread on the issue, with the best explanation for it being provided by David Singleton from ANU/NCI:

Unless it has changed very recently, Linux swapin_readahead is the main culprit in messing with NUMA locality on that platform. Faulting a single page causes 8 or 16 or whatever contiguous pages to be read from swap. An arbitrary contiguous range of pages in swap may not even come from the same process far less the same NUMA node. My understanding is that since there is no NUMA info with the swap entry, the only policy that can be applied to is that of the faulting vma in the faulting process. The faulted page will have the desired NUMA placement but possibly not the rest. So swapping mixes different process’ NUMA policies leading to a “NUMA diffusion process”.

So when your page gets swapped back in it will drag in a heap of pages that may have nothing to do with it and hence their pages may be misplaced. Or worse still, your page could be one of the bunch dragged back in when a process on a different NUMA node swaps something back in. This will dilute the locality of the pages. Not fun!

How computers fail to entice people into being programmers

An old friend of mine from the UK, Steve Usher, has pretty much nailed things with this blog on “Enthusing teen minds: Why today’s computers won’t create tomorrow’s programmers“. He says:

The computers of the early 80s were a blank canvas. You plugged them in, switched them on and (hopefully) the input cursor blinked at you. There was no decoration, no clutter and it was something waiting for YOU to do something to it.

Ah yes, I remember those days, when 3.5KB was a lot of memory! But what about today’s computers ?

They’re immediately brimming full of functionality all vying for your attention, but it’s also incredibly locked down. You can do absolutely anything… ANYTHING as long as it’s what the visionary who steered the programming teams thinks that you should want to do. Woe betide you if you want to do anything different. It’ll either ignore you or give you an unhelpful suggestion in a dialog box. You can be creative, but only in the ways you’re told you can be.

But before us free software types get all puffy and “I told you so”, he points out that things aren’t that much better on our systems with all our SDK’s, IDE’s, toolkits, compilers and interpreters:

It’s like taking a 5 year old into an engineering workshop, sitting him down and then complaining when he doesn’t build a car as he had all the tools available to him to do it and hence it must be his fault.

I’m not as sure that we need to build something new from scratch though, I think it might be more the case that what we need to do is to sort through all the various projects that could fit what he is after and build a distro (of whatever OS) that boots up straight into that application and lets them play with it. Perhaps something like SDLbasic (a BASIC interpreter for game development) might be a good start ?

WordPress Upgraded to 3.1

OK, just done an svn switch http://svn.automattic.com/wordpress/tags/3.1 to upgrade my blog to WordPress 3.1, and nothing looks too broken so far. 😉

If you spot any problems do let me know, either by a comment here or by email to chris at this domain name (csamuel.org).

Testing the N900 “Lowlight” Photo Application

Nokia have released some “research prototypes” of applications that use the FCam libraries to do fun things with taking photos on their Nokia N900. One of these is called “Lowlight” and is designed to make it easier to get reasonable photos in, well, low light conditions. I tested this out on Tuesday night after the Linux Users of Victoria meeting, taking a photo of the Old Commerce Building on the University of Melbourne campus.

Old Commerce building, University of Melbourne, at night

Now given that’s taken hand-held without a flash, I’m pretty impressed, you can even make out the design of the courtyard floor in front of it! If you go and look at the original full size version on Flickr (CC-BY licensed) you can see there is noise around the outside of the building, and there is an almost oil-paint effect on the details of the carvings on the building due to their algorithm, but given the alternative was nothing at all it’s a great little program!

VLSCI: Systems Administrator – High Performance Computing, Storage & Infrastructure

/*
* Please note: enquiry and application information via URL below, no agencies please!
*
* Must be Australian permanent resident or citizen.
*/

Executive summary

Want to work with hundreds of TB of storage, HPC clusters and a Blue Gene supercomputer and have an aptitude for handling storage and data ?

http://jobs.unimelb.edu.au/jobDetails.asp?sJobIDs=715542

Background

VLSCI currently has in production as stage 1:

  • 2048 node, 8192 core IBM Blue Gene/P supercomputer
  • 80 node, 640 core IBM iDataplex cluster (Intel Nehalem CPUs)
  • ~300TB usable of DDN based IBM GPFS storage plus tape libraries
  • 136 node, 1088 core SGI Altix XE cluster (Intel Nehalem CPUs)
  • ~110TB usable of Panasas storage

There is a refresh to a much larger HPC installation planned for 2012.

Both Intel clusters are CentOS/RHEL 5, the front end and service nodes for the Blue Gene are SuSE SLES 10. The GPFS servers are RHEL5. Panasas runs FreeBSD under the covers.

Job advert

http://jobs.unimelb.edu.au/jobDetails.asp?sJobIDs=715542

SYSTEMS ADMINISTRATOR, STORAGE & INFRASTRUCTURE
Position no.: 0022139
Employment type: Full-time Fixed Term
Campus: Parkville

Close date: February 3rd, 2011

Victorian Life Sciences Computation Initiative, Melbourne Research

Salary: HEW 7: $69,608 – $75,350 p.a. or HEW 8: $78,313 – $84,765 p.a. plus 17% superannuation.

The Victorian Life Sciences Computation Initiative (VLSCI) is a Victorian Government project hosted at The University of Melbourne which aims to establish a world class Life Sciences Compute Facility for Victorian researchers. The Facility operates a number of supercomputers and storage systems dedicated to High Performance Computing. The VLSCI wishes to recruit a Linux Systems Administrator with knowledge of file systems and an interest in working with technologies such as GPFS, TSM, HSM, NFS.

This position is an opportunity to become involved in leading science and computing fields and work as part of a small but self-contained team. Expect to find yourself learning new skills and developing new and innovative solutions to problems that have not yet been identified. You have every opportunity to make a real difference and will need to contribute to a high level of service and creativity.

More Details

Selection criteria and more details are in the Position Description (PDF) here:

http://bit.ly/fyIy3H

Apologies for the URL shortener, the original URL is a horribly long one.. 🙁

Wordcamp Melbourne 2011

This coming February (26th-27th) there’s going to be “WordCamp Melbourne 2011” held at North Melbourne Town Hall.

If you’re into WordPress – the free and open source personal publishing platform – then you’ll love WordCamp – a casual, locally-organised conference catering both to budding bloggers and experienced developers alike. The first such event to be held in the city, WordCamp Melbourne 2011 features a range of guest speakers including Glenn Todd and Bronson Quick.

I know that my friend Rich Boakes has been enthusiastic about them in the UK so I’m hoping I might be able to make it to this one!

(Hat tip to Kathy Reid for pointing this out on Twitter)

Dependency Problems with KDE 4.6.0 RC1 Packages for Ubuntu 10.10 (FIXED)

Update: this issue has been fixed by the packagers. See the bug for more info.

I saw the notice about the KDE 4.6.0 RC1 packages being released for Kubuntu 10.10 today and decided to look at upgrading (or at least grab all the packages with aptitude dist-upgrade -d) and got a surprise that it wanted to remove 250 packages due to dependency problems. The issues were:

The following packages have unmet dependencies:
   libqapt-runtime: Depends: libpolkit-qt-1-1 which is a virtual package.
   polkit-kde-1: Depends: libpolkit-qt-1-1 which is a virtual package.
   kdelibs5-plugins: Depends: libpolkit-qt-1-1 which is a virtual package.
   libgpgme++2: Depends: libgpg-error0 (>= 1.10) but 1.6-1ubuntu2 is installed.

Turns out that libpolkit-qt-1-1 and the newer version of libgpg-error0 are in the alpha for the next version of Kubuntu (Natty Narwhal) but not in Maverick (10.10), hence the chaos. The bug is reported as LP bug #694053 and thanks to Murz for spotting that you can just grab and dpkg -i the missing packages – see the bug report for details and links!