Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 :)

share|improve this question
11  
Sounds like trying to fit new tyres to your car while driving it. –  Orbling Dec 2 '10 at 1:03
6  
@Orbling: youtube.com/watch?v=dcQ_BTZ3mhg#t=1m45s –  ephemient Dec 2 '10 at 2:49
    
Theoretically possible. Bit like as Orbling puts it, changing your tyres while driving the car. Not very easy! –  Matt Dec 2 '10 at 8:18
    
@ephemient Awesome. You see it is possible, just incredibly difficult. –  Orbling Dec 2 '10 at 11:59
    
Perhaps if you gave more details about the limitations of the situation, the extremely intelligent, creative, and resourceful folks here at Server Fault can give you some other alternatives or advice that may allow a more realistic path to achieving your goals. –  Jed Daniels Dec 2 '10 at 17:22
show 2 more comments

7 Answers

up vote 7 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
    
I agree, but I still need to deal with my current situation –  netvope Dec 2 '10 at 0:54
6  
A lot of experienced people that have been doing this for a decade are going to tell you "good luck with that". –  troyengel Dec 2 '10 at 1:05
1  
Both embobo and troyengel are spot on; the situation you are in is only going to get worse if you try and do this remotely. My suggestion? Get in contact with the data center. –  Andrew M. Dec 2 '10 at 1:17
1  
Remote management cards are great, and most of the new Supermicro systems come with them built in, including remote power, keyboard/video/mouse and remote CD/DVD drives. For this situation, I can't imagine being without one. –  Sean Reifschneider Dec 2 '10 at 8:40
add comment

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:

  • Get a machine configured as similarly as possible to the existing machine: hard drives, network cards, disc adapters, RAM, you name it.
  • Set up this machine to mimic the current setup on that host.
  • Experiment with doing what you need to do on this test system.
  • Take copious notes on it so that you can reproduce it on the "live" system.
  • Run through these notes again on the test system before you do the final migration.

Some techniques that may be able to help you:

  • Decide if you want to install to a new partition, or try to install over the existing file-system. If you do a new partition, you can always back out by booting the old partition. However, that probably means you need to shrink the current file-system, which has to be done offline. I wrote up some notes back in 2007 when I did this.
  • You may be able to do an install to a small partition on your test machine, and then make appropriate changes such as the IP addresses and "dd" this file-system image off to use to populate the base install on the new partition. This would only be if you were using a separate partition for the new install.
  • You could instead put the root file-system in place in a sub-directory and then do something in the initrd so that it would: "cd /target; mv * oldroot; mv oldroot/newos/* ." to move all the old directories out of place and put the new ones in place. This would have to be done before the initrd does it's "pivotroot", probably right after it mounts the file-system.
  • Adding some code into the initrd scripts can allow you to do all sorts of wonderful things during the system boot. See the blog post I references above for more details.
  • Expect that you're going to fail at this. It's an extremely risky endeavor. When I did my file-system resize (mentioned above), I was shocked when it rebooted properly.
  • You'll have to decide what you want to do about the boot sectors, is it running LILO or GRUB? Do you want to try to stay with the current boot loader, or switch to 10.04's? Probably the ideal thing would be to use the existing loader to get booted into the new OS, then run "grub-install" from that OS to put the new one in place.

Good luck! You'll need it. :-)

share|improve this answer
add comment

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.

share|improve this answer
add comment
  1. Good luck.

  2. This is conceivably doable, under some circumstances (which may not apply here / to you).

  3. This is hard; I recommend you practice on a local (virtual if necessary) machine. A lot.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.