fresh re-image + system_update = "new version of grub config file" error

If I image a brand new server with ubuntu 16.04 LTS with the most basic of scripts such as this:

source <ssinclude stackscriptid="1">system_update

other stuff</ssinclude> 

And and none of the other stuff was installed.

Looking at lish, I see:

 A new version (/tmp/grub.tHtPh68yt5) of configuration file                │
 │ /etc/default/grub is available, but the version installed currently has   │
 │ been locally modified.                                                    │
 │                                                                           │
 │ What do you want to do about modified configuration file grub?            │
 │                                                                           │
 │        install the package maintainer's version                           │
 │        keep the local version currently installed                         │
 │        show the differences between the versions                          │
 │        show a side-by-side difference between the versions                │
 │        show a 3-way difference between available versions                 │
 │        do a 3-way merge between available versions (experimental)         │
 │        start a new shell to examine the situation

Help!

1) I have not edited the config file, so why this error?

2) How do I fix this? doing a "show the differences" results are incomprehensible for me unfortunately.

3) How to I stop this coming up on every server I image (e.g. some sort of force option, once we know how to fix it)

Any help appreciated as this has completely blocked us from using any server.

1 Reply

This may be of help.

https://askubuntu.com/questions/104899/ … of-configu">https://askubuntu.com/questions/104899/make-apt-get-or-aptitude-run-with-y-but-not-prompt-for-replacement-of-configu

This is what system_update ends up calling

function system_update {
    apt-get update
    apt-get -y install aptitude
    aptitude -y full-upgrade
}

In your stack script, I suggest maybe replacing system_update with this instead

apt-get update
apt-get -y install aptitude
aptitude -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" full-upgrade

Disclaimer: I take no responsibility for errors or failed boots due to the use of the options to upgrade a machine without testing first. Even then I still take no responsibility. Please do make sure you try it on a non-essential system to make sure everything will go properly.

In cases where there would have been an updated file, it will still place a .dpkg-dist file in that location for you. I do not know if you will be able to tell in advance when that happens based on whatever log you get.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct