Automating update with stackscript - new version of grub?

I have a stackscript that includes Linode's bash library (https://www.linode.com/stackscripts/view/1) and the first thing it runs is system_update - which runs

apt-get update
apt-get -y install aptitude
aptitude -y full-upgrade

Today, however, the stackscript halted; through the lish console I can see:

Package configuration

 ┌──────────────────────────┤ Configuring grub-pc ├──────────────────────────┐
 │ A new version (/tmp/grub.gxbLmWQ8iS) 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                         │
 │                                                                           │
 │                                                                           │
 │                                  <ok>│
 │                                                                           │
 └───────────────────────────────────────────────────────────────────────────┘</ok> 

This page wants user input… but I want this to be a hands-free install. How can I configure the update to automatically select an option from this menu?

Running Ubuntu 16.04 LTS, kernel is Latest 64-bit.

3 Replies

Use the "unattended-upgrades" packages to make unattended upgrades.

Hi, did you ever find a fix for this? We have the same error and no idea what to do.

I added

export DEBIAN_FRONTEND=noninteractive

before the update, it went through without an issue then.

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