Grub-probe: error: cannot find a GRUB drive

Running Ubuntu in LXD. Today an update for the package ‘friendly-recovery’ came in. The installation failed with the error /usr/sbin/grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your

A downgrade doesn’t work as I get the same error. Uninstalling -> same error.

/dev/sdc1 on the LXD host constains the storage that contains my container.

Thanks for your help!

So that’s odd, you have packages that probably shouldn’t be in a container. grub and friendly-recovery are meaningless in containers and not installed by default. I’d suggest just removing all grub packages as well as friendly-recovery itself, that should do the trick.

I removed grub-common and all dependencies (including friendly-recovery) which raised my heart rate a bit when it came to the next reboot but everything is still working as it should be.

By the way the ubuntu image I use is the default image from the tutorials. Maybe they need to be checked for unnecessary grub packages. Not sure…

stgraber@castiana:~$ lxc launch ubuntu:16.04 c1
Creating c1
Starting c1
stgraber@castiana:~$ lxc launch images:ubuntu/xenial c2
Creating c2
Starting c2                                   
stgraber@castiana:~$ lxc exec c1 -- dpkg -l | grep grub
stgraber@castiana:~$ lxc exec c2 -- dpkg -l | grep grub

So neither of the Ubuntu 16.04 images we have contains grub. I suspect grub was pulled in through some other package that got installed into your container.

You are right.
I checked the apt history logs. Grub came in with linux-image-extra-virtual…

Ah, you wouldn’t need the linux-image-* packages either as containers can’t have kernels :slight_smile:

1 Like