例如: `grub2-mkconfig -o /boot/grub2/grub.cfg -r /` 希望以上信息能帮到您解决问题! 咨询记录 · 回答于1 分钟前 sed: can't read /etc/system-release: No such file or directory 这个错误提示表明 `grub2-mkconfig` 命令在执行时无法找到 `/etc/system-release` 文件。这可能是由于系统中...
在终端中运行以下命令:```shellls /etc/system-release```如果输出提示 "No such file or directory",说明该文件确实不存在。你是在某个发行版中没有该文件,可以尝试创建一个软链接来解决该问题:```shellln -s /etc/os-release /etc/system-release```再次执行命令:```shellgrub2-mkconfig -o /boot/gru...
生成新的grub配置文件 grub2-mkconfig-o/boot/grub2/grub.cfg# 或者grub2-mkconfig>/boot/grub2/grub.cfg
# grub-mkconfig -o /boot/grub/grub.cfgGenerating grub configuration file ...Found linux image: /boot/vmlinuz-linuxFound initrd image: /boot/initramfs-linux.imgerror:out of memory。error:syntax error。error:Incorrect command。error:syntax error。Syntax error at line 161Syntax errors are detected ...
[root@localhost ~]# grub2-set-default 'Fedora, with Xen hypervisor' [root@localhost ~]# grub2-editenv list saved_entry=Fedora, with Xen hypervisor [root@localhost ~]# grub2-mkconfig -o /boot/grub2/grub.cfg Now reboot. 1. 2.
首先,去官方网站下载源码包 选择grub2-2.04.tar.gz,点击链接下载 解压至/usr/src目录,cd到grub-2.04下 编译64位平台 运行./configure --prefix=/usr --with-platform=x86_64-efi 注意:如果不带–prefix参数,默认会安装到/usr/local/lib/grub下,使用–prefix=/usr参数会安装到/usr/lib/grub ...
Linux命令:grub2-mkconfig grub2-mkconfig # grub2-mkconfig -h Usage: grub2-mkconfig [OPTION]Generate a grub config file -o, --output=FILE output generated config to FILE [default=stdout]-h, --help print this message and exit -v, --version print the version information and exit...
Failed running grub-mkconfig -o "/boot/grub/grub.cfg" output: /etc/default/grub: line 15: syntax error near unexpected token elif I went into that file /etc/default/grub and commented out all lines in the section header: # Define default cmdlines for each device family (lines 12-27) ...
SYNOPSIS grub-mkconfig ,OPTION/ DESCRIPTION -o,--output=,FILE/ output generated config to FILE [default=stdout] -h,--help print this message and exit -V,--version print the version information and exit REPORTING BUGS SEE ALSO grub-install(8) ...
1. The command to rebuild your GRUB configuration varies. On Fedora and openSUSE, use this command: $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg Some distros, such as Ubuntu, use: $ sudo grub-mkconfig -o /boot/grub/grub.cfg