Dr Administrator

Author's posts

Windows 8 and Ubuntu 12.10 on a Sony Vaio T13 laptop

I wanted to dual boot my new Sony Vaio T13 laptop with Windows 8 and Ubuntu 12.10, as it turned out I found it challenging to setup a true dual boot but I have a satisfactory solution.

This process is not straightforward because the T13 uses the Insyde H2O UEFI instead of a old-style BIOS furthermore since  Windows 8 was pre-installed SecureBoot is switched on, these factors mean that only the most recent, 64-bit version of Ubuntu (12.10) has any chance of installing. Also the T13 has no optical drive so I would need to boot from a USB memory stick.

I’ve installed various Linux distributions over the years but they tend not to be my primary OS, I considered three methods for this operation.

Method 1 – install using Wubi

The Wubi installer is a way of installing a Linux distribution effectively as an application in Windows but apparently this doesn’t work because of incompatibilities in with UEFI. I’ve used Wubi in the past – I like it because it reduces the chances of me rendering my Windows install inoperative via a partitioning mistake.

Method 2 – conventional dual boot installation

As of the 64-bit 12.10 version of Ubuntu it should be possible to do a fairly conventional dual boot installation of Ubuntu onto a machine preloaded with Windows 8. The instructions for this are here, essentially they are:

1. Download the appropriate ISO

2. Transfer the ISO to a USB stick using Universal USB Installer

3. Boot from the USB stick (Shift-restart in Windows 8 gives you lots of options for the necessary fiddling to achieve this)  and follow the installation instructions (here).

However when I did this I kept getting this error:

(initramfs) unable to find a medium containing a live file system.

This error persisted through various combinations of enabled/disabled SecureBoot and boot orderings. I don’t know why this doesn’t work, I suspect that the Universal USB Installer is not creating an appropriate boot device perhaps if I flagged the USB drive as legacy rather than UEFI it might work. I was feeling slightly nervous about this because there were some indications (here) that if I had succeeded in producing a new disk partition for Ubuntu then I may have lost my Windows partition! Doing clean installs of both Windows 8 and Ubuntu onto a machine looks like it might be a bit simper (here).

Maybe I should have followed the instructions here, the trick seems to be to create your Ubuntu partition using Windows 8 rather than trying to do it with the Ubuntu installer.

In some ways the problem here is finding an excess of instructions!

Method 3 – install on a virtual machine

Following a suggest on twitter my third method was to try installing Ubuntu onto a virtual machine inside Windows 8, if I’d have splashed out on Windows 8 Pro then I could have used Hyper-V as my virtual machine. However, I’m using VirtualBox. The instructions for installing Ubuntu inside VirtualBox  are here, I switched on hardware virtualization support which was disabled by default.

This worked pretty smoothly, you don’t even need to produce a USB stick from which to boot, simply mount the ISO you downloaded as a virtual optical drive in VirtualBox. After initial installation Ubuntu was rather slow and unresponsive, I think this might have been due to downloading updates but I’m not sure. The only problem was that Ubuntu inside the VirtualBox couldn’t display at full screen resolution. This problem should be fixed by installing “Guest Additions” – this is software that lives on the guest operating system (the one inside the VirtualBox) and helps it interface with the host operating system. You can install the Guest Additions from an ISO image supplied with VirtualBox, the instructions for this are here. I failed to do this by not reading the instructions, in particular I didn’t install Dynamic Kernel Module Support (DKMS) properly. This was a recoverable mistake though, I learnt here that I needed to do this commandline first:

sudo apt-get install build-essential linux-headers-$(uname -r)

and then I re-installed using this commandline:

sudo apt-get install virtualbox-guest-utils

And it worked nicely on rebooting the virtual machine. So now I have Ubuntu 12.10 running in a VirtualBox inside Windows 8 aside from a hint of the VirtualBox menu bar at the bottom of the screen I could just as well be dual booting. Theoretically I might experience reduced performance by not running Ubuntu natively but I have 8GB of RAM in my laptop and an i7 processor so I suspect this won’t be an issue.

Now my eyes have been opened to the magic of virtual machines I want to install more! Sadly Apple’s OS X is not supported for such ventures.

