标签 FreeBSD 下的文章

无法为 FreeBSD 9.3 Release 的 vm-images 打上阿里云的 VirtIO 补丁

问题描述:无法为 FreeBSD 9.3 Release 的 vm-images 打上阿里云的 VirtIO 补丁。因为业务问题,须使用 FreeBSD 9.3 amd64 系统。我先从 http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/VM-IMAGES/9.3-RELEASE/amd64/Latest/FreeBSD-9.3-RELEASE-amd64-20140711-r268512.vhd.xz 下载系统镜像。再按照 https://help.aliyun.com/zh/ecs/user-guide/the-freebsd-operating-system-compatibility 这里的操作说明,想为内核打上 0001-virtio.patch 的补丁。但在执行 make -j2 buildkernel KERNCONF=GENERIC 这一步时,出错。提示:cc1: warnings being treated as errors . * [virtio_pci.o] Error code 1

阿里云客服回复:实在抱歉,FreeBSD 9.3 这个系统太老了 ,这边尝试多种方法也找不到的virtio驱动,只能建议您更换其他操作系统进行使用了,谢谢

客户反馈腾讯云的可以安装 FreeBSD 9.3 。

在 FreeBSD 13.2 里尝试安装 iRedMail 1.6.8 - 放弃

原因:看到 iRedMail 群里有人说在 FreeBSD 13.2 里安装出错,提示如:

lsof-4.99.3_1,8 requires kernel sources.
error code 1
stop.
make stopped in /usr/ports/sysutils/lsof
error code 1
stop
make stooped to /usr/ports/devel/py-Jinjia2
error failed to downloading package, please fix it manually and then relaunch iRedMail installer.

我在一台国外的机子,配置是 Atom C2750, 8GB 内存里测试 iRedMail 的安装。遇到同样的报错信息。虽然可以手工下载 ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/13.2-RELEASE/src.txz 后继续安装,但通过 ports 编译软件,所需的时间太长了。过了约24小时,还没完成,当前界面信息停留在:

l' -Cprefer-dynamic -Z binary-dep-depinfo -L native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/psm-d1aad399e5dbb6f5/out -L native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/stage0-rustc/x86_64-unknown-freebsd/release/build/rustc_llvm-938455d976a8c95f/out -L native=/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/llvm/build/lib`
    Building [=======================> ] 316/323: rustc_driver_impl

但我不想等待结果,放弃了。

-- Build files have been written to: /usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/lld/build
running: cd "/usr/ports/lang/rust/work/_build/x86_64-unknown-freebsd/lld/build" && DESTDIR="" "cmake" "--build" "." "--target" "install" "--config" "Release" "--" "-j" "1"
[  1% 3/127] Building CXX object Common/CMakeFiles/lldCommon.dir/CommonLinkerContext.cpp.o^C
ninja: build stopped: interrupted by user.

Build completed unsuccessfully in 14:46:49
*** Error code 1
*** Signal 2

参考:

在已有Debian系统的硬盘里安装 FreeBSD 13.2

需求:硬盘原先已经有Windows,debian 12 系统了,现在想在一个分区里再安装个 FreeBSD 13.2。

步骤:

  1. 将机子从rescue系统启动,以qemu虚拟机的方式,从 https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/13.2/FreeBSD-13.2-RELEASE-amd64-bootonly.iso 开始往硬盘的第4个分区里安装 FreeBSD
  2. 安装过程中,勾选 sshd ,且在 /etc/rc.conf 里添加静态IP的配置内容,如:

    ifconfig_igb0="inet 144.172.126.97 netmask 255.255.255.0"
    ifconfig_igb1="inet 144.172.126.97 netmask 255.255.255.0"
    defaultrouter="144.172.126.1"
  3. FreeBSD安装结束后,将机子从 Debian 12 系统启动,手工修改 /boot/grub/grub.cfg 启动菜单内容,添加如:

    menuentry "FreeBSD 13.2" {
    insmod ufs2
    set root=(hd0,4)
    kfreebsd /boot/loader
    }
  4. 执行如 grub-reboot 4 && reboot 的命令,就可以单次尝试从grub里引导 FreeBSD 系统了
  5. gpart show 的输出信息:

    root@dr3:~ # gpart show
    =>        63  3907029105  ada0  MBR  (1.8T)
          63        1985        - free -  (993K)
        2048   419430400     1  ntfs  (200G)
    419432448  3221225472     2  linux-data  (1.5T)
     3640657920   104857600     3  ntfs  (50G)
     3745515520   161480704     4  freebsd  [active]  (77G)
     3906996224       32944        - free -  (16M)
    
    =>        0  161480704  ada0s4  BSD  (77G)
          0  153092096       1  freebsd-ufs  (73G)
     153092096    8073216       2  freebsd-swap  (3.8G)
     161165312     315392          - free -  (154M)

参考:

浪潮服务器 NF5270M4 安装 FreeBSD 9.3 遇到的问题

问题一:用 FreeBSD 9.3 的 iso 文件启动安装,报错:0xffffffff8091f91a ACPI APIC Table ALASKA AMI kernel trap 12 with interrupts disabled

freebsd93-x2apic-1.png

freebsd93_x2apic-2.png

尝试:在主板的 BIOS 里,将 extend APIC support - X2APIC 的功能禁用掉。

freebsd93-x2apic-3.png

问题二:屏幕显示 run_interrupt_driven_hooks still waiting after seconds for xpt_config ,无法进行下一步

尝试:服务器使用了 PM8060 RAID 阵列卡,FreeBSD 9.3 认不到硬盘。在 FreeBSD 9.3 的 loader prompt 里先 load kernel ,然后再加载从浪潮网站下载的阵列卡驱动 load aacu64.ko 。 安装好 FreeBSD 后,将 aacu64.ko 复制到 /boot/modules 目录中,且在 /boot/loader.conf.local 中配置该模块 aacu64_load = "YES" 。

参考:

升级firefox 89后启动失败 - libnss3.so 3.58版本 - FreeBSD

问题:将firefox从81版本升级到89后打不开,运行失败,提示 /usr/local/lib/libnss3.so: version NSS_3.58 required

尝试:pkg install nss # 安装新版本nss(3.65)后就可以了。

firefox: 81.0,2 -> 89.0.1,2

$ firefox
XPCOMGlueLoad error for file /usr/local/lib/firefox/libxul.so:
/usr/local/lib/libnss3.so: version NSS_3.58 required by /usr/local/lib/firefox/libxul.so not found
Couldn't load XPCOM.

$ pkg info | grep nss
ca_root_nss-3.56 Root certificate bundle from the Mozilla Project
jansson-2.13.1 C library for encoding, decoding, and manipulating JSON data
nss-3.56 Libraries to support development of security-enabled applications

root@freebsd:/usr/home/liujia # pkg install nss
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:

nss: 3.56 -> 3.65

参考: