在Thinkpad X250机器上安装FreeBSD15.1操作系统
·
安装系统
尝试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}/
下载ports
ports.tar.gz 文件为 Ports Collection,可以下载后解压到 /usr/ports/ 目录。也可参考 FreeBSD Handbook 中 Installing the Ports Collection 一节,使用 git 获取 ports tree:
git clone --filter=tree:0 https://mirrors.ustc.edu.cn/freebsd-ports/ports.git /usr/ports
安装git
pkg install devel/git
git clone --filter=tree: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_list="amdgpu"
For Intel: kld_list="i915kms"
For radeonkms: kld_list="radeonkms"
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_list+=i915kms
安装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/
安装VSCode
pkg install vscode
安装浏览器
pkg install chromium
linux兼容
# 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.osrelease=7.1.1" >> /etc/sysctl.conf # 将内核版本写入 sysctl 配置文件,永久生效
# sysctl compat.linux.osrelease=7.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 LANG=C # 设置字符集以避免错误
# apt update && apt upgrade && apt install nano wget fonts-wqy-microhei fonts-wqy-zenhei language-pack-zh-hans # 以下命令在 Ubuntu 兼容层内执行
# update-locale LC_ALL=zh_CN.UTF-8 LANG=zh_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.2+ubuntu22.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也不行
root@fb250:/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
root@fb250:/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
openEuler 是由开放原子开源基金会孵化的全场景开源操作系统项目,面向数字基础设施四大核心场景(服务器、云计算、边缘计算、嵌入式),全面支持 ARM、x86、RISC-V、loongArch、PowerPC、SW-64 等多样性计算架构
更多推荐
所有评论(0)