I have a headless Debian Unstable server that I would like to install Ubuntu Trusty on. However, I do not have a keyboard or monitor connected to it, so I would like to install it over SSH. I have already backed up /etc, /home, and various server data that I had on it.

I am okay with losing data as it is all backed up already.

  • I'm just wondering why you want to do that ? What does Ubuntu do that Debian doesnt ? – Lawrence Dec 14 '13 at 14:52

you can replace debian with ubuntu, with a little of work... is not easy, nor friendly, but it's possible.

first list all debian packages (dpkg -l >/root/debian.pkg.lst)

You can edit the /etc/apt/sources.list and replace the debian with the ubuntu sources. after a apt-get update; apt-get upgrade ; apt-get dist-upgrade you should have a near ubuntu. Try to manually fix problems with aptitude and try removing debian packages (check the above debian list file to compare). then try to remove all the debian packages (again from the above list). If possible, try to postpone the reboot to later, until everything is fixed

The closer related are the debian and the ubuntu, the better.

Another way is to partition the HD to have some free space. Then configure a virtual machine that uses the real HD as a virtual HD. Taking care to not touch the running partition, boot the VM and connect to the screen on another PC. Boot the ubuntu iso and start installing on the free partition. don't touch the current debian partition, but install the grub as normally.

After everything installed, reboot the VM to confirm that the ubuntu can boot and is the default.

If everything is ok, reboot the real machine and it should boot from the installed ubuntu. After booting correctly, you can remove the old debian partition and expand the ubuntu filesystem and any fine tune you may need.


One way to go about it is to use debootstrap to install Ubuntu server to a new partition, add the required settings to your current bootloader and once you are satisfied with the setup you can remove the old debian installation. Some rather detailed instructions for installing Ubuntu via debootstrap into a chroot are here Debootstrap an Ubuntu.

If its only the headless aspect, you could also attach a serial cable and run the install over that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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