update-grub等所有grub都报错误

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
web6pace
帖子: 3
注册时间: 2018-11-29 13:40
系统: ubuntu

update-grub等所有grub都报错误

#1

帖子 web6pace » 2018-11-29 13:53

阿里云ecs ubuntu从12.04升级到14.04,内核升级后执行 update-grub等都报错误
大家有没有遇到过这样的问题,难道只剩重装了吗 :Cry

代码: 全选


root@AY1312181648231623e7Z:/#  update-grub
GRUB >= 2.00 has been unpacked but not yet configured.
grub-mkconfig will not work until the upgrade is complete.
It should run later as part of configuring the new GRUB packages.
root@AY1312181648231623e7Z:/#  grub-install /dev/vda
Installing for i386-pc platform.
Installation finished. No error reported.
root@AY1312181648231623e7Z:/# update-grub
GRUB >= 2.00 has been unpacked but not yet configured.
grub-mkconfig will not work until the upgrade is complete.
It should run later as part of configuring the new GRUB packages.
root@AY1312181648231623e7Z:/# update-grub2
GRUB >= 2.00 has been unpacked but not yet configured.
grub-mkconfig will not work until the upgrade is complete.
It should run later as part of configuring the new GRUB packages.
root@AY1312181648231623e7Z:/# grub-install -v
grub-install: info: executing modprobe efivars 2>/dev/null.
grub-install: info: Looking for /sys/firmware/efi ...
grub-install: info: ... not found. Looking for /proc/device-tree ...
grub-install: info: ... not found.
Installing for i386-pc platform.
grub-install: error: install device isn't specified.
root@AY1312181648231623e7Z:/#  dpkg --get-selections | grep linux
libselinux1:amd64				install
linux-firmware					install
linux-generic					install
linux-headers-3.13.0-163			install
linux-headers-3.13.0-163-generic		install
linux-headers-3.16.0-77				install
linux-headers-3.16.0-77-generic			install
linux-headers-generic				install
linux-headers-server				install
linux-image-3.13.0-163-generic			install
linux-image-3.16.0-77-generic			install
linux-image-3.2.0-29-generic			install
linux-image-extra-3.13.0-163-generic		install
linux-image-generic				install
linux-image-server				install
linux-libc-dev:amd64				install
linux-server					install
util-linux					install
root@AY1312181648231623e7Z:/# uname -a
Linux AY1312181648231623e7Z 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
头像
astolia
论坛版主
帖子: 6434
注册时间: 2008-09-18 13:11

Re: update-grub等所有grub都报错误

#2

帖子 astolia » 2018-11-30 10:00

是不是你在升级时,grub的配置应该用新的,但你却选择了保留旧的
到/etc/grub.d/下面去,看有没有00_header.dpkg-dist这样的文件,将其重命名为00_header
web6pace
帖子: 3
注册时间: 2018-11-29 13:40
系统: ubuntu

Re: update-grub等所有grub都报错误

#3

帖子 web6pace » 2018-11-30 13:17

astolia 写了: 2018-11-30 10:00 是不是你在升级时,grub的配置应该用新的,但你却选择了保留旧的
到/etc/grub.d/下面去,看有没有00_header.dpkg-dist这样的文件,将其重命名为00_header
好像是这样的,我按照如上的方法修改后,重启,执行相关命令,都是如下错误了 :Cry
root@AY1312181648231623e7Z:~# update-grub
Generating grub configuration file ...
cat: /video.lst: No such file or directory
/usr/sbin/grub-probe: error: failed to get canonical path of `'.
No path or device is specified.
Usage: grub-probe [OPTION...] [OPTION]... [PATH|DEVICE]
Try 'grub-probe --help' or 'grub-probe --usage' for more information.
头像
astolia
论坛版主
帖子: 6434
注册时间: 2008-09-18 13:11

Re: update-grub等所有grub都报错误

#4

帖子 astolia » 2018-11-30 14:49

别说你只改了00_header这一个啊,如果/etc/grub.d/下面有其他这种xxx.dpkg-dist的也都改了。
如果还不奏效的话,重装一遍grub

代码: 全选

sudo apt-get purge grub-common
记下它删了哪些包
手动删除/boot/grub下剩下的文件
然后再把刚才删掉的包重新安装回去
fuhuizn
帖子: 948
注册时间: 2006-01-06 22:55
系统: ubuntu
联系:

Re: update-grub等所有grub都报错误

#5

帖子 fuhuizn » 2018-11-30 15:00

重装grub2:
sudo apt install --reinstall grub-pc
web6pace
帖子: 3
注册时间: 2018-11-29 13:40
系统: ubuntu

Re: update-grub等所有grub都报错误

#6

帖子 web6pace » 2018-12-01 14:13

谢谢,大家,最后我使用GNU GRUB 0.97就可以正常引导了,grub2 没有配置成功
回复