我已经运行Ubuntu伙伴一年多一点。我最初安装了16.04 LTS,今年升级到18.04 LTS,没有任何问题。一切都很好。
我决定将我的联想V570中的硬盘升级到SSD。每次我启动我的电脑,我就去GRUB提示符。即使我手动选择从我的SSD启动。我找到了这个职位 --除了在我的例子中,我没有看到grub救援提示符,而是grub提示。
所以现在,I总是必须在GRUB提示符上运行以下命令,每次我启动计算机时,但至少我正在取得一些进展!我跟踪了这篇文章,解释了为什么和如何删除MBR.)
grub> root=(hd0,gpt2)
grub> configfile /boot/grub/grub.cf在引导到我的系统后,我这样做了,但问题仍然存在:
$ sudo grub-install /dev/sda
Installing for x86_64-efi platform.
Installation finished. No error reported.
$ sudo update-grub
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.15.0-23-generic
Found initrd image: /boot/initrd.img-4.15.0-23-generic
Found linux image: /boot/vmlinuz-4.15.0-20-generic
Found initrd image: /boot/initrd.img-4.15.0-20-generic
done发布于 2018-07-13 22:00:32
我仍然不知道根本原因,但是一个意外的 GRUB2升级了默认/etc/ default /grub文件,在重新启动后修复了这个问题。[详情]
这是我用来更新/升级我电脑上软件包的脚本,它为我解决了所有的问题。
#!/bin/bash
apt-get -y update
apt -y upgrade
apt -y dist-upgrade
apt -y clean
apt -y purge -y $(dpkg -l | awk '/^rc/ { print $2 }')
apt -y dist-upgrade --auto-remove --purge
apt -y autoremove
apt autoclean请注意,这个脚本只是更新,实际上并没有修复我所遇到的特定问题。巧合的是,GRUB2有了更新,我有机会在下面的提示符中用默认值重置grub文件。
A new version of configuration file /etc/default/grub is available, but the version installed currently has been locally modified.
│ What do you want to do about modified configuration file grub? │
│ │
│ install the package maintainer's version │
│ keep the local version currently installed │
│ show the differences between the versions │
│ show a side-by-side difference between the versions │
│ show a 3-way difference between available versions │
│ do a 3-way merge between available versions (experimental) │
│ start a new shell to examine the situation │我选择了选项1。
https://askubuntu.com/questions/1054229
复制相似问题