I don’t claim to be an expert in this sort of thing so any comments on my understanding and technique are welcome!

Update

The Ubuntu in the virtual machine doesn’t find my monitor resolution (1920×1080), so I apply this fix (link)

Also I use this technique, adding vboxvideo to modules, to improve performance (link).

Possibly I need to do this thing in the host machine (link):

VBoxManage setextradata global GUI/MaxGuestResolution any

Review of the year: 2012

IMG_1236It has become a tradition for me to review my posts at the end of each year, OK I’ve done it twice before and now I find myself sounding like a teenage diarist.

Clearly the main event of this year has been The Arrival; Thomas was born on 4th February, as I write he is systematically throwing all his books on the floor whilst muttering to himself, it is 6am. I haven’t written much about Thomas but he fills my real life, looking after a small child is very much like conducting an experiment at a central facility.

I’ve managed to keep reading although at a somewhat reduced rate. I read about geodesy in “The Great Arc” and “Measure of the Earth”, both tales of considerable derring-do conducted in the jungles of India and Ecuador respectively. I read about scientific instruments, in Stargazers, “Decoding the Heavens”, "A computer called Leo" and "The History of Clocks & Watches". The subjects of the last two of these are obvious, the first is on telescopes and the second on the Antikythera mechanism, an astoundingly complex mechanical model of the heavens. I read about Alan Turing, Christiaan Huygens and Benjamin Franklin.

If I was forced to pick a favourite book I think I would go for Arthur Koestler’s "The Sleepwalkers" which traces the development of cosmology from the ancient Greeks to Isaac Newton with its focus on the journey from Copernicus, still obsessed with celestial circles, to Kepler who started to sound like a modern physicist. Keplers’ attempts to identify elliptic orbits takes on a pantomime air at some points… “They’re right in front of you!”. Or perhaps my favourite should be Stargazers since after reading this I bought a telescope – more of which below.

Slightly more miscellaneously I read Tim Harford’s "Adapt" about trial and error as an approach to public policy and management, "The Geek Manifesto" on science and politics and "The Etymologicon" – a casual journey through where words come from. Finally, I also read "Visualize This", capturing the essence of my data twiddling and cluing me into tidying up my plots using Inkscape (or Adobe Illustrator if you have the cash).

Another new thing this year was a telescope, rather than appear some sort of dedicated follower of fashion, rushing out to buy one in the wake of a celebrity astronomonothon, I delayed until May. This turned out to be a bad idea: it doesn’t get properly dark until two hours after sunset and starts to get light two hours before dawn difficult at the best of times, impossible when combined with childcare responsibilities. Consequently I got little star viewing action for quite some time, except for the Sun. My telescope review post (including video) was my most read post of the year. It has been magical though, my first view of Saturn with its rings had me hopping up and down like a small child! More recently I got Jupiter and the four moons discovered by Galileo. I’m still trying for a deep sky object, I don’t count my pictures of the whole Milky Way taken through a normal camera lens.

Not much else in the way of photography this year, obviously I have an enormous collection of photos of Thomas but I won’t bore you with them but I’ll say to expecting parents who are also keen photographers that a 50mm f/1.4 lens is ideal for photographing small children since you are often indoors operating in relatively low light. I also took some pictures of Chester Cathedral, Beeston Castle and in the area of Harlech, where we took our first holiday with Thomas.

I did a little bit of fiddling with data this year, plotting the spending of the Board of Longitude, finding that they did a great deal to support John Harrison through his life, and looking at how quarterly GDP growth figures are revised – basically they’re all over the place!

I also pottered around a little with science policy and politics. “I am Dr Faustus” was an oft-read post, in which I disagreed with Ananyo Bhattacharya’s assertion that basic research in the UK had been corrupted by the idea of showing some application. “GCSE results through the ages” also got a lot of hits, it showed the changes in grades for GCSE and A levels over the years. 

And as the year came to an end I handed in my notice to go to a new job – starting in March. I used some of my blog posts in support of my application!

Book review: The Sleepwalkers: A History of Man’s Changing Vision of the Universe by Arthur Koestler

