我无法更新grub设置。
如果我给了sudo update-grub一些错误,就像这样
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Script `/boot/grub/grub.cfg.new' contains no commands and will do nothing
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.我打开了/boot/grub/grub.cfg.new文件
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#就像这样。我还试着重新安装grub。
但什么都不管用。
附件:
任何人,请帮帮我
发布于 2022-11-13 08:46:37
update-grub命令现在是grub-pc包安装后脚本的一部分,因此重新安装或重新配置grub包不起作用,因为它总是会遇到相同的错误,导致包正式没有安装,并且有可能破坏其他依赖关系。
唯一对我有效的解决方案是apt download grub-pc,然后手动提取配置文件并将它们复制到我的/etc中。在此之后,sudo apt install --reinstall grub-common grub-pc将开始工作,并使您的系统恢复正常。
https://askubuntu.com/questions/1302305
复制相似问题