21.7 Gentoo Linux 兼容层

构建基本系统

# service linux enable
# service linux start
# service dbus enable #一般桌面已经配置
# service dbus start #一般桌面已经配置
# wget https://mirrors.ustc.edu.cn/gentoo/releases/amd64/autobuilds/20230101T164658Z/stage3-amd64-systemd-20230101T164658Z.tar.xz #该链接不固定!自己找。
# mkdir -p /compat/gentoo
# tar xpvf stage3-amd64-systemd-20230101T164658Z.tar.xz -C /compat/gentoo --numeric-owner

编辑 ee /etc/fstab,加入:

# Device        Mountpoint              FStype          Options                      Dump    Pass#
devfs           /compat/gentoo/dev      devfs           rw,late                      0       0
tmpfs           /compat/gentoo/dev/shm  tmpfs           rw,late,size=1g,mode=1777    0       0
fdescfs         /compat/gentoo/dev/fd   fdescfs         rw,late,linrdlnk             0       0
linprocfs       /compat/gentoo/proc     linprocfs       rw,late                      0       0
linsysfs        /compat/gentoo/sys      linsysfs        rw,late                      0       0
/tmp            /compat/gentoo/tmp      nullfs          rw,late                      0       0
#/home           /compat/gentoo/home     nullfs          rw,late                      0       0
# mount -al # 检查有无编写错误

编辑:

ee /compat/gentoo/etc/portage/make.conf

加入:

进行常见配置:

Gentoo 换源

sync-uri = rsync://rsync.gentoo.org/gentoo-portage 修改为 sync-uri = rsync://mirrors.tuna.tsinghua.edu.cn/gentoo-portage

获取 Gentoo ebuild 数据库快照

换源后操作

测试安装 screenfetch:

可以正常安装软件。

shell 脚本

脚本内容:

最后更新于

这有帮助吗?