Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
16
rated 0 times [  16] [ 0]  / answers: 1 / hits: 5677  / 2 Years ago, mon, march 14, 2022, 8:43:21

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?


More From » grub2

 Answers
7

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


[#35577] Tuesday, March 15, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ardtry

Total Points: 254
Total Questions: 99
Total Answers: 114

Location: Finland
Member since Fri, Oct 21, 2022
2 Years ago
;