Migrating a running Linux distro to Debian
The original for this document can be found at https://git.hadrons.org/cgit/debian/debtakeover.git/tree/README.
This started as a document to help in migrating a colo server. It has been used in the real world. The previous content that could be found here was non-functional; only some initial notes I took when doing the process by hand. It has since been converted into a proper script.
One thing that must be understood is that the script is not going to convert the whole system to Debian. It will install a clean base system keeping some configuration, but will not map all previous installed programs to their Debian counterparts. It should, however, preserve user data and backups of the old system configuration. The new system is a clean Debian system; it is not a chroot, and no traces from the old distro should remain, except for data restored from backups.
The intention is to create a wide framework to convert anything to Debian. The program is named debtakeover.
Currently, the script is in beta testing stage, be warned. It has been tested on RedHat, SuSE and Gentoo. It has some provisions now to be extended to any GNU/Linux distribution. Next step will be to do cross-installs from (for example) a FreeBSD to a Debian GNU/kFreeBSD or a Debian GNU/Linux system.
Latest released code can be found at https://www.hadrons.org/~guillem/debian/debtakeover/.
Latest development code can be found at git://git.hadrons.org/git/debian/debtakeover.git.
You will need deboostrap, found at https://packages.debian.org/debootstrap.
Build debootstrap, and use "make install" to place it in the proper directories. Make sure the main script can be found in the PATH (however, this will be checked by debtakeover.
Place debtakeover in any excluded directory (eg., /root), and run it from there.
Take a look at debtakeover's --help option. By default, it installs a stable suite (currently jessie), and uses the colo profile.