Linux – How to remotely install Linux via SSH

installationlinuxremotesshUbuntu

I need to remotely install Ubuntu Server 10.04 (x86) on a server currently running RHEL 3.4 (x86). I'll have to be very careful because no one can press the restart button for me if anything goes wrong.

Have you ever remotely installed Linux? Which way would you recommend? Any advice for things to watch out?


Update:

Thanks for your help. I managed to "change the tires while driving"!

The main components of my method are drawn from HOWTO – Install Debian Onto a Remote Linux System, grub legacy: Booting once-only, grub single boot and kernel panic reboot , and Ubuntu Community Documentation: InstallationFromKnoppix

Here is the outline of what I did:

  1. Run debootstrap on an existing Ubuntu server
  2. Transfer the files to the swap partition of the RHEL 3.4 server
  3. Boot into tha swap partition (the debootstrap system)
  4. Transfer the files to the original root partition
  5. Boot into the new Ubuntu system and finish up the installation with tasksel, apt-get, etc

I tested the method in a VM and then applied to the server. I was lucky enough that everything went smoothly 🙂

Best Answer

I agree with the sentiment of the other answers here: Although it may be possible to install Ubuntu remotely on RHEL 3.4, you are likely going to be treading on some very thin ice.

I think the biggest problem you may have is the age of the kernel and libc on the existing system. Is that a 2.4.x-series kernel? If so, I'm not sure you'll be able to pull this off, because at some point during your install, you'll need to run tools that were compiled to run in Ubuntu's kernel and libc, and they may not function properly (or at all) on an older runtime environment. If you are not running a 2.6.x-series kernel on the remote server, I don't think you have much chance of success.

If you still think you might want to try this, there are a couple of guides I am aware of:

Both of those guides are kind of old, so neither can be treated as anything even close to a cut-and-paste guide. I would strongly suggest following the advice of others here and do some dry runs on a local server or a VM, because there are definitely kinks and gotchas you'll need to work out before going ahead for real.