On mainframes and freedom

Last week, CIO Magazine reported on the shortfall in mainframe skills.

It reminded me of a situation I faced a couple of years ago. My team was preparing to write software which integrated with an IBM z/OS system, and I knew literally nothing about it. I didn’t need to know all the details, but I wanted to be able to talk to the system programmers coherently and be taken seriously. I didn’t know much about CICS, nor RACF, and I’d not even heard of RACF. I wanted to learn.

I am a self-starter, and I want to get my hands on the technology I’m going to use in my work life. From learning perl, PHP and SQL in the late 1990s so I could capture ISDN call log data over RADIUS, to buying a bunch of older Cisco equipment to bring me up to speed on VoIP, it’s worked stunningly well. I wanted to do the same with z/OS – not to become an overnight expert, but to be able to bridge the gap between Java developers and the people who ran the mainframe we were going to be using. It would make the whole project happen with much less friction.

After no more than an hour or so’s research, I found IBM wanted $900-or-so a year, on top of buying dedicated PC hardware just so I could run z/OS and spend a bit of time becoming familiar with it. But why? I can download any number of GNU/Linux distributions without charge, or evaluate most Microsoft products for several months without any hassle. Why can’t I do that with z/OS? There were several sites offering TSO and CICS access, but that was only from a user’s perspective. I wanted to peer inside and see what made it tick.

Luckily, the project succeeded and I learnt a fair amount about z/OS in the process, but it wasn’t as quick or easy as if I’d been able to spend some of my own time learning. In fact, when I was given access to a non-production CICS region with the software on the other side of our interface, I spent several hours of after-work time getting to know it, and came away being able to help our developers write an even better product than if I’d stayed in my pure consultancy role.

If IBM want to change the perception that mainframes are an enigma understood only by the balding and bearded stalwarts at large companies, they need to get people hooked. Make the latest release of z/OS and a suitable emulator available for download, and let the world see how great your software is.

Enterprise IT Onboarding

I visited a customer site last week to collect a building access card and get set up on their email system. I managed to get both done within 30 minutes.

The impressive thing was that my Inbox already contained instructions on how to set up remote access to Webmail and my desktop via Citrix. All I needed was Google Authenticator or similar on my phone and that was it.

Why can’t all Enterprise IT departments be this efficient?

Novell RPL Boot under VirtualBox

One of my recent retrocomputing projects was to set up a Novell NetWare 4.11 server and boot clients from it. Remote boot, or Remote Initial Program Load, was a common method for booting network clients over the LAN before IP became commonplace.

RPL requires a boot ROM on the network card which finds a nearby server, connects to it and downloads a disk image which it then executes. By today’s standards, it’s trivial – but by late 1990s standards, it was anything but.

Skipping past the reminiscing, I spent a few hours trying to get VirtualBox to do RPL boot. Etherboot doesn’t appear to support RPL, so I tracked down a ROM image on Intel’s website. Intel deprecated RPL around 2005, but they’ve kept an old version of their drivers available which contains a boot ROM image supporting RPL.

After uncompressing the download with 7z (using 7z x PRORPL.exe), I was left with two interesting looking files with the extension FLB. One of these is 63,488 bytes, and the other is 139,264 bytes. Installing these in a VirtualBox machine is straightforward but unfortunately undocumented:

vboxmanage setextradata "vmName" VBoxInternal/Devices/pcbios/0/Config/LanBootRom romLocation

Configuring the virtual machine to use the smaller of the two image was fruitless – VirtualBox didn’t complain at all, but instead ran ‘default’ iPXE code. Only when looking in the Log Viewer did I see a reference to the ROM filename and a strange error such as rc=VERR_TOO_MUCH_DATA.

Trial and error showed that the ROM size must be a few kilobytes below the 64kb limit, and a couple more hours searching uncovered AMD’s website which has a file named "Generic BootRom Utility" which contains a 16kb file, RBOOT.ROM, which is a working RPL boot ROM for AMD PCnet network cards, including the PCnet-FAST III card in my virtual machine.

Re-running the vboxmanage command above with the path to the newly discovered boot ROM works a treat. I can now boot a virtual machine straight off a virtual NetWare server – the details of how to do that are coming in a future blog post.

The curious case of the IP Alias

Trying to log on to Skype earlier in the week on my MacBook Pro didn’t work. For some reason it simply wouldn’t connect – it just timed out. Everything else worked absolutely fine, no issues.

Figuring it was an IPv6 issue, I unbound IPv6 from en0 and tried again. Nothing. It wasn’t my Cisco ASA firewall playing games either, although logging on to it showed a vast number of packets dropped from 192.168.1.x on its inside interface (reverse path check, I don’t use 192.168.1.x internally). How could this be?

