[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rebuilding a system remotely?



On Sun, Sep 03, 2006 at 08:56:29PM -0400, Miles Fidelman wrote:
> Hi Folks,
> 
> I have two machines sitting in a data center.  One of them, I've just 
> finished, very carefully, configuring for production use.
> 
> The other machine I've used a bit as a sandbox for trying things before 
> doing them on the production machine - and at this point the sandbox is 
> pretty well messed up.
> 
> I'd like to either
> a. rebuild from scratch to Sarge
> b. upgrade to a clean testing release.
> either way, without a trip to the datacenter to rebuild from a CD.
> 
> So... is there some easy way to do a remote rebuild of a machine that 
> already has a (still) reasonably functioning base system on it?
> 
I did this with a couple of Red Hat servers a few years ago.  They were
located in a server room at the university and I did not have a key, but
wanted to do the rebuild over the weekend to minimize disruption.
Anyhow, what I did was to transfer all necessary data (e.g., home
directories, mail spools, etc, which I don't think are an issue in your
case) to another server.  I then disabled the swap partition and
bootstrapped a base Debian install (*with* ssh, which is not part of the
base install, IIRC) and set the boot loader to look for the kernel in the
new base partition.  I rebooted and logged in to the new Debian base
install.  Then I nuked the rest of the disk (in my case also
repartitioned while the system was running, which is not for the faint
of heart).  I installed a new base system on the newly nuked disk and
reinstalled the boot loader to boot from the new system.  Once that was
done, I nuked the old swap partition back into a swap partition and then
went about installing whatever packages I needed.  Note, that this whole
procedure requires a fair degree of intestinal fortitude and knowing
what you are doing, as one mistake can reneder the system completely
inaccessible by remote means.  If you have any more specific questions,
please let me know.

Regards,

-Roberto

-- 
Roberto C. Sanchez
http://familiasanchez.net/~roberto

Attachment: signature.asc
Description: Digital signature


Reply to: