Gaaah! I too have had the experience of:
- firing up my Ubuntu 14.04
- succumbing to the seductive "do you want upgrade?" prompt
- watching as my machine gracefully and 'successfully' installed 16.04
- responding affirmatively to the prompt to restart
- seeing visions of my world melting when I was unceremoniously presented with a "grub>" prompt
Fear not - for I think we may be getting somewhere here...
On my machine:
(hd0,1)
is the bootfs, and
(hd0,5)
is the the rootfs
- There is a /boot mount point in the rootfs, but that's empty (duh!) - you need to point to the bootfs (hd0,1) for this to work
You'll have to use grub to verify that your system is set up similarly - your mileage may vary here - caveat emptor.
After much soul and Internet searching, I found Carla Schroder's article on rescuing a non-booting linux box, and after a bit of mucking around I did the following (BTW - places that I mod'd compared to the guidance in Carla's posting are bold:
grub> set pager=1
Important: use ls -al
and cat
to make sure that you know which fs is your bootfs and which is root
grub> set root=(hd0,5)
(note regarding the set root
: I don't think would have really needed because the filesystems are specified in the subsequent commands, but I did it, so I'm including it here)
grub> linux (hd0,1)/vmlinuz-4.4.0-31-generic root=/dev/sda5
grub> initrd (hd0,1)/initrd.img-4.4.0-31-generic
grub> boot
As if by "majik" - my machine grew legs and booted. Furthermore, I didn't have to do any surgery on the grub configuration files etc. to make the modifications that I made "stick". Apparently, by making the incantations needed to make it boot once, it remembers the way and will continue to behave.
I verified this on my machine, but I still followed Carla's instructions and performed:
update-grub
grub-install /dev/sda
At this point all seems to be well with the machine.