Sleepwalkers_ArthurKoestler.Another result of my plea for reading suggestions on twitter; this is a review and summary of Arthur Koestler’s book “The Sleepwalkers: A History of Man’s Changing Vision of the Universe”. The book is a history of cosmology running from Pythagoras, in the 6th century BC, to Galileo who spanned the end of the 16th century, just touching lightly on Newton. It traces a revolution from a time when the cosmos, beyond the earth, was considered different, stable and perfect, to a time when it was shown to be subject to earthly physics, be changeable and not perfect by any reasonable definition.

Kuhn’s language of paradigm shifts seems rather overused to me but here is an example of a true paradigm shift. The sleepwalkers in the title refers to the idea that the protagonists didn’t really know where they were headed with their ideas and quite often were lucky with errors which cancelled each other out.

The book starts with a cursory look at Babylonian and early Greek astronomy; despite considerable observational acumen their models of the universe were outright mythical. The Pythagoranean Brotherhood although in many senses still mystical started to think about the physics of the universe. I have a tendency to think of the ancient Greeks as one blob but as the book makes clear there is a huge span of time, and outlook, between Pythagoras, Aristotle and Plato and Ptolemy. Koestler is quite clearly disappointed with the Greeks: they make a promising start with Pythagoras, Aristarchus developed a heliocentric model for the solar system and then with Plato, Aristotle and Ptolemy they regress back to a geocentric model.

Following on from the Greeks the Middle Ages are covered, James Hannam in his book “God’s Philosophers” has covered why this period wasn’t all that bad in terms of intellectual development. Koestler is less sympathetic, his key accusations are that they philosophers of the middle ages were in thrall to the later Greeks and furthermore there were elements of Christian theology that abjured the pleasure of knowledge for knowledge’s sake.

After these preliminaries, Koestler turns to the core of his work: the cosmological developments of Copernicus, Tycho Brahe, Johannes Kepler and Galileo Galilei.

The model of the universe handed down from the ancient Greeks was one of circles (often referred to in this context as epicycles), they believed that motion in a circle was perfect, that the heavens were a separate, perfect realm and that therefore all motion in the heavens must be based on circular motion. Further, the model dominating at the end of their period, held that the earth lay at the centre of these circular motions. The only problem with this model is that it doesn’t fit well the observed motions of the sun, moon, Mercury, Venus, Mars, Jupiter and Saturn – the observable solar system which lay against an unchanging starry background. Or rather you can get a rough fit at the expense of stacking together a great number of epicycles – something like 50.

Copernicus’ contribution, published on his death in 1543, was to put the sun back at the centre of the universe. Copernicus led a rather uneventful life, was no sort of astronomical observer and only published his thesis at the end of his life at the strong urging of Georg Joachim Rheticus. He’d discussed his model fairly freely during his life, and his reasons for not publishing were more to do with fear of ridicule from his contemporaries rather than theological pressure. After his death his work, with the exception of the astronomical tables, sank into obscurity partly because it was a difficult read and partly because he managed to ostracise his former cheerleader, Rheticus. Copernicus’ model still holds to the epicycles of the Greeks, and only marginally reduces the complexity of the model.

Next up comes Johannes Kepler, interspersed with Tycho Brahe. Brahe was an astronomical observer and nobleman, funded very well by the Danish king; given his own island Hveen where he built his observatory. As a keen astrologer he began his observation programme when he found a conjunction of Jupiter and Saturn was poorly predicted by current astronomical tables – how can you cast an accurate fortune under these circumstances?

Kepler was a theoretician rather than an observer but also a keen astrologer. I emphasise this because these days astrology is not held in high regard but it is the father of observational astronomy. He had started to develop a model of the solar system based on the Platonic solids – something of a mystical exercise but realised he needed better data to support his model. Brahe was the man with the data, Kepler was only just in time though – he travelled to work with Brahe when Brahe moved to Prague less than 2 years later Brahe was dead. Nowadays we know Kepler for his three laws of planetary motion – it’s worth noting that Kepler’s laws are labelled retrospectively.)

