**********************************
*** This is a testing version! ***
**********************************
If something is wrong, try the old version, which was before the refactor:
#
# 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
https://gitlab.com/cwittlut/assets/-/raw/main/distro2gentoo-demo.mp4
- This script supports AMD64(x86-64) and ARM64(AArch64) architectures.
- Binhost is enabled by default
- 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
). - SSHD will be set to autostart, the listening port is 22, it can be connected by 'root' user with password authentication.
/home
,/root
,/boot
, kernel module directories and EFI partition mountpoint directories are preserved, all other normal directories and files will be deleted.- This script has no partition format actions.
- The default kernel will be replaced with
sys-kernel/gentoo-kernel-bin
, the initramfs will be generated by dracut. - The bootloader is GRUB2.
- All actions won't affect the real system before the 'Following actions will affect the real system.' log appears.
- 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.
这是一个可以转换 Linux 发行版到 Gentoo Linux 的脚本
- 本脚本支持 AMD64(x86-64) 和 ARM64(AArch64) 架构。
- Binhost 默认启用
- 原有的用户都将被删除,但将保留 root 用户的密码(如果 root 用户密码本未设置,那么会被设置为
distro2gentoo
)。 - SSHD 会被设置为自动启动,其监听端口为 22,可以使用 'root' 用户以密码验证的方式登录。
/home
,/root
,/boot
, 内核模块目录和 EFI 分区挂载目录会被保留,其它普通目录及文件都会被删除。- 本脚本不涉及分区操作。
- 默认的内核会被替换为
sys-kernel/gentoo-kernel-bin
, initramfs 则使用 dracut 生成。 - 启动器是 GRUB2。
- 在 'Following actions will affect the real system.' 日志出现之前,所有的操作都不会影响到真实的系统环境。
- 如果你打算在真实系统被影响前重新执行此脚本,那么先执行
umount -R /root.d2g.<架构>/*; rm -r /root.d2g.<架构>
。