Fastest way to convert Your VPS to ParchLinux
Find a file
Timothy Redaelli a51121f63e Initial commit
2015-06-26 20:04:25 +02:00
LICENSE.md Initial commit 2015-06-26 20:04:25 +02:00
README.md Initial commit 2015-06-26 20:04:25 +02:00
vps2arch Initial commit 2015-06-26 20:04:25 +02:00

VPS2Arch

The fastest way to convert a VPS to Arch Linux!

Author

Timothy Redaelli

Description

This script is used to convert a VPS, running another linux distro, to Arch Linux.
It should be only used if your VPS provider doesn't provide you an Arch Linux image.

Disclaimer

I'm not responsible for any damage in your system and/or any violation of the agreement between you and your vps provider.
Use at your own risk!

How To

Download the script on your VPS and execute it with root privileges

WARNING The script will delete any data in your VPS!

wget http://git.io/vps2arch
chmod +x vps2arch
./vps2arch

How does it work?

It's Black Magic. Just kiddin' 😏, the script itself is very simple.

In a nutshell, it will download the Arch Linux Bootstrap Image and (see the wiki), extract the image to / and configure the Bootstrap chroot.

Now, about the critical part:

How can you wipe the system without breaking everything?

It's simple: the script downloads and installs busybox in the Bootstrap chroot.

After that, it will erase all the system directories except from the Bootstrap chroot, /dev, /proc, /sys and the like .

Busybox is statically linked, so it can still be used to chroot to the Bootstrap chroot and to install Arch Linux.

At this point Arch Linux has been installed, but not configured. The script will provide a SSH-able system automagically configuring grub, network and restoring the root password from the original system.

Once done doing its job, the script will ask you to manually reboot your VPS and voilà, PROFIT!

Does it really work?

Yes, it does!

For the time being, the script has been tested on the following linux distros:

  • CentOS 6 (x86 and x86_64)
  • CentOS 7 (x86 and x86_64)

on the following VPS providers:

Contributing

If you have any useful modification, please use Pull requests.
If you have successfully used this script on a different distro - VPS combination, please contact me so that I can update the above list.

If you are not a developer, but you still want to contribute, you can donate me an account on your VPS provider and I'll do my best to support it.
Or you can just donate me some bucks I'll spend to buy a VPS on your provider in order to support it.

Caveats

OpenVZ, Virtuozzo, Docker or any other similar VPS systems are not supported (for the time being).

In other words, it'll only work on fully virtualized systems.