He left copious records of his progress which Koestler traces in great detail, Kepler’s struggle to recognise that planetary orbits were ellipses was heroic and has something of a pantomime air to it – “They’re right in front of you!”. His approach was unprecedented in the sense that he sought to accurately model the very best, most recent measurements. Kepler also made some attempts at a physical model to describe the motions but ultimately he is remembered for the detailed description of their motion. Since it is not central to his theme, Koestler makes only passing reference to Kepler’s work on optics.

The penultimate figure in the story is Galileo, despite Kepler’s best efforts Galileo pretty much ignored him. Galileo gets quite short shrift from Koestler who feels that he brought his troubles with the Catholic Church upon himself. Reading this account his position is not unreasonable. Galileo’s two big contributions to the story are his promotion and use of the telescope, and his work on the motion of terrestrial bodies, the generalisation of which and application to the solar system was Newton’s great triumph. Cosmologically he was only later in his life a supporter of the somewhat retro Copernican model which was a cul-de-sac in terms of theoretical developments. At the time the Catholic Church, particularly the Jesuits, were interested in astronomy and not particularly hardline about the interpretation of Scripture to fit observations. Galileo wound them up both by claiming all newly observed celestial phenomena as his own and by putting the words of the Pope in the mouth of an idiot in one of his Dialogues.

This highlights two of the wider themes that Koestler brings to his book. At one point he describes his cast of characters as “moral dwarves”, he states this is relative to their scientific achievements but returns to this theme in the epilogue where he feels that our scientific developments have not been matched by our spiritual development. The second is the schism between science and the Church that began in this period, Koestler seems to put much of the blame for this on Galileo’s head feeling that it is by no means inevitable. In the epilogue he also draws a comparison between biological evolution and scientific developments, highlighting specifically that there are long periods of not that much happening and many diversions from the “true” path.

The book finishes with a brief mention of Newton’s synthesis of Kepler’s laws and Galileo’s dynamics to produce a model of the solar system which is close to that which we hold today.

This really is a rollicking good read! This is a relatively old book, published in 1959 and one might anticipate that it has not fully caught up with modern historiography however a brief look around the internet suggests that he is not criticised in any great sense. Koestler does tend to focus on a limited number of “great” individuals and goes for “firsts” but this perhaps is what makes it a good read.

Footnotes

My Evernotes for the book are here, last page of the book at the top!

By Jupiter!

MVI_1270-001

Jupiter (From video acquired on Celestron NexStar 5SE, Baader Hyperion zoom eyepiece at 8mm,Canon 600D, 1/30s at ISO800 stacked in Registax6)

This morning I managed some photos of Jupiter through the telescope, a Celestron NexStar 5SE.

This was helped with my latest purchase: a Baader Hyperion 8mm-24mm zoom eyepiece – this gives me more magnification and allows me to attach to my Canon 600D camera via a couple of mounting rings (here and here). Previously I could only get low magnification on my camera, or high magnification via a 3x Barlow lens.

The Baader-Hyperion is a nice bit of kit, instructions are minimal though so working out how to attach the camera was a case of twisting various bits of the eyepiece to find out what unscrewed – I did this in the light a couple of days ago. The only small problem is that once the camera is attached to the eyepiece it rotates when the zoom level is changed.

I left out the Star Diagonal for these images, this is Celestron’s right angle bending device which gives better naked eye viewing because you can look through the eyepiece from the standing position rather than crawling around on the floor. However, it does seem to introduce some chromatic aberration. The Canon 600D has a rotatable LCD which gives a reasonable viewing position even without the Star Diagonal.

I had a rather disappointing try at Jupiter a few days ago, disappointing because the night started clear but had clouded over almost completely by the time I got my telescope out; then the neighbours started letting off fireworks; then I couldn’t remember how to work my camera in the dark and then it started raining! On top of all that my Baader Hyperion eyepiece hadn’t turned up.

The useful thing I got out of the evening was a fair idea of appropriate ISO number and exposure times to use – Jupiter is surprisingly bright and needs something like ISO800 at 1/50s on my ‘scope, even at high magnification.

IMG_1269

Jupiter, single image Celestron NexStar 5SE, Baader Hyperion zoom eyepiece at 8mm, Canon 600D, 1/50s at ISO800

