bhruska's picture

Not sure what this error is, but its being reported on all my Turnkey - Wordpress servers.

Any ideas?




CRON-APT RUN [/etc/cron-apt/config]: Tue May 18 15:56:01 UTC 2021 CRON-APT SLEEP: 2555, Tue May 18 16:38:36 UTC 2021 CRON-APT ACTION: 5-install CRON-APT LINE: /usr/bin/apt-get -o quiet=1 dist-upgrade -q -y -o APT::Get::Show-Upgraded=true -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/security.sources.list -o Dir::Etc::sourceparts=nonexistent -o DPkg::Options::=--force-confdef -o DPkg::Options::=--force-confold Setting up grub-pc (2.02+dfsg1-20+deb10u4) ...

You must correct your GRUB install devices before proceeding:


  DEBIAN_FRONTEND=dialog dpkg --configure grub-pc

  dpkg --configure -a

dpkg: error processing package grub-pc (--configure):

 installed grub-pc package post-installation script subprocess returned error exit status 1 Errors were encountered while processing:


E: Sub-process /usr/bin/dpkg returned an error code (1)

Jeremy Davis's picture

It's a known issue - please see the blog post for more info and how to resolve.

If you have any problems with that or anything is unclear, please post back and I'll clarify.

bhruska's picture

I tried what was in the other Post, but it reported this:


GRUB failed to install to the following devices:


Do you want to continue anyway? If you do, your computer may not start
up properly.

Writing GRUB to boot device failed — continue?




Jeremy Davis's picture

Hmm, that's a different message to any I saw when testing?

Having said that, /dev/sda1 is a partition and it really only needs to be installed to the boot disk (not partitions). IIRC you are running a VM, right? So unless you've added a disk, you should only have one disk and it should be /dev/sda. As the only disk, it has to be your boot disk! :)

Assuming above, it should be fine, so long as it's installed to /dev/sda (i.e. the disk /dev/sda, not the partition /dev/sda1). You should be safe to just jump to the 'grub-install' line below, but if you want to be sure, then double check that /dev/sda is your only disk:

fdisk -l | grep '^Disk /dev/sd'

On a machine I have handy that has a 20 GB root volume and no other disks I get:

Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors

Assuming you only get one line that looks somewhat similar to that, then you are all good.

Now (re)install grub to /dev/sda:

grub-install /dev/sda

That should output this (it will use the i386-pc module even on an amd64 machine):

Installing for i386-pc platform.
Installation finished. No error reported.

You shouldn't need to update it as well, but just to be sure, feel free to also run:


This will list any/all kernels that are installed, so something like this (my example is v16.x with just the latest kernel, your list may be longer):

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.19.0-16-amd64
Found initrd image: /boot/initrd.img-4.19.0-16-amd64
Jeremy Davis's picture

It's weird that you are still experiencing this issue after following the fix instructions?! All I can recommend is re-running this command:

dpkg-reconfigure grub-pc

Just select OK for any/all questions until you get to the "GRUB install locations" screen (as per below).

Be sure to select "/dev/sda" (use tab key to switch focus, up/down arrows to select the /dev/sda line and spacebar to allow grub to be installed to it).

Add new comment