2

I have a packer script that builds up a virtual image using Ubuntu. The script today started getting stuck during apt-get dist-upgrade on amazon-ebs: Setting up grub-pc.

I found many people on the net complaining about similar situations with various ad-hoc proposals but no clear fixing instructions. How can I fix this?

1 Answer 1

1

At least in my case, the problem was that the post-installation opened an interactive prompt notifying that a configuration file had been locally changed (though we don't modify it ourselves) and asking whether I want to keep the config file or use the provided new one.

I discovered this by looking at the apt-get log file: cat /var/log/apt/term.log

The solution is to force non-interactive update using both DEBIAN_FRONTEND=noninteractive environment variable and -yq option (source):

export DEBIAN_FRONTEND=noninteractive apt-get -yq dist-upgrade 

To my understanding this will install the new configuration version, but not 100% sure. Further insight on this would be appreciated.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.