Jupiter was one of Galileo’s first targets for his telescope in the early 17th century, importantly he observed the four brightest Jovian moons (Callisto, Io, Europe and Ganymede). Significant because they orbited Jupiter, not the sun or the earth and they changed from night to night – at the time the stars were supposed to be immutable and rotate around the earth, or at least the Sun.

You can see these in two photos I took, on 5th and 10th November – the moons have moved quite obviously.

Jupiter_5thNov

Jupiter and moons on 5th November at 8pm (Celestron NexStar 5SE, 1/4s at ISO6400)

Jupiter_10thNov

Jupiter and moons on 10th November at 5am (Celestron NexStar 5SE, Baader Hyperion zoom eyepiece at 16mm?, 1/50s at ISO6400)

Actually, it’s not quite that simple: the photo from the 5th was taken in the early evening with Jupiter in the east whilst that on the 10th was taken in the early morning with Jupiter in the west. Jupiter appears to move between these two locations because of the earth’s rotation and this also means the orientation changes. Not only this, my telescope was configured differently on the two occasions: the Star Diagonal + camera combo flips the image vertically whilst the direct eyepiece view flips both horizontally and vertically. I’ve rectified the images appropriately, and labelled them following Stellarium.

I also took some video on the 600D. You can see it here, the juddering at the beginning and end is the result of me poking buttons on the camera. The rippling of the image is the “seeing”, it’s caused by the atmosphere. The point of taking video is that it can be used to mitigate the effect “seeing” by averaging frames, I did this using Registax 6 but first I had to convert the video from Quicktime to avi format using ffmpeg:

ffmpeg –i filename.mov –sameq filename.avi

ffmpeg can do anything with video, if you give it the right incantation, in this case it recognises that I want to convert an input video from mov (Quicktime) format to avi format, the –sameq flag tells it not to drop the quality of the video as it does so.

I have to admit to not really knowing how to use Registax, I simply let it do its default thing and the result looked okay:

MVI_1270-001

Jupiter (From video acquired on Celestron NexStar 5SE, Baader Hyperion zoom eyepiece at 8mm,Canon 600D, 1/30s at ISO800 stacked in Registax6)

A fun half hour of imaging, I’d have moved on to another target if I’d planned ahead. The earlier, unsuccessful imaging session was helpful in getting me close to the right camera settings and spurring me to learn how to learn how to use the camera in the dark. The Baader Hyperion eyepiece is rather nice!

Book Review: Alan Turing: The Enigma by Andrew Hodges

2012editionA brief panic over running out of things to read led me to poll my twitter followers for suggestions, Andrew Hodges’ biography of Alan Turing, Alan Turing: The Enigma  was one result of that poll. Turing is most famous for his cryptanalysis work at Bletchley Park during the Second World War. He was born 23rd June 1912, so this is his 100th anniversary year. He was the child of families in the Indian Civil Service, with a baronetcy in another branch of the family.

The attitude of his public school, Sherbourne, was very much classics first, this attitude seems to have been common and perhaps persists today. Turing was something of an erratic student, outstanding in the things that interested him (although not necessarily at all tidy) and very poor in those things that did not interest him.

After Sherbourne he went to King’s College, Cambridge University on a scholarship for which he had made several attempts (one for my old college, Pembroke). The value of the scholarship, £80 per annum, is quite striking: it is double the value of unemployment benefit and half that of a skilled worker. He started study in 1931, on the mathematics Tripos. His scholarship examination performance was not outstanding. Significant at this time is the death of his close school friend, Christopher Morcom in 1930.

King’s is a notorious hotbed of radicals, and at this time Communism was somewhat in vogue, a likely stimulus for this was the Great Depression: capitalism was seen to be failing and Communism offered, at the time, an attractive alternative. Turing does not appear to have been particularly politically active though.

