Monday, July 21, 2008

Installing debian on eeepc instead of Xandros

It's been a while since I wrote - a lot of things happening, a very busy RL, no time for SL, and broken ADSL at home which I have no time to fix for now. But thought to write up something to show I am still alive :-)

As I've already wrote, I think - I've got a shiny new eeepc a few months ago. All well, but its internal flash (which they call "solid state disk") broke at some point - giving the hardware errors. The failure happened at a very distinct moment in time - I left the eeepc on for a few days, and then - whoops. I do not suspect the FUDed "flash wear" - because there were even the read errors. Much more a possible overheating causing it to fail. So, since I do not believe in warranty (And the warranty on this item would've caused more pain anyway), I decided to buy a SD card and use it as a main storage - the experiments showed that the built-in flash was dead only in some selected range, so the first few dozen megabytes were usable.

My favourite Gentoo was out of question immediately - it'd be a madness to compile everything on a system with a smaller CPU and a very slow flash-backed storage. So, I've evaluated a few others and finally settled on Debian - since it was apparently the only one who was ok with my SDHC 4Gb card that I bought.

There was not much to an install - just follow the instructions here and I got a working system.

However, at first when I tried to just use SDHC, it failed to boot from it - complaining that the cylinder number is larger than the one supported by BIOS (notably, after the boot the SDHC card appears to work fine).

So, in the end I made the following: boot into installer from the external USB memory stick, then blow away the default partition table on the internal "Hard Disk" and create two partitions on it - the first one will be the root partition, the second one is the exact copy of the installer USB stick image.

Using the same trick that GRUB uses to boot windows, I can force the installer to boot - so I have a way to recover the system in case something goes wrong. (I think it's pretty hard to install grub from the installer itself - I used the root filesystem that was previously installed - so technically I went through the install procedure twice).

The side benefit of such a setup is that now internally I have only the grub/kernel - and everything else is on the SDHC card - so in theory if I unplug that one, I can have an alternative setup (and in the case of the external HDD it can be even Gentoo).