Ubuntu – After update in Ubuntu 16.04 I ended up in GNU GRUB and appear to be stuck there


I still haven't solved this issue, but I will update my questions.

I was running a normal update in Ubuntu 16.04, and suddenly the GNU GRUB screen appeared. I was updating via Ubuntu Software, and not from the terminal. I run 64-bit AMD, and I only have Ubuntu on this computer (no dual booting). The computer, which I purchased new, is under one year old. It is a Lenovo Ideapad 510.

During the day, I have seen at least two other people that appear to have had the same problem today, also both on 16.04:


Cannot Boot after Upgrade

I think, but cannot be sure, that I am having the same problem as these two. The person from the second link appears to have found a solution that does boot the system but with the some error messages. However, GNU GRUB appears to be quite complex and it is hard to know where to start in trying to learn about it. In other words, I do not understand what she did.

I did find this:


Which provided some beginner instructions on GRUB. I did manage to find where my kernel is (hd0,2). However the instructions here for booting from GRUB ultimately did not help me. It says that the vmlinuz version and the initrd version should be the same. However, it turns out that there are many different vmlinuz versions on my computer, and I don't know which one to choose. So then the above document says that: "On some Linux systems the current kernels and initrds are symlinked into the top level of the root filesystem:" so it is possible to try this:

grub> set root=(hd0,2) 
grub> linux /vmlinuz root=/dev/sda1
grub> initrd /initrd.img
grub> boot 

Well, I tried this. The terminal filled with different scripts(?), so I was first quite hopeful, but that process has now ended with the following curious last several lines:

No init found. Try passing init=bootarg.
[    4.104041] usbcore: registered new interface driver usbhid
[    4.104831] usbhid: USB HID core driver
BusyBox v1.222.1 (Ubuntu 1:1.22.0-15ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands
(initramfs) [   7.925590] random: nonblocking pool is initialized 

So there is where I am. Does anyone have any wisdom for me? I suppose one cannot exclude a hardware failure, but my gut tells me that this problem arose from that fateful Ubuntu update from this morning.

I see that some text is bolded in my question. I don't know why that is, and I apologize if this make my question hard to read.

Best Answer

I have resolved my issue so I decided to answer my own question.

I was able to boot my computer through GRUB, by making minor adaptations to the instructions here:


At the GRUB prompt, I typed: "ls" to get a list of all partitions.

The list looked something like this: (hd0) (hd0,gpt1) (hd0,gpt2) ...

After I got a list of partitions, I then typed: "ls (hd0,1)/" to determine if the boot menu was in that partition. Note that at this point you can drop "gpt" and just go with the number of the partition. I did this for every partition until I found out which one contained the boot directory.

For me it turned out that the boot menu was in (hd0,2)

So then I typed the following command: "ls (hd0,2)/boot" to get a list of files in the boot directory.

The important files in this regard, as I understand from the above link, are a file called vmlinuz and a file called initrd.img. I suppose it is normal that there will be different versions of these two files (among other files in the boot menu). In any case, I noted the latest version for both, and it is important, apparently, that both vmlinuz and initrd have the same version number.

Having noted that, I then typed the following commands. The partition number and version number may be different for other people, but it is important, as mentioned, that vmlinuz and initrd have the same version number, and that the number following "sda" corresponds to the partition number.

grub> set root=(hd0,2)

grub> linux /boot/vmlinuz-4.4.0-89-generic root=/dev/sda2

grub> initrd /boot/initrd.img-4.4.0-89-generic

grub> boot

And it worked, in the sense that it booted, without any apparent error messages. I don't know if I can reboot, but I now have the opportunity to copy all files that weren't backed up to an external hard-disk. Plus I'll probably download and make a new installation DVD. (I had misplaced my original installation DVD, which was part of my problem). And then I'll try to reboot.

And yes, I will never update from "Ubuntu Software" again!

Related Question