Re: [bitfolk] Example of using the rescue environment to dia…

Top Page
Author: Andy Smith
Date:  
To: users
Subject: Re: [bitfolk] Example of using the rescue environment to diagnose and fix a booting issue

Reply to this message
gpg: Signature made Sun Feb 17 18:04:15 2019 UTC
gpg: using DSA key 2099B64CBF15490B
gpg: Good signature from "Andy Smith <andy@strugglers.net>" [unknown]
gpg: aka "Andrew James Smith <andy@strugglers.net>" [unknown]
gpg: aka "Andy Smith (UKUUG) <andy.smith@ukuug.org>" [unknown]
gpg: aka "Andy Smith (BitFolk Ltd.) <andy@bitfolk.com>" [unknown]
gpg: aka "Andy Smith (Linux User Groups UK) <andy@lug.org.uk>" [unknown]
gpg: aka "Andy Smith (Cernio Technology Cooperative) <andy.smith@cernio.com>" [unknown]
On Sun, Feb 17, 2019 at 05:55:34PM +0000, Andy Smith wrote:
> For those wanting to avoid spoilers, the next email is going to contain
> some comments about what the problem here actually was.


Right, so the situation here was:

- Customer had just done a do-release-upgrade from ubuntu 14.04 to 16.04
and then rebooted.

- VPS did not boot and upon looking at the console it was at a GRuB
screen saying:

*GRUB-legacy from /boot/grub/menu.lst

and then:

Failed to boot both default and fallback entries.

Press any key to continue...

Based on that information I know:

- /boot/grub/grub.cfg (modern grub config file) doesn't exist

- /boot/grub/menu.lst (legacy grub config file) does exist but doesn't
work

These days we generally recommend installing grub-pc package to get the
GRuB bootloader and letting it manage /boot/grub/grub.cfg (paths differ
on CentOS).

So anyway:

- Connect to Xen Shell

- Boot rescue environment

- chroot into actual VPS

- Discover /boot/grub/menu.lst that contains no kernels

- See there actually are kernels in /boot

- Try to update-grub but it isn't installed, implying grub isn't
installed at all

- apt install grub-pc

- set some more sensible options in /etc/default/grub

- update-grub

- exit out of everything and boot the VPS

- Success

Hypothesis: grub-legacy was uninstalled during do-release-upgrade and
never replaced by grub-pc leading to no working bootloader config.

Cheers,
Andy

--
https://bitfolk.com/ -- No-nonsense VPS hosting