分页: 1 / 1

update-grub等所有grub都报错误

发表于 : 2018-11-29 13:53
web6pace
阿里云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

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

发表于 : 2018-11-30 10:00
astolia
是不是你在升级时,grub的配置应该用新的,但你却选择了保留旧的
到/etc/grub.d/下面去,看有没有00_header.dpkg-dist这样的文件,将其重命名为00_header

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

发表于 : 2018-11-30 13:17
web6pace
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.

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

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

代码: 全选

sudo apt-get purge grub-common
记下它删了哪些包
手动删除/boot/grub下剩下的文件
然后再把刚才删掉的包重新安装回去

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

发表于 : 2018-11-30 15:00
fuhuizn
重装grub2:
sudo apt install --reinstall grub-pc

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

发表于 : 2018-12-01 14:13
web6pace
谢谢,大家,最后我使用GNU GRUB 0.97就可以正常引导了,grub2 没有配置成功