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've got a Fedora server that is woefully out of date... Fedora 8, actually. Rather than go through a complex update process, I'd rather just install a fresh copy of Debian. I want to back up most everything in the webroot and perhaps some user folders, but there isn't too much that needs to be backed up. I should mention that my organization is getting a VM for free on a sponsor's server. We really don't have much communication with them, so I'd rather do it as much myself as possible.

Is it even possible to remotely install a fresh copy of an operating system? I'd figure it would be, but would it be worth it? As long as I'm sure to set up a SSH before rebooting, it should be fine, right?

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

If you have spare space on a partition for /boot, or if you have an actual swap partition, then this should be pretty easy.

Build a debinstaller image with the NetworkConsole feature enabled. Please the installer on the spare space on /boot partition, or create new filesystem on your swap partition and place it there. Adjust your boot loader too boot the installer. Connect to the installer session via ssh. Do the install, and make sure you properly setup networking and install an ssh server during the install.

You could also place a copy of SystemRescueCd or some other tools in that boot/swap partition, and configure the system too boot that instead. You may need to do some repartitioning. The Debian installer doesn't come with many tools for modifying existing partitions or filesystems.

Another method if you have a spare partition would be to use debbootstrap to install into that spare partition. The procedure is relatively easy, but I do suggest you try it in a local VM first.

All of these procedures are certainly possible. Whatever you do, I strongly suggest you setup a Fedora VM with partitions and a setup similar to what your remote system has, it doesn't have to be a full install, just a base install with a similar partitioning should be adequate. Then perform the upgrade on the VM through the network. I suggest you not try something like this on a remote machine the first time without having tested it a few times locally.

share|improve this answer
add comment

There's a program called debtakeover which is intended to do this. Although, I've never done it successfully.

You need to make sure the library versions for the current install (in this case Fedora 8) match the target Debian kernel and binaries. Otherwise you'll get relocation errors and segfaults. This was where I always got stuck.

Since Fedora 8 was around 2009, I would suggest trying to debtakeover to Etch, and then upgrading to lenny/squeeze after successful takeover.

Be warned, though, a failed takeover will leave you with a completely unusable system so it's not for the faint of heart. Do this on a test VM first.

share|improve this answer
    
ack, what happened. I was trying to edit my own answer with some more detail and I somehow managed to update yours... –  Zoredache Sep 8 '11 at 6:05
add comment

To install a copy of linux over (or on another partition) all you have to do is boot into the iso. To do this without burning physical media can be done with many programs or by just adding the disk to grub to boot as if it is its own version of linux ( which it basically is ).
In every linux iso file there is a copy of the kernel and and piece of data that is loaded into ram to bootstrap into loading. These can be added to grup as the kernel and initrd as if were just any other linux os and booted right from there.
http://www.instantfundas.com/2007/08/install-any-linux-distro-directly-from.html goes into how do this in more detail (go to the last paragraph or two for linux specific), but is very simple.
1. Extract the iso
2. Add a grub entry pointing the kernel to the 'vmlinuz' which is the debian kernel and the initrd to the initrd.gz ( this might need to be extracted depending on which version of grub ) and reboot.
2a. Make sure to do this in vertualization first, because if grub doesn't like what your doing it is a pain to fix.
3. Boot into the iso.
4. ???
5. Profit.

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.