话说最近折腾了2个虚拟机模版,CentOS-Stream-9 和ubuntu 22.04 这是其中一篇,因为是半个任务,这2个发行版我都是看不上的,CentOS-Stream-9,我用 rockylinux 不香一点么,ubuntu 换成 debian 11不香么,果然 CentOS-Stream-9 果然就躺坑了。
http://mirror.stream.centos.org/9-stream/BaseOS/x86_64/iso/
下了一个 CentOS-Stream-9-20220606.0-x86_64-dvd1.iso
果然有大坑,后来下了 CentOS-Stream-9-20220621.1-x86_64-dvd1.iso 坑少点了,毕竟 9还没正式出,等正式发布估计会好点吧。
为了证明我装过,截几个图了。

勾选允许 root 用户登陆ssh

网卡配置方式变了, 原来的 /etc/sysconfig/network-scripts/ifcfg-* 找不到了。
grep -rnw '/etc' -e 'ens192'
发现跑这里了,初始配置长这样
cat /etc/NetworkManager/system-connections/ens192.nmconnection:2:id=ens192
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
[connection] id=ens192 uuid=1f7c44a9-10d6-3cfb-841a-a1c494e10a66 type=ethernet autoconnect-priority=-999 interface-name=ens192 timestamp=1655185237 [ethernet] [ipv4] method=auto [ipv6] addr-gen-mode=eui64 method=auto [proxy] |
手动配置的话,要长这样
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
# cat /etc/NetworkManager/system-connections/ens192.nmconnection [connection] id=ens192 uuid=1f7c44a9-10d6-3cfb-841a-a1c494e10a66 type=ethernet autoconnect-priority=-999 interface-name=ens192 timestamp=1655185237 [ethernet] [ipv4] method=manual address1=10.29.1.64/16,10.29.100.1 DNS1=192.168.1.29 [ipv6] addr-gen-mode=eui64 method=auto [proxy] |
|
nmcli c reload # 重新加载配置文件 nmcli c up ens192 # 重启ens192网卡 |
遇到的坑
nmcli c reload 报错
Error: failed to reload connections NetworkManager is not running.
systemctl status NetworkManager

|
May 26 11:04:30 systemd[1]: NetworkManager.service: Scheduled restart job, restart counter is at 3. May 26 11:04:30 systemd[1]: Stopped Network Manager. May 26 11:04:30 systemd[1]: Dependency failed for Network Manager. May 26 11:04:30 systemd[1]: NetworkManager.service: Job NetworkManager.service/start failed with result 'dependency'. |
还有一个报错
failed to start d-bus system message bus
离谱,要手动启动一下才能有网络

systemctl restart NetworkManager
报错
[三 6月 22 13:43:25 2022] systemd-sysv-generator[1498]: SysV service '/etc/rc.d/init.d/startNetworkManager.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
[三 6月 22 13:43:33 2022] systemd-sysv-generator[1523]: SysV service '/etc/rc.d/init.d/startNetworkManager.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a native systemd unit file, in order to make it more safe and robust.
竟然默认还有wifi报错,我怀疑我下的不是服务器版?
Wi-Fi 相关日志
6月 22 13:22:28 10-29-15-9 NetworkManager[951]: [1655875348.1188] manager: rfkill: Wi-Fi enabled by radio killswitch; enabled by state file
关闭 nmcli radio wifi off 后,日志变了,NetworkManager 似乎也起来了
6月 22 14:01:23 centos9-moban NetworkManager[902]: [1655877683.4561] manager: rfkill: Wi-Fi enabled by radio killswitch; disabled by state file
报错
[1655889246.3608] Read config: /etc/NetworkManager/NetworkManager.conf
6月 22 17:14:06 centos9-moban NetworkManager[1224]: [1655889246.3643] bus-manager: cannot connect to D-Bus: 接收数据时出错:连接被对方重设
- NetworkManager: bus-manager: cannot connect to D-Bus: Error receiving data: Connection reset by peer
- systemd: Failed to start Network Manager
- systemd: Failed to start D-Bus System Message Bus
- systemd: Failed to listen on D-Bus System Message Bus Socke
降级 Kernel dracut
dnf downgrade dracut
报错
开机日志里面有报错
[六 6月 25 11:36:08 2022] piix4_smbus 0000:00:07.3: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr
# lsmod | grep i2c_piix4 i2c_piix4 28672 0
屏蔽 echo "blacklist i2c_piix4" >> /etc/modprobe.d/no_i2c_piix4.conf
还有一些内核日志报错,我就不贴了,没到正式发行的版本不能碰呀。
文章评论