Ubuntu部分问题处理记录

18.04 出现/etc/resolv.confnameserver自动变成127.0.0.53

现象:修改了/etc/resolv.conf中的nameserver配置后重启自动变成127.0.0.53。

查看/etc/resolv.conf

cat /etc/resolv.conf 

# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0

发现第一行就说明了这个文件由systemd-resolved进行管理,所以编辑这里无效

查看/etc/systemd/resolved.conf配置文件,发现并做任何DNS配置

DNS部分按以下格式修改并重启服务


20.04 更新后启动等待时间为30秒

修改/etc/default/grub中的GRUB_TIMEOUT=3发现仍不生效 查看/boot/grub/grub.cfg,发现是从/etc/grub.d/00_header中获取的

/etc/grub.d/00_header中有一个GRUB_RECORDFAIL_TIMEOUT变量,如果没定义这个变量的值,那会定义一个30秒的默认值。

将这两个默认值改小,然后执行update-grub命令,更新一下即可

最后更新于