首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >脚本‘/boot/grub/grub.cfg.new’不包含任何命令,也不会执行任何操作。

脚本‘/boot/grub/grub.cfg.new’不包含任何命令,也不会执行任何操作。
EN

Ask Ubuntu用户
提问于 2020-12-23 10:53:25
回答 1查看 1.5K关注 0票数 1

我无法更新grub设置。

如果我给了sudo update-grub一些错误,就像这样

代码语言:javascript
复制
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文件

代码语言:javascript
复制
#
# 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。

但什么都不管用。

附件:

任何人,请帮帮我

EN

回答 1

Ask Ubuntu用户

发布于 2022-11-13 08:46:37

update-grub命令现在是grub-pc包安装后脚本的一部分,因此重新安装或重新配置grub包不起作用,因为它总是会遇到相同的错误,导致包正式没有安装,并且有可能破坏其他依赖关系。

唯一对我有效的解决方案是apt download grub-pc,然后手动提取配置文件并将它们复制到我的/etc中。在此之后,sudo apt install --reinstall grub-common grub-pc将开始工作,并使您的系统恢复正常。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1302305

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档