I have servers I want to upgrade remotely and headlessly from Ubuntu 12.04 LTS to 14.04 LTS. This upgrade has to happen via script, with no interaction.
The do-release-upgrade
command exits cleanly, however after rebooting the machine ends up at the grub rescue prompt with error: file not found
.
My /boot
is in LVM (I guess I shouldn't have done that; too late to fix that now). Is this why grub can't find it? I can see the logical volumes when I ls
from the rescue prompt. Attempting to ls (lv-root)
results in bad file name
.
/boot
resides on a logical volume for /
:
--- Logical volume ---
LV Name /dev/lv/root
VG Name lv
LV UUID blah-blah-blah
LV Write Access read/write
LV Status available
# open 1
LV Size 9.31 GiB
Current LE 2384
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
I tried dpkg-reconfigure grub-pc
after the upgrade, before rebooting, but that did not help.
I'm going from grub 1.99-21ubuntu3.14 to 2.02~beta2-9ubuntu1.
Boot-Repair etc. are out of the question since I will not have physical or network access to the server during this process. The upgrade process must occur unattended, and after-the-fact rescue is not an option.
What do I need to do before/after do-release-upgrade
to configure grub to boot properly?