Site menu:

Sponsored by

Bitcube Ltd.  Expert Linux Consultancy

Categories

Meta

Site search

 

September 2014
M T W T F S S
« Jul    
1234567
891011121314
15161718192021
22232425262728
2930  

Archives

Links:

I android (apologies to Issac Asimov)

Thanks to [http://imranchaudhry.com/?p=163 Imran] for the neat tip.

Now everyone can see what I have installed on my phone. The keypass program is a nice new addition found by looking at Imran’s list. Hmm – this isn’t actually the complete list, for example aNetShare isn’t listed in this widget, but it is installed. What a shame :(


Other things I change:
* notification ringtone: simple high
* notifications: flash trackball on all except email
* data sync: bg, autosync
* location: wifi, no gps
* enable apps from unknown sources

I want a hero (v2.1)

After a long time awaiting I finally succumbed to impatience and upgraded my Hero phone to v2.1.

I mostly followed [http://forums.hexus.net/mobile-phones-accessories/186335-htc-hero-custom-rom-guide.html this guide] but followed step 1 from [http://sites.google.com/site/roothtchero/step1 here].

In short:
* use [http://www.htc.com/uk/SupportViewNews.aspx?dl_id=675&news_id=261 this program] to flash the phone to 2.73.61.5
* copy an “Amon Ra recovery image” to the root of the SD card (i.e. plug phone in via USB and select “mount” in the notification screen)
* also copy over a new image from http://www.villainrom.co.uk (villainrom v10 seems good)
* install “flashrec” application (you may need to download flashrec and then use “Astro” file manager to install it
* run flashrec
** select backup
** now select flash and enter /sdcard/recovery-RA-hero-v1.5.2.img (or whatever the name of the Amon Ra recovery images is (prefixed with “/sdcard/”)
* now shutdown the phone
* switch on the phone but hold down both “home” and “power” buttons until you get a warning triangle
* you then need to get the menu to appear – not _quite_ sure how – try pressing home or menu buttons?
** use the trackball to navigate
** if at this point you need to transfer files, just use the “USB-MS toggle” to do so
* backup! (Nand backup does core bits, BART will backup apps too)
* Wipe (you _must_ do this to avoid problems)
** wipe data/factory reset
** wipe dalvik-cache (this may error, don’t worry)
* flash zip from sdcard (note that there is a progress bar in the background)
* reboot
* the first guide says that the first reboot may not work properly and that you may need to take the battery out and retry
* finally note that the things _will_ be slow at first as caches need to be rebuilt

I originally tried superhero but I missed some HTC bits and sense so I’m now using the standard villainrom.

Recovery image booted:

hero recovery firmware

Firmware flashing in progress (see progress bar in the background):
Flashing hero firmware

Finally the rather naff boot screen. “brilliant” but not in a good way – black is nicer, and please turn the backlight off.
Boot screen

HMRC PAYE Linux support

I’ve received my “New employers” CD-ROM through the post – and it claims to support “major Linux distributions” (they really should list the ones they’ve tested).

64-bit doesn’t appear to be tested at all – it’s a pure 32-bit application. However let’s see how far we can go – these instructions are for 64-bit Debian unstable.

* /cdrom/EmployerCDROM.linux results in:
** ./employercdrom.linux: error while loading shared libraries: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
* an “ls” shows that the file is libpython25so1.0 – i.e. mangled to old DOS 8.3 format
* fix this by using “UDF” not ISO9660 filessytem
** if they had burnt it with rockridge extensions then this would have worked as a CDROM
* mount -t udf /dev/sr0 /dvd

* ./splash: error while loading shared libraries: libsqlite3.so.0: cannot open shared object file: No such file or directory
** oh dear, lots of missing libraries (as I’m running 32-bit)
** download the 32-bit deb of libsqlite3, “dpkg-deb -x libsqlite3*deb /tmp/sql; cp -a /tmp/sql/usr/lib/libsql* /usr/lib32″
* trying this many times you will eventually do this (NB: sqlite3 doesn’t have an ia32 package)
** apt-get install ia32-libs-libidn11 ia32-libs-libnspr4 ia32-libs-libnss3
* for i in libidn.so.11 libnss3.so libsmime3.so libssl3.so libplds4.so libplc4.so libnspr4.so libnssutil3.so libnssutil3.so.1d; do ln -s /emul/ia32-linux/usr/lib/$i /usr/lib32/; done
** this is likely to be incomplete – I already had ia32-libs and ia32-libs-gtk installed

Now the program runs, but then aborts with no messages. Take a look in /tmp,. you’ll see that it’s been dumping a randomly named 10MB binary there and not tidying up. There is also an EmployerCDROM_output.log which says:

Checking for existing HMRC processes...
    ProcessID:  6523  System:  linux2
HMRC Application Initialising...
start time:  Mon May  3 10:01:52 2010
config module initialising:
  Loading master configuration from /dvd/shared/xml/configuration.xml
  Running from CD-ROM - version 2.0.084.11355 on Linux
    Installpath = /dvd
    Serverpath = /dvd/server
    Userpath = 
    User XML path = 
  Finished config initialisation.
Gui:
    base url: http://127.0.0.1:46721
Server now listening on 127.0.0.1:46721 (http://127.0.0.1:46721)
    Launching Flash interface.
The server has not received any requests in the last 20 seconds
Sending stop signal...
  
  Server has stopped listening.
end time:  Mon May  3 10:02:32 2010
HMRC Application was exited.

It appears to be trying to run a web browser, failing and so quits since it hasn’t received a request. If you point a web browser at the address listed above (http://127.0.0.1:46721) then you’ll see the application :-)

Next steps are to install this properly, not least since there are updates which need to be applied.

Questions? We don’t need so many questions.

Yesterday I performed an (alternative CD) install of Ubuntu Lucid. The installer doesn’t ask many questions – in fact, I’d argue that it didn’t ask enough since there was no choice in which bundles of packages to install.

During the install, I had a thought which would allow some defaults to be accurate rather than hardcoded. Use GeoIP. This is a way where by knowing someone’s external IP address you can find their location to some extent – down to country & timezone should be fairly easy (except in large countries).

There are a few flaws in this plan. Whilst it would probably work quite well on a wired connection, a wireless connection is trickier due to the extra questions (which normally you’d have to answer later anyhow, albeit post-install). It also necessitates reordering the installer which isn’t to be done lightly – for example if you do ask questions about wireless, which language is that text displayed in? This is one reason why locale questions are asked so early – most people will scroll up and down the list until they see their language (displayed in that language, not English).

Overall, I think it would be interesting to perhaps add this support in for cases where no prompting is required – wired network, open access point.

Planning

A large part of system administration is planning at one level or another:
* strategic planning
* tactical planning
* contingency planning

Strategic planning is a fancier way of saying “long-term planning”. This is important as you need to know where you are going so that you can take steps along that route and not in the opposite direction. For example, if your strategic direction is that you will run everything on Linux and move off Solaris, you need to start ensuring that products are purchased or developed with this in mind. Otherwise your long terms goals will drift or be missed entirely.

Tactical planning is more short term, you could even call them “stop-gap” solutions in the worst case. Ideally they are actually steps towards that strategic goal, however this isn’t always possible. When they aren’t aligned with your target, you probably want to minimise your expenditure in them as you are hoping to replace the stop gap solution with something better and so the last thing you want to do is build upon it.

Contingency planning is fairly self-explanatory, however several recent issues has brought this more into focus for me and also highlights the important step of mitigation. There was a recent plane crash which tragically resulted in the deaths of many top Polish government officials. Contingency planning here would hopefully allow others to take over the roles of the deceased with minimal disruption. Mitigation would have ensured that there were restrictions on how many people were in the same form of transportation in case the worst happened.

The second event that’s happened recently was the volcanic ash cloud from Eyjafjallajokull in Iceland. After earlier problems that jets have encountered with volcanic ash, the airspaces over much of Europe were closed. After six days they were reopened once the authorities were satisfied that it was safe (and no doubt due to pressure from airlines and the public). The best information available at the start of the troubles from all the manufacturers involved (covering both the engine and the airplane) was that the planes should _not_ fly. It was only later after more tests were hurriedly carried out that the “safe” concentration of ash was increased substantially – this is what allowed the airlines to fly once again.

Six days to perform these test doesn’t seem very long to me. There are thousands of flights each day with an excellent track record – we shouldn’t jeopardise passengers just due to some pressure until we were certain. Airlines are now complaining that:
* it took to long to open the airspace
* they shouldn’t have to pay compensation to passengers at the rates entombed in law
* they want compensation themselves

I’m sorry, but they should have to deal with it. If they had planned properly (for this admittedly rare occurrence) they already have test data showing safe volumes of ash to fly through. Therefore none of the delay would have occurred. Furthermore if they didn’t want to pay those levels of compensation they could have done something about it earlier – for example take out insurance against such a case. If they choose not to do the preparation and not to take mitigating steps then it’s tough luck as far as I’m concerned. If my baggage is damaged by the horrific mishandling that occurs, I have to claim on my insurance (and if I have no insurance I have to take it on the chin as a risk of flying).

Flexible working

About five months ago I left my old job and started my own [http://bitcube.co.uk Linux infrastructure consultancy]. It’s been a nice ride, the freedom and control is fabulous.

One benefit I particularly like is the ability to be really flexible with my hours. Whilst I used to take the odd hour out to cook a nice lunch or to grab some food, I still had to be around during “core hours”. That’s no longer the case. If I’ve got no client work to do then I can do what I like – take the day off, do some DIY, or more usually do some internal work – learning new technologies, improving my puppet configurations or perhaps working on the finance side. I don’t even feel guilty when I take time off – it’s my company after all.

I’m very fortunate that some of my clients allow this flexibility to extend to the work – they appreciate that it doesn’t really matter if I work 9-5 Mon-Fri or at 11pm on a Sunday. You still need to take suitable precautions – breaking a system without realising it at 7pm on a Friday would be very bad. In addition I can do the work when I’m in the mood (or zone), as opposed to when other times when I may be distracted. I personally find it much easier to concentrate in the evening rather than during the day.

There are other upsides, a recent customer needs some setup done and although I’m pretty maxed out, I can find a few hours at the weekend and in the evenings (which can be a bit of dead time given the scarcity of anything decent on TV). This way they have an improved system weeks earlier than would otherwise be possible (and since this improves their development rate that can’t be underestimated). From my point of view, I am able to work more effectively – using otherwise “dead” time during the week means that I could take a day “off” in return when it suits me. This is called a win-win situation.

It’s often the case that a customer only needs an “80%” solution – however for my personal satisfaction and to improve reuse I normally put in the remaining 20% which typically makes the solution more generic and useful to everyone (including the customer). If I’m working 9-5 then I can’t easily do this, however if my hours are flexible then it’s trivial to do customer work for 2 hours, then “my” work for an hour to finish off that chunk of work before moving onto the next task.

Dumbing down and choices

Or perhaps more contentiously, “Why Mark Shuttleworth is wrong”. Before I get flamed to death, I should point out the “[http://www.omgubuntu.co.uk/2010/03/why-mark-shuttleworth-is-right-ubuntu.html Mark Shuttleworth is right]” post. I believe that what he says is actually correct – there is too much [http://en.wiktionary.org/wiki/bikeshedding bikeshedding] – having a strong leadership is a good thing, even if they occasionally get it wrong.

However, I do have several issues with how these things are done – I’ll mention three examples (all Ubuntu related, but that’s only because they are mostly well known examples):
* [http://www.ivankamajic.com/?p=281 window button placement]
* [http://maketecheasier.com/remove-the-annoying-update-manager-pop-up-in-ubuntu-jaunty/2009/06/18 update manager popup]
* [http://upstart.ubuntu.com/ upstart]

Let’s start with the first one – the change of window buttons (min/max/close) from the right hand side to the left hand side. I personally have no big beef which side they are on, I’m used to them on the right, but I may prefer them on the left – I’m happy to see what happens. The problem is that there is [http://www.ivankamajic.com/?p=281#comment-30887 no simple] way to revert this change in behaviour. For something like this that was _bound_ to upset a reasonable number of people that’s just a bit slack IMO and a (rare) failing of Ubuntu not understanding their userbase. Just a setting under system->preferences->window (preferences/administration – items seem to be randomly placed) would make it easy for people to change and also help defuse the issue.

The update popup has all of the above problems and more. I’m a Unix guru – I’ve been doing this for almost fifteen years, I’ve used twm, fvwm (v1, then v2), I remember Linux 1.1.x and a.out binaries. I don’t want features removed. I don’t want handholding or “are you sure messages” – I like my computer to run with the safety warnings taken off. I fully understand the need to make computers easier to use for the “masses” but please don’t do it at the expense of those of us who are technical. The annoying popup has been turned off by most of the people I know (or they would if they could be bothered) – maybe that’s just my friend being techies.

In case anyone says “hang on, if you are technical, why do you object to gconf?” It’s because I think gconf is an abomination, finding the settings is a complete black art (i.e. you have to Google and hope someone else has found them). Lastly and most importantly, since such a high priority is set on “user friendliness” (as opposed to robustness, features, efficiency or speed of use), anything which results in a gconf tweak is a spectacular FAIL for all but the most esoteric changes.

Lastly we come to upstart. This just smacks of being shoe-horned in as a pet project to me. I remember reading about lots of bugs and code changes in the final fortnight of the Karmic? release cycle. I was personally bitten by it stuffing up the initrd so my laptop was unbootable. At another point I needed to move a simple “respawn” init line to upstart and gave up after a hour due to a complete lack of documentation – utterly unacceptable. Maybe I’m just bitter that they think [https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/304591 removing vital processes] isn’t important.

Sanity restored

I’ve just bought a new toy – a Canon Pixma 250 MFP (Multi Function Peripheral). Basically a colour inkjet printer/scanner/photocopier. £35 from Argos which seemed pretty good, I had to wait a whole minute or two for it to arrive after I ordered it – very impressive.

I did some research and found that new versions of [http://www.sane-project.org/ SANE] (Linux’s scanner library) support it. Unfortunately the last release of SANE was back in May 2009 and whilst that’s not so long ago, companies just _love_ making each scanner just that bit different. There has been some questions asked about when the next version of SANE will be released, but that was over a month ago so it doesn’t look as if things have moved forward a great deal.

Using some details from [http://mp610.blogspot.com/2008/04/give-your-scanner-new-freshly-sane.html here], I cloned the latest SANE git repository, then applied the latest Debian patches over the top. After a bit of digging around, I came up with a set of changes required to build:
* remove tex* stuff from debian/control (I didn’t want to download 500MB of apps)
* comment out sane.ps line from debian/rules due to the lack of tex
* debian/patches/21_sane-config.in_no_rpath.dpatch needs a small adjustment. increase the number of lines from “12″ to “13″, then before LIBS, add:
** LDFLAGS=”@LDFLAGS@ @GPHOTO2@”
* now edit debian/patches/00list
** many patches appear to be included uipstream now
** two patches (09_po_update_es_add_gl and 33_epson2_update) I ignored rather than fixup since they aren’t useful to me

01_missing_pthreads
02_frontends_libs
03_libsane_deps
#04_udev_rules_fix
#05_saned_avahi_fds_fix
06_cap_always_settable
#07_tools_missing_libcam
#08_cardscan_usbids
##09_po_update_es_add_gl
#10_sanei_usb_update
#11_udev_147
#12_saned_polling_fix
#13_saned_aliasing_fix
#20_disable_rpath
21_sane-config.in_no_rpath
22_dll_backend_conf
23_unneeded_doc
24_sane-desc.c_debian_mods
#30_xerox_samsung_ids
#31_genesys_raw_log_fix
32_epson_perfection636
##33_epson2_update
#34_genesys_gl841_cal_fix

* finally I build a package, then installed the resulting libsane and sane-utils packages
** [http://bitcube.co.uk/repo/pool/main/s/sane-backends/libsane_1.0.21~1_amd64.deb libsane_1.0.21-amd64]
** [http://bitcube.co.uk/repo/pool/main/s/sane-backends/sane-utils_1.0.21~1_amd64.deb sane-utils_1.0.21-amd64]

Scripting, dying?

I read way too much, sadly I came across a post this morning about data storage technologies that [http://www.enterprisestorageforum.com/management/features/article.php/3867506/Top-10-Data-Storage-Technologies-That-Coul will die]. Most of those I think are fairly obvious, however some are just wrong and some lack an explanation. I’ll start with the biggest error:

Scripts

Firstly, scripts aren’t anything to do with data storage other than being just general useful things. The gobsmacking phrase “scripts don’t automate well” had me stunned. Of _course_ scripts automate well – it’s been the basis of Unix sysadmin for decades. The implication that the alternative (GUIs in their article) automate well is of course laughable. Perhaps they mean that instead of data retention policy being set by scripts (er, how?) it would be set automatically by backup software. This is the way any decent backup currently works – after all you want to say “please keep three copies of this, at least one a week old and one off site at all times”.

RAID-1

“All the rage in the nineties”. Well, and the noughties too. Yes, RAID-1 is inefficient compared to RAID-5 or RAID-6. If you have an 10 disk array, with RAID-1 you would have 5 disks of storage, with RAID-5 (assuming a hot swap spare) you’d have 8 disks, with RAID-6, 7 disks. As disks have become larger at a faster rate than their performance has increased, their rebuild times have increased – leading many to say that [http://blogs.zdnet.com/storage/?p=162 RAID-5 is obsolete]. However where does this leave RAID-1 – is that as the article claims, obsolete too? Well at large array sizes, if you need high write performance (I’ll assume you have a decent write-caching controller), whilst RAID-5/6 should be fine, RAID-1 will be faster – and with modern large disk sizes, surely the wasteful space is _less_ important than it was since performance, not size is the limiting facter. However the real reason why RAID-1 won’t disappear is on small arrays. If you only have two disks, RAID-1 is the only sane choice. Personally I’d suggest using net/iSCSI/SAN-boot such small systems anyhow if it’s practical.

Tapes

At last, one I do agree with, but I’ll state some reasons. Tapes are horrifically expensive – often more than disk drives. That’s also before you take into account the cost of a tape driver (I’ve certainly seen Fibre Channel drives sold for £6-12K although that was a few years ago). However the two nails in tape’s coffin for me are reliability and (lack of) random access. The former is a personal bugbear – I’ve seen more failures with tape libraries than any other computing hardware. It’s just not possible to get something as complex as a tape mechanism as reliable as the far simpler disk mechanics. I don’t know about long-term archive storage reliability which can be important to certain sectors.

Omission

In my opinion they’ve missed the one technology which will change data storage more than any other – SSDs. In terms of pure IOPS it is now possible to replaces huge storage arrays with a single, cheap SSD. Granted, that SSD won’t last very long – however they are many orders of magnitude faster than HDDs. Such a change in performance hasn’t occurred in computing for a long time – it opens up [http://www.theregister.co.uk/2010/03/12/password_cracking_on_crack/ new ways] to solve problems. SSDs themselves won’t be an obsolete technology, however I wonder what they will render obsolete.

Now over to you to poke holes in _my_ article :-)

Every cloud has a Linux lining

The last few days I’ve spent playing with [http://open.eucalyptus.com Eucalyptus] – the open source [http://en.wikipedia.org/wiki/Amazon_EC2 EC2] equivalent.

Several times I’ve been tearing my hair out – particularly with some image issues (why oh why can’t it use an external database rather than the noddy internal one – that way when it’s confused I can fix it up more easily).

Anyhow I’ve reached the point where I can startup an Ubuntu Karmic image and login (yes, it’s taken a while!), now onto the more interesting things such as actually _using_ it. There are still some challenges left – namely looking at [https://bugs.launchpad.net/ubuntu/+source/eucalyptus/+bug/457283 this problem] and how it may have changed in recent versions of Eucalyptus and Ubuntu Lucid.

As usual, I’ve made copious, detailed notes which will will hopefully help others out, particularly with respect to troubleshooting Eucalyptus. So here is my [http://smop.co.uk/mediawiki/index.php/Eucalyptus Eucalyptus HOWTO].