www.nickhodge.com

microsoft, munging and on being a mercurial iconoclastic professional geek.

Climb every Mountain

with one comment

Spent the last week and this week on a per­sonal Ruby on Rails pro­ject. This involves sub­ver­sion (as a ver­sion man­age­ment sys­tem), mon­grel, cap­istrano, ftp, post­gr­esql, some smarts with DNS, exim and a two-day com­plete re-install of Debian. That re-install was not expected.

Unix has this won­der­ful and power­ful concept: the root user knows what they are doing at all times. 99.9% of the time this is a safe assump­tion. 0.1% of the time you type “yes” instead of “no” — remov­ing the ker­nel in this fash­ion is highly not recommended.

How do you fix a broken Linux install?

Stage one involved mak­ing what is known as a LiveCD, or boot­able Linux. I decided to down­load and boot from a Knop­pix LiveCD. A quick restart from the CD, and I could see that the data was intact.

Stage two was installing a new 350GB HD for the data to bring the server up to 0.5TB of stor­age. The old faith­ful Unix stand­bys of dd, fsck from the old 200GB to the new 350GB and start the dif­fi­cult work.

Stage three is a full Debian rein­stall onto the old 200GB with 0.5Gb down­load of the most cur­rent pack­ages, and re-apt on a 686 rather than 386 ker­nel. This didn’t take too long. Re-configuring all the serv­ers and ser­vices: dns, dhcp, CUPS, Samba, Apache, sub­ver­sion, rails+gems, python took most of the weekend.

Stage four: backup scripts. 0.5TB is too much of a moun­tain of data to lose.

Written by Nick Hodge

December 19th, 2006 at 9:33 pm

Posted in debian,linux