Sunday, June 12, 2016

grub2 - Ubuntu-MATE 18.04 LTS GRUB prompt on boot


Background:


I have been running Ubuntu MATE for a little over a year. I originally installed 16.04 LTS and then this year upgraded to 18.04 LTS, without any problems. Everything was great.


Issue:


I decided to upgrade the HDD in my Lenovo V570 to an SSD. Every time I boot my computer, I go to GRUB prompt. Even when I manually chose to boot from my SSD. I found this post - except in my case, I did not see the grub rescue prompt, but grub prompt instead.


So now, I always have to run the following commands on GRUB prompt, every single time I boot my computer, but at least I am making some progress! I followed this post explaining why and how to delete the MBR.)


grub> root=(hd0,gpt2)
grub> configfile /boot/grub/grub.cf

After booting into my system, I did this, but the issue persists:


$ 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

Pingback: post in the Ubuntu-MATE official community



I still do not know the root cause, but an accidental GRUB2 upgrade with default /etc/default/grub file, fixed this issue after a reboot. [Details]


Here is the script I used to update/upgrade packages on my computer, which FIXED all problem for me.


#!/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

Note, that this script simply updates, and does not actually fix the specific problem I was experiencing. Coincidentally, there was an update for GRUB2 and I had an opportunity to reset my grub file with default in the following prompt.


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 │

I chose option #1.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...