Update README.md

This commit is contained in:
hikari 2024-05-27 20:10:01 +03:30 committed by GitHub
parent 45ba8a686b
commit 5b9b600a88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

117
README.md
View file

@ -1,86 +1,93 @@
VPS2Arch
========
### vps2parch
The fastest way to convert a _VPS_ to [Arch Linux](https://www.archlinux.org/)!
vps2parch is a shell script designed to transform any Linux-based VPS into a ParchLinux system. This script handles the complete process of downloading, extracting, and configuring the ParchLinux environment on your VPS.
Author
------
## Features
[Timothy Redaelli](mailto:timothy@fsfe.org)
- Converts any Linux-based VPS to ParchLinux.
- Utilizes common tools like `curl`, `tar`, `wget`, and `aria2`.
- Automates the download and installation process.
- Easy to use and minimal user interaction required.
Description
-----------
## Prerequisites
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.
Before running the script, ensure your VPS has the following tools installed:
Disclaimer
----------
- `curl`
- `tar`
- `wget`
- `aria2`
> 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!**
You can install these tools using your distribution's package manager. For example:
How To
------
### Debian/Ubuntu
```sh
sudo apt update
sudo apt install curl tar wget aria2 -y
```
Download the script on your _VPS_ and execute it with root privileges
### CentOS/RHEL
```sh
sudo yum install curl tar wget aria2 -y
```
**WARNING** The script will **delete** any data in your _VPS_!
### Fedora
```sh
sudo dnf install curl tar wget aria2 -y
```
wget https://felixc.at/vps2arch
chmod +x vps2arch
./vps2arch
### Arch Linux
```sh
sudo pacman -Syu curl tar wget aria2
```
Some _Debian_ _VPS_ images don't have the _CA certificates_ installed, so `wget` will give you the following errors:
## Installation
ERROR: The certificate of `gitlab.com' is not trusted.
ERROR: The certificate of `gitlab.com' hasn't got a known issuer.
1. Clone the repository or download the script directly:
To fix them just execute `apt-get install ca-certificates` and then re-execute the previous commands.
```sh
git clone https://github.com/yourusername/vps2parch.git
```
How does it work?
-----------------
or
It's Black Magic.
Just kiddin' 😏, the script itself is very simple.
```sh
wget https://github.com/parchlinux/vps2parch/raw/main/vps2parch.sh
```
In a nutshell, it will download the _Arch Linux Bootstrap Image_ and (see the [wiki](https://wiki.archlinux.org/index.php/Install_from_existing_Linux#Method_B:_Using_the_Bootstrap_Image_.28recommended.29)),
extract the image to / and configure the _Bootstrap chroot_.
2. Navigate to the directory containing the script:
Now, about the **critical** part:
```sh
cd vps2parch
```
> How can you wipe the system without breaking everything?
3. Make the script executable:
It's simple: using `ld.so` from the _Bootstrap chroot_ to launch the `chroot` tool.
```sh
chmod +x vps2parch.sh
```
Since it will erase all the system directories except from the _Bootstrap chroot_, `/dev`, `/proc`, `/sys` and the like,
the only way to launch a command inside the _Bootstrap chroot_ is to using ld.so from the _Bootstrap chroot_ itself.
## Usage
At this point _Arch Linux_ has been installed, but not configured.
The script will provide a SSH-able system automagically configuring grub (or syslinux), network and restoring the root password from the original system (or by using `vps2arch` as password if no root password was set).
Run the script with root privileges to begin the conversion process:
Once done doing its job, the script will ask you to manually reboot your _VPS_ and voilà, PROFIT!
```sh
sudo ./vps2parch.sh
```
Does it really work?
--------------------
The script will guide you through the necessary steps to complete the installation. It will download the required ParchLinux files, extract them, and set up the system on your VPS.
Yes, it does!
## Note
On the [Tested VPS Providers](https://gitlab.com/drizzt/vps2arch/wikis/Tested-VPS-Providers) wiki page you can find a list of **Tested VPS Providers**.
- This script will overwrite existing system files and configurations. Ensure you have backups of important data before proceeding.
- The conversion process may take some time depending on your network speed and VPS performance.
Theoretically it should also work on **real** computers (running linux), but I think it's not worth it,
because you can install it in the canonical way.
## License
Contributing
------------
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
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.
## Contributing
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.
Contributions are welcome! Please submit pull requests or open issues to help improve this project.
Caveats
-------
_IPv6_ currently is not supported. If you need to use it, please configure it manually.
Enjoy your new ParchLinux system!