You are here
Hello,
Since the beginning of the month, every day, we've been receiving the following error, emailed to us from Turnkey Core. Is this a symptom of Turnkey Core being run as a VMWare virtual machine? What would be the best way to fix this so that grub-pc can finish configuring itself?
CRON-APT RUN [/etc/cron-apt/config]: Wed Mar 10 00:10:01 UTC 2021
CRON-APT SLEEP: 1143, Wed Mar 10 00:29:04 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:
grub-pc
E: Sub-process /usr/bin/dpkg returned an error code (1)
Looks like grub-pc update is broken :(
First up, thanks so much for reporting this. It appears that there is an issue with the auto security updates!
In order to understand the extent of the issue, could you please share where this server is running? FYI I have managed to reproduce on Hub (AWS) servers, but not on LXC or ISO install (I haven't yet tested VM builds).
TBH, I'm not completely sure why that's occurring, but where this issue occurs, it appears that the grub-pc update requires interaction (it is asking where to (re)install grub). I'm not sure, but it seems possible that we should probably be tweaking the grub settings for any affected builds when we produce the images.
In the meantime, the issue is pretty easy to resolve, just interactively re-run the secupdates; like this:
When it asks for where to install grub, I suggest selecting all available options. That is unlikely to be necessary if you know what you are doing, so feel free to not do that if you know where you need to install it. But installing it in multiple places only takes up a few kb of disk space and ensures that it will definitely be where the system expects it to be.
If you want/need more info about how to do that, I've included further details on the bug I just opened...
That should fix the issue and stop the noise and ensure future security updates auto install.
Hello,
Hello,
Many, many thanks for the explanation and for letting me know what we need to do.
We installed the .ova file with VMWare, and with ESXi Host v. 6.7
We're not quite out of the proverbial woods just yet; I executed "turnkey-install-security-updates", and the following was outputed:
root@tomcat-apache ~# turnkey-install-security-updates
+ SEC_UPDATES=FORCE
+ /usr/lib/inithooks/firstboot.d/95secupdates
Hit:1 http://deb.debian.org/debian buster InRelease
Get:2 http://security.debian.org buster/updates InRelease [65.4 kB]
Ign:3 http://archive.turnkeylinux.org/debian buster-security InRelease
Ign:4 http://archive.turnkeylinux.org/debian buster InRelease
Hit:5 http://archive.turnkeylinux.org/debian buster-security Release
Hit:6 http://archive.turnkeylinux.org/debian buster Release
Fetched 65.4 kB in 1s (127 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
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:
grub-pc
Enumerating objects: 1932, done.
Counting objects: 100% (1932/1932), done.
Compressing objects: 100% (1194/1194), done.
Writing objects: 100% (1932/1932), done.
Total 1932 (delta 231), reused 1932 (delta 231)
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@tomcat-apache ~#
Hmm, well explicitly do the grub-pc interactively
I'm sure that it allowed me to do it interactively when I tested?! But perhaps there is something else I did first which I didn't note. I should manually retest it all myself so I am 100%. Once I've done that, I'll do a blog post and send out a newsletter notification.
Anyway, explicitly installing the grub-pc update will definitely work!
The previous explanation of what to do during the install still applies.
For what it's worth, an alternate route would be to reconfigure grub-pc:
Hello,
Hello,
We tried "apt-get install grub-pc", and, interactively, we were offered the following three choices for where to install GRUB:
We selected all three, and the following question was asked, and we answered "Yes":
And then, lo and behold, we were able to reboot properly, and apt-get no longer indicates that there are any packages that have not yet been configured. Thanks again!
My apologies, I have to make one correction to my first post on this topic: we are using the Tomcat Apache appliance, not the Core appliance.
FYI, a complete list of everything we saw on the screen is below. Thanks again!
Excellent, thanks for confirming!
Thanks for confirming that worked! :)
Also as a complete aside, for future reference, there is nothing wrong with using 'apt-get', but as of Debian Stretch (the basis of the previous TurnKey major release - v15.x) you can just use 'apt'.
It's takes most of the arguments of 'apt-get' (e.g. 'apt update', 'apt install', 'apt remove', etc), plus many of arguments of 'apt-cache' too (e.g. 'apt policy', 'apt show', etc). But it provides a more user-friendly interactive UI (e.g. a progress bar along the bottom of the screen). You can read more about that on the apt(8) man page (or via commandline: 'man apt').
For programmatic purposes though, you should still use 'apt-get' (as noted by apt if you use it in a script-like way). E.g.
Thanks again Gary!
It's irrelevant for you now, but just wanted to let you know, that after your feedback and a fair bit more exploration and testing, I have published a blog post detailing this issue and the fix.
Thanks again for reporting the issue.
And thank you, as well!
And thank you, as well, for all your help!
Add new comment