So, I should have learned by now, but noooo…..
This is how it goes:
2h15 on a sleepy Monday morning and I’m trying to install Debian onto one of the laptops in the slowly growing pile I seem to own – no Floppy, no Optical, 1 USB, BIOS boots from USB – all is not lost! Unlike I suspect / on my personal workstation.
/ is a software RAID0, for speed, the theory being that everything on there comes from packages and therefore can be easily reproduced (if somewhat annoying) and I have a package dump, somewhere…. 
So / is md0 made of sda1 and sdb1.
sdc is a freshly inserted blank USB flashdrive.
First we setup a bootable FAT16 partition on the usbdrive with
cfdisk /dev/sdc
and then move onto creating a filesystem
mkdosfs /dev/sda1
and install syslinux
syslinux /dev/sdc1
which fails….
Why would that be?
Oh yeah, that simple typo in the mkdosfs line…. This is kind of how the story went:
- Shit.
- That’s not good.
- Dude, you’ve done bad things.
- Panic.
- Stop panicing, that helps no-one.
- Panic again.
- Make tea.
- Check partition table for sda is intact (it is – phew)
- insert iRiver H340 40GiB USB2 Portable Media Player and external disk, preloaded with lots of useful stuff for such muppetry as this.
- watch PC power off of its own accord.
- Panic.
- Panic More.
- Press power button on PC.
- Watch PC hang at BIOS screen before even trying to check harddisks.
- Wait.
- Wait more.
- Wait lots more.
- Reboot.
- Watch PC hang at BIOS screen before even trying to check harddisks.
- Wait.
- Wait more.
- Wait lots more.
- Watch PC hang at BIOS screen before even trying to check harddisks.
- Turn off PC.
- Wait 5 minutes.
- Watch PC hang at BIOS screen before even trying to check harddisks.
- Turn off PC.
- Wait 10 minutes.
- Watch PC hang at BIOS screen before even trying to check harddisks.
- Turn off PC.
- Wait 15 minutes.
- Watch PC hang at BIOS screen before even trying to check harddisks.
- Turn off PC.
- Aquire clean underpants.
- Drink more tea.
- Consider chocolate.
- Wait 30 minutes.
- Remember USB bus is probably still overload and unplug it all.
- Watch PC hang at complain about lost BIOS settings and start to boot.
- /dev/md0 doesn’t exist. no root. no boot.
- Boot from live CD
- rebuild raid with mdadm
- start raid
- fsck /dev/md0
- mount /dev/md0
- Crash course in debbootstrap.
- Aquire more tea.
- Aquire chocolate.
- Aquire cheese on toast.
- Abandon debbootstrap as lost+found could be quicker….
- cd lost+found
- for each in lost+found; ls inside, guesstimate name, mv .. and rename.
- umount
- reboot
- Pray
- reset permissions on /tmp
- BREATH
- Finish tea and chocolate
4h26. Less than 90 minutes of actual repairs and less that 150minutes downtime
For a muppeting of such great proportions and 100% recovery, that’s good IMO and pobably less time than it would have taken to blat and reinstall Ubuntu Breezy, then to Upgrade to Dapper, insert all my prefered repos and get all those packages downloading, etc… (I only have a Breezy CD to hand) and finally intergrate all my settings for /etc and the couple of applications that I installed via checkinstall, etc.
All things considered I’ve been lucky – both this time and over the years, I’ve made a shockingly small number of midnight muppets like this in the past 10 or so years, since my Linux trainer period has been over, basically….
I’ll put this one down to missing lejt….
-Dx
P.S. Number of laptops I’ve managed to revive today? 0, of course….