bekcpear / distro2gentoo

A Script that converts ​Linux distro to Gentoo Linux. | 转换 Linux 发行版为 Gentoo Linux 的脚本。| Mirror of https://gitlab.com/cwittlut/distro2gentoo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A script that can convert a Linux distro to Gentoo Linux

   **********************************
   *** This is a testing version! ***
   **********************************

How to run

#
# Usage: distro2gentoo [<options>]
#
# options:
#
#   -b, --use-binhost       Enable the **experimental** binhost when installing Gentoo, refer to:
#                           https://dilfridge.blogspot.com/2021/09/experimental-binary-gentoo-package.html
#
#   -h, --help              Show this help
#

wget 'https://gitlab.com/cwittlut/distro2gentoo/-/raw/dev/distro2gentoo.sh'
bash distro2gentoo.sh

Demo

https://gitlab.com/cwittlut/assets/-/raw/main/distro2gentoo-demo.mp4

Description

  1. This script supports AMD64(x86-64) and ARM64(AArch64) architectures.
  2. All original users will be deleted, but the password of root will be preserved (if the root password is not set, it will be set to distro2gentoo ).
  3. SSHD will be set to autostart, the listening port is 22, it can be connected by 'root' user with password authentication.
  4. /home, /root, /boot, kernel module directories and EFI partition mountpoint directories are preserved, all other normal directories and files will be deleted.
  5. This script has no partition format actions.
  6. The default kernel will be replaced with sys-kernel/gentoo-kernel-bin, the initramfs will be generated by dracut.
  7. The bootloader is GRUB2.
  8. All actions won't affect the real system before the 'Following actions will affect the real system.' log appears.
  9. If you want to re-run this script before the real system affected, execute umount -R /root.d2g.<arch>/*; rm -r /root.d2g.<arch> first.

说明(Description - Chinese)

这是一个可以转换 Linux 发行版到 Gentoo Linux 的脚本

  1. 本脚本支持 AMD64(x86-64) 和 ARM64(AArch64) 架构。
  2. 原有的用户都将被删除,但将保留 root 用户的密码(如果 root 用户密码本未设置,那么会被设置为 distro2gentoo)。
  3. SSHD 会被设置为自动启动,其监听端口为 22,可以使用 'root' 用户以密码验证的方式登录。
  4. /home, /root, /boot, 内核模块目录和 EFI 分区挂载目录会被保留,其它普通目录及文件都会被删除。
  5. 本脚本不涉及分区操作。
  6. 默认的内核会被替换为 sys-kernel/gentoo-kernel-bin, initramfs 则使用 dracut 生成。
  7. 启动器是 GRUB2。
  8. 'Following actions will affect the real system.' 日志出现之前,所有的操作都不会影响到真实的系统环境。
  9. 如果你打算在真实系统被影响前重新执行此脚本,那么先执行 umount -R /root.d2g.<架构>/*; rm -r /root.d2g.<架构>

About

A Script that converts ​Linux distro to Gentoo Linux. | 转换 Linux 发行版为 Gentoo Linux 的脚本。| Mirror of https://gitlab.com/cwittlut/distro2gentoo

License:GNU General Public License v2.0


Languages

Language:Shell 100.0%