Skip to content

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

License

Notifications You must be signed in to change notification settings

bekcpear/distro2gentoo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A script that can convert a Linux distro to Gentoo Linux

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

If something is wrong, try the old version, which was before the refactor:

https://gitlab.com/cwittlut/distro2gentoo/-/blob/f6ae4a61490259018a423361dae74617cff3a173/distro2gentoo.sh

How to run

#
# Usage: distro2gentoo [<options>]
#
# options:
#
#   --disable-binhost       Disable the binhost when installing Gentoo
#
#   -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. Binhost is enabled by default
  3. 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 ).
  4. SSHD will be set to autostart, the listening port is 22, it can be connected by 'root' user with password authentication.
  5. /home, /root, /boot, kernel module directories and EFI partition mountpoint directories are preserved, all other normal directories and files will be deleted.
  6. This script has no partition format actions.
  7. The default kernel will be replaced with sys-kernel/gentoo-kernel-bin, the initramfs will be generated by dracut.
  8. The bootloader is GRUB2.
  9. All actions won't affect the real system before the 'Following actions will affect the real system.' log appears.
  10. 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. Binhost 默认启用
  3. 原有的用户都将被删除,但将保留 root 用户的密码(如果 root 用户密码本未设置,那么会被设置为 distro2gentoo)。
  4. SSHD 会被设置为自动启动,其监听端口为 22,可以使用 'root' 用户以密码验证的方式登录。
  5. /home, /root, /boot, 内核模块目录和 EFI 分区挂载目录会被保留,其它普通目录及文件都会被删除。
  6. 本脚本不涉及分区操作。
  7. 默认的内核会被替换为 sys-kernel/gentoo-kernel-bin, initramfs 则使用 dracut 生成。
  8. 启动器是 GRUB2。
  9. 'Following actions will affect the real system.' 日志出现之前,所有的操作都不会影响到真实的系统环境。
  10. 如果你打算在真实系统被影响前重新执行此脚本,那么先执行 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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published