今天,我一直在致力于自动部署ubuntu服务器。我被困在apt-get upgrade
试图升级到新内核的服务器的自动更新上。日志如下所示:
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
(...)
然后提出一个问题:
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> │
│ │
└──────────────────────────────────────────────────────────────────────┘
理想的结果是选择第一个选项并继续:
Replacing config file /run/grub/menu.lst with new version
Updating /boot/grub/menu.lst ... done
手动运行升级后,我通常debconf-get-selections
会检查问题的正确答案(请参阅其他设置)。似乎update_grub_changeprompt_threeway
是应该回答的问题。但是,使用进行设置debconf-set-selections
会给我一个相同的问题:
debconf-set-selections <<< "grub grub/update_grub_changeprompt_threeway select install_new"
apt-get -y dist-upgrade
这个问题如何自动化?
也尝试过
—
bouke
-qq
,但也没有去...
--force-yes
和yes | ...
,但都无济于事