Archive for the ‘ Uncategorized ’ Category

Killing and Reviving an Aspire One

I just spent 2 hours reviving my Aspire One netbook after inadvertently killing it whilst fiddling about configuring dropbox. I found the whole process unnecessarily fiddly and information on the interwebs to be a bit scarcer than I would have liked, so I’m documenting it here in case I need it in the future. Hopefully it’ll be useful to someone else too.

So, the cause of death was a typo when trying to set up the dropboxd daemon to start automatically on boot. I’m not running nautilus so couldn’t use one of the prepackaged releases, and it’s completely my fault that I made a mess of installing the vanilla x86 build.

After making the fatal change and rebooting, the system would only boot up to a blank black screen with a default X mouse cursor. This is because the system was trying to run my broken command, failing, and therefore never getting to the main desktop.

In the world of normal linux, there’s all sorts of ways of dealing with this, but despite plenty of googling I couldn’t find a way to use run-level 2 or 3 on an Aspire One, and the Ctrl+Alt+F1-F6 key combos for switching away from X to a terminal don’t work either. There seems to be no way of preventing the system following the same doomed process over and again if you break X.

Frustrated, I thought about using the restore disk, but that’s a nuclear option – it re-paves the whole machine, so bye-bye data. That seemed a bit drastic when all I needed to do was edit a single text file to fix the system.

Ironically, this was happening as a result of me trying to install a file sync system as a simple backup. Grr.

Still, like countless thousands before me, I was saved by a live linux distro – in this case, a USB bootable one (since the Aspire One has no optical drive). Following the instructions[1] at pendrivelinux I created a bootable Feather Linux USB drive, and booted the netbook from it by hitting F12 on the post screen and selecting to boot from the USB stick.

At the boot prompt, I used ‘knoppix 3′ to boot the system up to a command line, mounted /dev/hdc1 as an ext2 filesystem, and fixed my typo. Reboot, and tada! Everything was working again (well, after hitting Fn-F7 to reenable the touchpad, which I had accidentally disabled whilst mashing the keyboard in frustration at the sight of a blank screen about an hour earlier, heh).

[1] Note that I had to use a newer version of syslinux than the one referenced on pendrivelinux. This one worked for me.

  • Share/Bookmark

Ubuntu, Xmonad, and an Ode to Apt

This weekend I finally got around to updating my main Linux box from Ubuntu 7.10 to 8.04 (yes, I know, 4 months late – but moving fast!). The highly excellent xmonad has made it into the main Ubuntu repositories, so I discarded my own build and grabbed the packaged version – which promptly didn’t work as expected on my dual-head setup. Gah.

A bit of googling suggested that the problem lay with the upstream debian package, which contained a build of libghc6-x11-dev that was compiled without xinerama support. This left me with a choice of either waiting for the package to get sorted out, or to do the build myself again. I decided to do my own build rather than live without xmonad, but rather than mucking about with tarballs I could at least now get the source from the package repository.

The appropriate steps, for anyone interested or having the same problem, are:

  1. Make sure libxinerama-dev is installed
  2. Recompile libghc6-x11-dev and install it
  3. Recompile libghc6-xmonad-dev and libghc-xmonad-contrib-dev against the new X11 lib

The apt-get incantations are:

sudo apt-get install libxinerama-dev
cd /tmp
sudo apt-get source --compile libghc6-x11-dev
sudo dpkg -i libghc6-x11-dev_1.4.1-1_i386.deb
sudo apt-get build-dep libghc6-xmonad-dev
sudo apt-get source --compile libghc6-xmonad-dev
sudo dpkg -i libghc6-xmonad-dev
sudo apt-get build-dep libghc6-xmonad-contrib-dev
sudo apt-get source --compile libghc6-xmonad-contrib-dev
sudo dpkg -i libghc6-xmonad-contrib-dev_0.6-4_i386.deb

A quick alt-q restart, and all is well.

I only mention all this because it’s so easy in this day and age to take something like apt for granted, and every so often it’s worth taking a moment to appreciate just how spectacularly good it really is. Where I work, deployments are an endless source of headaches and grief, yet the complexity of those deployments absolutely pales against the task of updating literally millions of systems, all slightly different to each other, thousands of times a day. It’s just a joy to be able to say to apt “hey, go get me everything I need to build package x, then build package x, then install it for me. And get it right first time!”.

In most cases, it does just that. It’s an astonishing piece of software.

  • Share/Bookmark

These…Are Not The Hammer

So, yesterday saw the end of a weird week of Whedon wonderfulness when the third and final episode of Dr Horrible’s Sing-Along Blog was released. All three episodes are now free to view until the end of the day, so run, don’t walk, over there now. After all, how often do you get the chance to see a musical comedy about a supervillain who video blogs? With Doogie Howser and Malcolm Reynolds!

  • Share/Bookmark

Bash History Spelunking

Learned from Weiqi, who learned from KageSenshi, about a Fedora Planet shell history meme – post the results of running the following command on your linux box:

history | awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort
-rn|head

I won’t bother repeating the inevitable warning about the dangers of executing random shell scripts you find on the Internet, because I’m lazy and mean. Anyway, here’s the results from my webhosting box:

231 ll
171 vim
132 cd
50 screen
43 cat
39 tail
34 ls
34 cls
32 exit
31 wget

‘ll’ is an alias for ‘ls -l’, and ‘cls’ an alias for ‘clear’. No real surprises otherwise – I use vim for development over ssh, I tail my logs occasionally, and live in GNU Screen.

Here’s the output from my home box:

254 ll
181 cd
148 sudo
123 rm
123 ffmpeg
86 screen
83 ls
75 cls
72 vim
60 find

Quite similar actually, guess I’m set in my ways. The ffmpeg count is a bit of an anomaly, since I used it a lot recently to re-encode a bunch of Futurama rips for my mobile.

Not sure what to do with this remarkable intel, however. Perhaps I’ll use the data to generate an Identicon and use it as a favicon? Or, perhaps not.

  • Share/Bookmark

Evil = Important. Apparently.

OK, I know I shouldn’t even acknowledge spam blogs, but this one amused me. Some filthy credit-crunch link bait site took an extract from my previous post (this is obviously what happens when you say the phrase ‘credit card’ … oops) and ran it though an automated word substitution program. The result is fascinating. It turned this:

… you buy something from Amazon, you are protected by the fact that evil black-hats can’t find the prime factors of your encryption key fast enough to steal your credit card number (OK, bit of a generalisation, but that’s the gist). …

into this:

… you take something from Amazon, you are secure by the fact that important black-hats can’t connexion the matureness factors of your writing key alacritous adequacy to advise your assign calculate sort (OK, discernment of a generalisation, but that’s the gist). …

Let’s review the highlights. ‘Buy’ replaced with ‘take’, ‘evil’ replaced with ‘important’, ‘steal’ replaced with ‘advise’? Someone’s book of synonyms is bound in human hide with a skull on the front.

  • Share/Bookmark