如何乳宁后避免GRUB错误的apt-get升级 - ubunut [英] How to avoid GRUB errors after runing apt-get upgrade - ubunut

查看:1711
本文介绍了如何乳宁后避免GRUB错误的apt-get升级 - ubunut的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个EC2上运行的Ubuntu 14.04

在运行的apt-get升级

我提示,要求我重新安装GRUB引导装载程序的屏幕

  

GRUB引导装载程序是pviously安装到磁盘不再present,或其唯一标识符已更改某些原因$ P $。以确保安装了GRUB芯图像保持同步GRUB模块和grub.cfg中是很重要的。请再次检查,以确保GRUB写入相应的引导设备。

  • 我怎么知道哪个设备应该怎么选择?

  • 如果我已经安装在我的机器一些额外的EBS上,我应该选择它们呢?

  • 我能否避免出现此提示,在升级过程中或提供一些默认的命令?

如下提示

  

/boot/grub/menu.lst中的一个新的版本可用,但目前安装的版本已经被本地修改。

     
      
  1. 安装包维护者的版本
  2.   
  3. 保留本地版本当前安装
  4.   
  5. 显示版本之间的差异
  6.   
  7. 显示版本之间的侧由侧差
  8.   
  9. 显示可用版本之间的3路差
  10.   
  11. 请可用版本之间的3路合并(实验)
  12.   
  13. 在启动新的外壳检查情况
  14.   

同样Q的位置:

  • 我怎么知道哪一个我应该选择?

  • 我能否避免出现此提示,在升级过程中或提供一些默认的命令?

谢谢!

解决方案

我有类似的问题。

1)如果你看看男人apt-get的,你会发现一个配置选项, -o 。 它有助于指定Debian的包管理器选项的dpkg

2)在手动男人的dpkg 你可以找到设置选项 - 力confdef (力保持而不提示默认选项)和 - 力confold (生效保存旧conf文件)

在一些消息来源,我发现,人们通过ENV变量 DEBIAN_FRONTEND =非交互式为好,但我没有找到它的手册。

所以,在.SH剧本最后的命令,我用它来升级:

须藤DEBIAN_FRONTEND =非交互式apt-get的-y -o DPKG ::选项:: = - 力confdef-o DPKG ::选项:: = - 力confold升级

I'm running ubuntu 14.04 on an EC2

After running apt-get upgrade

I'm prompted with a screen that asks me to reinstall GRUB boot loader

The GRUB boot loader was previously installed to a disk that is no longer present, or whose unique identifier has changed for some reason. It is important to make sure that the installed GRUB core image stays in sync with GRUB modules and grub.cfg. Please check again to make sure that GRUB is written to the appropriate boot devices.

  • How do i know which device should i select ?

  • What if i have mounted on my machine some additional EBS, should i select them as well ?

  • Can I avoid this prompt, during the upgrade or supply some defaults to the command ?

The following prompt is

A new version of /boot/grub/menu.lst is available, but the version installed currently has been locally modified.

  1. install the package maintainer's version
  2. keep the local version currently installed
  3. show the differences between the versions
  4. show a side-by-side difference between the versions
  5. show a 3-way difference between available versions
  6. do a 3-way merge between available versions (experimental)
  7. start a new shell to examine the situation

The same q's here:

  • How do i know which one should i select ?

  • Can I avoid this prompt, during the upgrade or supply some defaults to the command ?

THANKS !!

解决方案

I had similar problem.

1) If you take a look man apt-get, you will find a configuration option-o. It helps to specify options for Debian packet manager dpkg.

2) In manual man dpkg you can find set of options --force-confdef(force to keep default option without prompting) and --force-confold (force to keep old conf files)

In some sources I found, that people pass env variable DEBIAN_FRONTEND=noninteractive as well, but I didn't find it in manuals.

So, final command in .sh script, that I use to upgrade:

sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade

这篇关于如何乳宁后避免GRUB错误的apt-get升级 - ubunut的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