It turns out that I had a 192.168.1.x bound to en0 from when I was testing out some locally connected kit. Skype saw this as the first IP address it could use and bound to it – whereas everything else worked fine letting the OS choose. Unbinding this address made Skype leap in to action.

Configuring a WebSphere MQ server

In a previous post, I documented the “>steps to install IBM WebSphere MQ on Ubuntu. Now, more generically (and mostly for my own reference), here’s how to set up a queue manager and queues.

You’ll need the WebSphere MQ installation packages – if you’re only evaluating WMQ at the moment, try the WebSphere MQ 90-day trial. Also, you’ll need to read the previous blog post and set your sysctl settings appropriately.

First off, install the MQSeriesRuntime and MQSeriesServer packages – they’re the only ones you’ll need. After installation, run the following command:

/opt/mqm/bin/setmqinst -i -p /opt/mqm

This will set your default MQ installation path.

Next, ‘su’ to ‘mqm’, then create a broker by running the really simple command:

crtmqm MQSVR1

Before doing anything else, you’ll need to start the queue manager:

strmqm MQSVR1

You will also need to start a listener to be able to connect, so use the ‘runmqsc’ command to submit commands to create a listener on TCP port 1414, and also create a server connection channel called ‘SYSTEM.ADMIN.SVRCONN’:

runmqsc MQSVR1

The statement ‘CONTROL(QMGR)’ is important here – this will start and stop the listener with the queue manager. If you don’t include this, you’ll need to start the listener every time you bring up the queue manager.

At this point, you have the barest of bare WebSphere MQ server setups. I’ll cover authentication for WMQ 7.5 and higher in another blog post.

Importing Ordnance Survey Open Data in to PostgreSQL with PostGIS

Some time ago, I looked at some uses for Ordnance Survey Open Data, coming to the conclusion that a sensible way to work with it would be to import it in to a geospatial-enabled database.

Each set of data is provided in ESRI Shapefile format, and has four files:

  • shp – shape format
  • shx – shape index format
  • dbf – attribute format in dBase IV format
  • prj – projection format

The shp2pgsql command converts SHP files in to a set of SQL commands which will effectively import the data in to PostgreSQL. Here’s a ridiculously simple guide to importing a file:

createdb os_opendata
psql -d os_opendata -c "CREATE EXTENSION POSTGIS"
shp2pgsql <filename>.shp <table_name> | psql -d os_opendata

Depending on the speed of your machine, in a few seconds you’ll find a new table in your database with all the data included.

And finally, what if you just want to import all of the data at once? Try this:

find Data/ -name "*.shp" | xargs -I % -n1 shp2pgsql % | psql -d os_opendata

Ubuntu 14.04 for Productive People

Way back in 2011, I blogged about Ubuntu 11.10 for Productive People, which took the form of a mini tutorial on how to wrestle some of Ubuntu’s UI candy away and replace it with something better suited to being productive.

I’m still standing by my assertation that Ubuntu is too ‘pretty’ on the desktop now, and lacks a ‘power user’ mode, but I won’t argue with anyone who says it’s great. It’s not a false dichotomy – you can have a power mode and a pretty mode in a desktop operating system.

Updated for the current beta of Ubuntu 14.04LTS, here are the instructions on how to get the latest release of Ubuntu in to shape:

  • Install Ubuntu 14.04
  • Install Gnome using apt-get install gnome – use lightdm as the display manager
  • Remove the slightly obstructive overlay scrollbar with apt-get remove overlay-scrollbar
  • Log out, then log back in again but click the Ubuntu logo by your username and select ‘GNOME Flashback (Metacity)’
  • Run gnome-tweak-tool, select Fonts and set the text scaling factor to 0.9, then under Appearance, set the Icon theme to Gnome and Cursor theme to Adwaita. Under Top Bar, check ‘Show date’ and ‘Show seconds’

Refreshingly easy, isn’t it? I’m going to be updating to 14.04LTS when it’s released!

Really Useful Things

Here are five things that help my quest to reduce the amount of time I spend supporting and increase the amount of time I spend doing:

  • Google Apps for Business – £3.30 per user per month, and it means I can use Google Drive (although an Ubuntu client that isn’t InSync would rock) to hold PDFs and reference data I use all the time, and not have to worry about email hosting.
  • LastPass – password management. Much easier than having a GPG-encrypted text file that you sync to DropBox. Premium is only $12 (£8) per year.
  • GitHub – online project hosting using Git. I use GitHub by default for almost everything I do, private and public. A snip at $7 (£4.60) per month.
  • Atlassian Hosted JIRA – which, love it or hate it, works well for OpenTrainTimes bug tracking. Reasonably priced at $10 (£6) per month for up to 10 users.
  • Evernote Premium – write notes, sync them automatically and go search. I still love my Moleskine notebook for taking most meeting notes, and it looks great too – but sometimes you just gotta type electronically. £4 per month, but I really wish they’d come up with a sensible client for Ubuntu.

