安装系统尝试freebsd 15.1使用ventoy启动但是启动后黑屏....没有办法使用FreeBSD的img文件刻录到u盘使用配置pkg和ports写入对应的镜像配置到/usr/local/etc/pkg/repos/ustc.conf。ustc-ports: { url: https://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/quarterly, mirror_type: none, signature_type: fingerprints, fingerprints: /usr/share/keys/pkg, enabled: yes } ustc-ports-kmods: { url: https://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/kmods_quarterly_${VERSION_MINOR}, mirror_type: none, signature_type: fingerprints, fingerprints: /usr/share/keys/pkg, enabled: yes } FreeBSD-ports: { enabled: no } FreeBSD-ports-kmods: { enabled: no } # 仅当启用 pkgbase 时才添加以下内容 #ustc-base: { # url: https://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/base_release_${VERSION_MINOR}, # mirror_type: none, # signature_type: fingerprints, # fingerprints: /usr/share/keys/pkgbase-${VERSION_MAJOR}, # enabled: yes #} #FreeBSD-base: { # enabled: no #}但是非常慢最后用的这个配置文件ustc-ports: { url: https://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/quarterly, mirror_type: none, signature_type: fingerprints, fingerprints: /usr/share/keys/pkg, enabled: no } # 第二个源南京大学 nju: { url: https://mirror.nju.edu.cn/freebsd-pkg/${ABI}/quarterly, enabled: yes } AliyunFreeBSD-ports: { url: http://mirrors.aliyun.com/freebsd-pkg/${ABI}/quarterly, mirror_type: none, signature_type: fingerprints, fingerprints: /usr/share/keys/pkg, enabled: yes } ustc-ports-kmods: { url: https://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/kmods_quarterly_${VERSION_MINOR}, mirror_type: none, signature_type: fingerprints, fingerprints: /usr/share/keys/pkg, enabled: yes配置ports镜像在/etc/make.conf中添加以下内容如果文件不存在则新建之MASTER_SITE_OVERRIDE?https://mirrors.ustc.edu.cn/freebsd-ports/distfiles/${DIST_SUBDIR}/下载portsports.tar.gz 文件为 Ports Collection可以下载后解压到/usr/ports/目录。也可参考 FreeBSD Handbook 中 Installing the Ports Collection 一节使用git获取 ports treegit clone --filtertree:0 https://mirrors.ustc.edu.cn/freebsd-ports/ports.git /usr/ports安装gitpkg install devel/gitgit clone --filtertree:0 https://mirrors.ustc.edu.cn/freebsd-ports/ports.git /usr/ports安装驱动显卡驱动# pkg install drm-61-kmod提示Message from drm-61-kmod-6.1.128.1501000_8: -- The drm-61-kmod port can be enabled for amdgpu (for AMD GPUs starting with the HD7000 series / Tahiti) or i915kms (for Intel APUs starting with HD3000 / Sandy Bridge) through kld_list in /etc/rc.conf. radeonkms for older AMD GPUs can be loaded and there are some positive reports if EFI boot is NOT enabled. For amdgpu: kld_listamdgpu For Intel: kld_listi915kms For radeonkms: kld_listradeonkms Please ensure that all users requiring graphics are members of the video group.安装Xfce桌面# pkg install xorg xfce wqy-fonts xdg-user-dirs xfce4-goodies非常多的包大约需要6G空间这样装好是无法启动桌面的因为需要先安装好驱动安装intel显卡驱动以及way# sysrc -f /etc/rc.conf kld_listi915kms安装SDDM# pkg ins sddm启动service sddm enable然后重启机器就可以进入窗口了配置中文安装fcitx5# pkg install fcitx5 fcitx5-qt5 fcitx5-qt6 fcitx5-gtk2 fcitx5-gtk3 fcitx5-gtk4 fcitx5-configtool zh-fcitx5-chinese-addons创建目录$ mkdir -p ~/.config/autostart/设为开机启动$ cp /usr/local/share/applications/org.fcitx.Fcitx5.desktop ~/.config/autostart/安装VSCodepkg install vscode安装浏览器pkg install chromiumlinux兼容# service linux enable # 启用 Linux 兼容层服务设置开机自启 # service linux start # 启动 Linux 兼容层服务 # service dbus enable # 启用 D-Bus 服务设置开机自启桌面环境通常已配置 # service dbus start # 启动 D-Bus 服务桌面环境通常已配置安装# pkg install debootstrap # 安装 debootstrap 工具 # debootstrap jammy /compat/ubuntu http://mirrors.ustc.edu.cn/ubuntu/ # 使用 debootstrap 安装 Ubuntu Jammy 至 /compat/ubuntu生效# 立即生效 # sysctl compat.linux.emul_path/compat/ubuntu # 永久设置 # echo compat.linux.emul_path/compat/ubuntu /etc/sysctl.conf设置linux内核# echo compat.linux.osrelease7.1.1 /etc/sysctl.conf # 将内核版本写入 sysctl 配置文件永久生效 # sysctl compat.linux.osrelease7.1.1 # 立即设置内核版本当前会话即可使用重启linux兼容层service linux restart进入兼容层并卸载rsyslog# chroot /compat/ubuntu /bin/bash # 进入 Linux 兼容环境 # apt remove rsyslog # 进入兼容层后卸载 rsyslog使用文本编辑器编辑 Ubuntu 兼容环境中的 APT 软件源配置文件/compat/ubuntu/etc/apt/sources.list写入软件源询问复制deb http://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse进入 Ubuntu 兼容层开始更新系统安装常用软件# export LANGC # 设置字符集以避免错误 # apt update apt upgrade apt install nano wget fonts-wqy-microhei fonts-wqy-zenhei language-pack-zh-hans # 以下命令在 Ubuntu 兼容层内执行 # update-locale LC_ALLzh_CN.UTF-8 LANGzh_CN.UTF-8 # 设置中文字符集安装浏览器(失败)apt install chromium-browser调试linux下安装chromium浏览器时碰到问题下列【新】软件包将被安装 chromium-browser 升级了 0 个软件包新安装了 1 个软件包要卸载 0 个软件包有 0 个软件包未被升级。 有 1 个软件包没有被完全安装或卸载。 需要下载 0 B/49.2 kB 的归档。 解压缩后会消耗 165 kB 的额外空间。 正在预设定软件包 ... 正在设置 snapd (2.75.2ubuntu22.04) ... unable to set CAP_SETFCAP effective capability: Operation not permitted dpkg: 处理软件包 snapd (--configure)时出错 已安装 snapd 软件包 post-installation 脚本 子进程返回错误状态 1 在处理时有错误发生 snapd E: Sub-process /usr/bin/dpkg returned an error code (1)搞不定删除snapd也不行rootfb250:/tmp# apt autoremove -y Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2/dev/null || true: Success E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2/dev/null || true: Success rootfb250:/tmp# apt --fix-broken install Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: apparmor fuse3 libedit2 libfuse3-3 liblzo2-2 openssh-client squashfs-tools Use apt autoremove to remove them. E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2/dev/null || true: Success E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2/dev/null || true: Success