During his undergraduate degree, in 1933, he provided a proof of the Central Limit Theorem – it turns out a proof had already been made but this was his first significant work. He then went on to answer Hilbert’s Entscheidungsproblem (German for “Decision Problem) in mathematics with his paper, “On computable numbers”1. This is the work in which he introduced the idea of a universal machine that could read symbols from a tape, adjust its internal state on the basis of those symbols and write symbols on the tape. The revelation for me in this work was that mathematicians of Turing’s era were considering numbers and the operations on numbers to have equivalent status. It opens the floodgates for a digital computer of the modern design: data and instructions that act on data are simply bits in memory there is nothing special about either of them. In the period towards the Second World War a variety of specialised electromechanical computing devices were built, analogue hardware which attacked just one problem. Turing’s universal machine, whilst proving that it could not solve every problem, highlighted the fact that an awful lot of problems could be solved with a general computing machine – to switch to a different problem, simply change the program.

Alonzo Church, at Princeton University, produced an answer for the Entscheidungsproblem  at the same time; Turing went to Princeton to study for his doctorate with Church as his supervisor.

Turing had been involved in a minor way in codebreaking before the outbreak of World War II and he was assigned to Bletchley Park immediately war started. His work on the “Turing machine” provides a clear background for attacking German codes based on the Enigma machine. This is not the place to relate in detail the work at Bletchley: Turing’s part in it was as something of a mathematical guru but also someone interested in producing practical solutions to problems. The triumph of Bletchley was not the breaking of individual messages but the systematic breaking of German systems of communication. Frequently, it was the breaking of a system which was critical in principle the Enigma machine (or variants of it) could offer practically unbreakable codes but in practice the way it was used offered a way in. Towards the end of the war Turing was no longer needed at Bletchley and he moved to a neighbouring establishment, Hanslope Park where he built a speech encrypting system, Delilah with Don Bayley – again a very practical activity.

Following the war Turing was seconded to the National Physical Laboratory where it was intended he would help build ACE (a general purpose computer), however this was not to be – in contrast to work during the war building ACE was a slow frustrating process and ultimately he left for Manchester University who were building their own computer. Again Turing shows a high degree of practicality: he worked out that an alcohol water mixture close to the composition of gin would be almost as good as mercury for delay line memory*. Philosophically Turing’s vision for ACE was different from the American vision for electronic computing led by Von Neumann: Turing sought the simplest possible computing machinery, relying on programming to carry out complex tasks – the American vision tended towards more complex hardware. Turing was thinking about software, a frustrating process in the absence of any but the most limited working hardware and also thinking more broadly about machine intelligence.

It was after the war that Turing also became interested in morphogenesis2 – how complex forms emerge from undifferentiated blobs in the natural world, based on the kinetics of chemical reactions. He used the early Manchester computer to carry out simulations in this area. This work harks back to some practical calculations on chemical kinetics which he did before going to university.

Turing’s suicide comes rather abruptly towards the end of the book. Turing had been convicted of indecency in 1952, and had undergone hormone therapy as an alternative to prison to “correct” his homosexuality. This treatment had ended a year before his suicide in 1954. By this time the UK government had tacitly moved to a position where no homosexual could work in sensitive government areas such as GCHQ. However, there is no direct evidence that this was putting pressure on Turing personally. Reading the book there is no sick feeling of inevitability as Turing approaches the end you know he has.

Currently there are calls for Turing to be formally pardoned for his 1952 indecency conviction, personally I’m ambivalent about this – a personal pardon for Turing is irrelevant: legal sanctions against homosexual men, in particular, were widespread at the time. An individual pardon for Turing seems to say, “all those other convictions were fine, but Turing did great things so should be pardoned”. Arnold Murray, the man with whom Turing was convicted was nineteen at the time, an age at which their activities were illegal in the UK until 2000.

What struck me most about Turing from this book was his willingness to engage with practical, engineering solutions to the results his mathematical studies produced.

Hodges’ book is excellent: it’s thorough, demonstrates deep knowledge of the areas in which Turing worked and draws on personal interviews with many of the people Turing worked with.

Footnotes

1. “On computable numbers, with an application to the Entscheidungsproblem”, A.M. Turing, Proceedings of the London Mathematical Society 42:230-265 (1936).

2. “The Chemical Basis of Morphogenesis”, A.M. Turing, Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences, Vol. 237, No. 641. (Aug. 14, 1952), pp. 37-72.

3. My Evernotes for the book

4. Andrew Hodges’ website to accompany the book (link)