Installing an Olive on VirtualBox

Although it exists in many other places, I’ve not found a comprehensive set of instructions for installing JunOS 11.4 under VirtualBox that actually works. As I found, It isn’t too difficult, and only took me a day or so.

You’ll need to create a FreeBSD machine in VirtualBox with 1Gb of RAM and 5Gb of disk space. Select one or more network interfaces as the Intel PRO/1000 MT Desktop adapter. If you’re running on a UNIX system, additionally redirect the COM1 serial port to a host pipe called /tmp/com1. Use the command socat /tmp/com - to show the output from the serial console, which is useful after booting the Olive for the first time.

Installing FreeBSD

  • Download the FreeBSD 4.4 mini ISO from ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/ISO-IMAGES/4.4/4.4-mini.iso
  • Create a FreeBSD machine with 1Gb of RAM. Create a VDI startup disk (either dynamically allocated or fixed size) of 4Gb
  • Edit the machine settings and enable network adapters as Intel PRO/1000 MT Desktop (82540EM) adapters. Although FreeBSD 4.4 won’t support these, JunOS 11.4 will.
  • Attach the ISO image to the CD/DVD drive in the machine, and boot it.
  • When FreeBSD boots, select ‘Skip kernel configuration and continue with installation’.
  • At the /stand/sysinstall menu, select a Standard installation.
  • At the ‘FDISK Partition Editor’ screen, delete any existing slices and create a single FreeBSD slice covering the entire disk by pressing ‘A’. Press ‘Q’ to finish – changes are automatically saved.
  • At the ‘Install Boot Manager for drive ad0?’ page, select ‘Standard’ so as not to install a boot manager.
  • At the ‘FreeBSD Disklabel Editor’ screen, create partitions as follows:
    • 1G filesystem mounted on /
    • 512M swap partition
    • 512M filesystem mounted on /config
    • Remaining space in a filesystem mounted on /var
  • Press ‘Q’ to finish – changes are automatically saved.
  • At the ‘Choose Distributions’ page, select ‘X’ to exit’.
  • At the ‘Choose Installation Media’ page, select ‘Install from a FreeBSD CD/DVD’.
  • The disk will now be partitioned, filesystems created and FreeBSD installed.
  • After installation, the following questions will appear. Answer ‘No’ to each:
    • Would you like to configure any Ethernet or SLIP/PPP network devices?
    • Do you want this machine to function as a network gateway?
    • Do you want to configure inetd and simple internet services?
    • Do you want to have anonymous FTP access to this machine?
    • Do you want to configure this machine as an NFS server?
    • Do you want to configure this machine as an NFS client?
    • Do you want to select a default security profile for this host?
    • Would you like to customise your system console settings?
  • Answer ‘Yes’ to “Would you like to set this machine’s time zone now?”. Select ‘No’ to “Is this machine’s CMOS clock set to UTC?”, then select ‘8 – Europe’, ’42 – United Kingdom’ then ‘1 – Great Britain’. Answer ‘Yes’ to “Does the abbreviation ‘BST’ look reasonable?”
  • Answer ‘No’ to “Would you like to enable Linux binary compatibility?”
  • Answer ‘No’ to “Does this system have a USB mouse attached to it?”, then select ‘Exit’ at the “Please configure your mouse” menu
  • Answer ‘No’ to the question regarding browsing the FreeBSD package collection.
  • Answer ‘No’ to the question regarding adding initial user accounts.
  • Set a password for the ‘root’ user.
  • Answer ‘No’ to the question regarding the last chance to set options.
  • Select ‘X’ to exit installation, detach the ISO image and select ‘Yes’ to the “Are you sure you wish to exit?” question.
  • The virtual machine will now restart.

Creating a JunOS installation image

Download junos-olive-patch.sh and run it against a standard JunOS installation image, for example:

user@host:~$ ./junos-olive-patch.sh jinstall-11.4R2.14-domestic.tgz

This will unpack and patch the installation file, replacing ‘checkpic’ in the pkgtools archive with a symbolic link to /bin/true so the package will install on an Olive.

To get this installation package on to VirtualBox, make it in to an ISO file using mkisofs:

user@host:~$ mkisofs jinstall-11.4R2.14-domestic.tgz > olive.iso

Attach the ISO image to the Olive in VirtualBox, then mount the ISO file on FreeBSD by typing mount /cdrom. Install the package by running pkg_add -f jinstall-11.4R2.14-domestic.tgz.

Reboot, and wait for the BTX loader screen to disappear – this may take several minutes. If you’re using socat to monitor the output of the console, you’ll see JunOS being installed.