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:
- Run debootstrap on an existing Ubuntu server
- Transfer the files to the swap partition of the RHEL 3.4 server
- Boot into tha swap partition (the debootstrap system)
- Transfer the files to the original root partition
- 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 :)
The best practice for remotely installing any OS is to buy server hardware with out of band management (HP ilo, Dell drac) that lets you remotely power cycle and see the console of a server. Don't even try otherwise.
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:
Installing new Debian systems with debootstrap, on debian-administration.org. Although it is Debian-specific, it is mostly applicable to Ubuntu as well.
Installing Debian GNU/Linux from a Unix/Linux System, from the Debian GNU/Linux Installation Guide. Again, Debian-specific, but mostly applicable.
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.
Installing a new distro in place can be done, but is very challenging. It's something that you almost certainly will NOT get right the first time. In fact, you'll be luck if you get it right the third or fourth time.
Additionally, nobody here is going to be able to give you a laundry list that you can just follow and this will happen. You're going to have to experiment with different alternatives, depending on your exact disc partition and file-system layout, hardware configuration, etc.
That said, here's how I'd go about doing something like that if I had to:
Some techniques that may be able to help you:
Good luck! You'll need it. :-)
If you have a different partition you can use that partition to install in a VM that see the entire disk. As long as you do not mount the same partition in both the VM and host or play with partition table you are safe. Another way would be to boot from network and do a installation using preseed or kickstart. Experiment with a local environment before playing remotely.
I write a simple solution based on preseed.
https://github.com/mhf-ir/ubuntu-overssh-reinstallation
You need installed version of ubuntu that have ssh. another http server for serving preseed file. I tested so many times in many datacenters.
If you have ubuntu you can reinstall and repartition over ssh without KVM/IPMI/VNC or any remote application. just using ssh. And pure installation using netiso/miniiso of ubuntu server.
It's based on grub image loader boot your custom iso file that contain your network settings and ssh password.
Good luck.
This is conceivably doable, under some circumstances (which may not apply here / to you).
This is hard; I recommend you practice on a local (virtual if necessary) machine. A lot.
If you can get just one visit to the server, you could add a KVM over IP port to the system. I found a $310 Lantronix Spider 1-port at CDW that does this. It doesn't help with a "restart button" or getting media to eject though, although you could go into the BIOS on reboot and change the boot order so that a CD is ignored.
I've done it before, as a test. Not something I'd recommend doing if there's no fallback plan, though.
As it turns out systems are fairly reliable if all the applications needed are already loaded. I successfully ran dd and overwrote the first 8gb or so of the target server with a default Ubuntu installation and then rebooted the server into Ubuntu without issue. You could then expand the partition from there to fill the rest of the drive.
You could also set up a new partition, debootstrap a new installation into it, and modify your bootloader to boot into this new partition. Again, expect failure and hope for success.
Good news people, all is super easy now (year 2020) as there is the new Ubuntu installer (Subiquity? or sth like that) where SSH install is build into installer (tested at least for ubuntu-20.04.1-live-server-amd64.iso so for server install, not desktop)
See screenshot below.
Important notes: