Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Today I have been working on automatic deployment of an ubuntu server. I got stuck on automatic updating of the server using apt-get upgrade trying to upgrade to a new kernel. The log looks like this:

Setting up linux-image-3.2.0-24-generic (3.2.0-24.39) ...
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst

Then a question is presented:

Package configuration

    ┌─────────────────────────────────┤  ├─────────────────────────────────┐    
    │ A new version of /boot/grub/menu.lst is available, but the version   │    
    │ installed currently has been locally modified.                       │    
    │                                                                      │    
    │ What would you like to do about menu.lst?                            │    
    │                                                                      │    
    │      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>                                  │    
    │                                                                      │    

The desired outcome would be to select the first option and to continue:

Replacing config file /run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done

After running the upgrade by hand, I used debconf-get-selections to inspect the correct answer for the question (see other settings). It seems like update_grub_changeprompt_threeway is the question that should be answered. However, setting this using debconf-set-selections presented me with the same question:

debconf-set-selections <<< "grub grub/update_grub_changeprompt_threeway select install_new"
apt-get -y dist-upgrade

How can this question be automated?

share|improve this question
Also tried --force-yes and yes | ..., but to no avail – bouke Sep 14 '12 at 11:05
Also tried -qq, but also no go... – bouke Sep 16 '12 at 12:25
up vote 10 down vote accepted

I was able to get around this by using export DEBIAN_FRONTEND=noninteractive, before running apt-get upgrade -y.

share|improve this answer
That did it, thanks! – bouke Sep 20 '12 at 13:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.