我目前正在升级我的全新以这种方式运行 Debian 6 (Squeeze) 到 7 (Wheezy) 的 Linode 服务器:
更新当前系统:
sudo apt-get update && sudo apt-get upgrade
/etc/apt/sources.list
将文件中所有“squeeze”替换为“wheezy”运行升级过程:
sudo apt-get update && sudo apt-get dist-upgrade
碰巧的是,在发出最后一个命令(如#3)之后,在升级过程中,我被问了两个,而且只有两个问题:
(1)
Configuration file `/etc/default/rcS'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** rcS (Y/I/N/O/D/Z) [default=N] ?
更新:这是差异/etc/default/rcS
:
--- /etc/default/rcS 2011-11-25 23:11:55.000000000 +0000
+++ /etc/default/rcS.dpkg-new 2012-08-31 20:14:04.000000000 +0000
@@ -7,11 +7,18 @@
#
# This file belongs to the "initscripts" package.
-TMPTIME=0
-SULOGIN=no
-DELAYLOGIN=yes
-UTC=yes
-VERBOSE=no
-FSCKFIX=no
-RAMRUN=no
-RAMLOCK=no
+# delete files in /tmp during boot older than x days.
+# '0' means always, -1 or 'infinite' disables the feature
+#TMPTIME=0
+
+# spawn sulogin during boot, continue normal boot if not used in 30 seconds
+#SULOGIN=no
+
+# do not allow users to log in until the boot has completed
+#DELAYLOGIN=no
+
+# be more verbose during the boot process
+#VERBOSE=no
+
+# automatically repair filesystems with inconsistencies during boot
+#FSCKFIX=no
(2)
Configuration file `/etc/dhcp/dhclient.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** dhclient.conf (Y/I/N/O/D/Z) [default=N] ?
更新:这是差异/etc/dhcp/dhclient.conf
:
--- /etc/dhcp/dhclient.conf 2011-11-25 14:38:21.000000000 +0000
+++ /etc/dhcp/dhclient.conf.dpkg-new 2012-09-14 03:24:53.000000000 +0000
@@ -14,6 +14,7 @@
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
#send host-name "andare.fugue.com";
+send host-name = gethostname();
#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
#send dhcp-lease-time 3600;
#supersede domain-name "fugue.com home.vix.com";
@@ -21,10 +22,8 @@
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
netbios-name-servers, netbios-scope, interface-mtu,
- rfc3442-classless-static-routes, ntp-servers,
- dhcp6.domain-search, dhcp6.fqdn,
- dhcp6.name-servers, dhcp6.sntp-servers;
-require subnet-mask, domain-name-servers, host-name;
+ rfc3442-classless-static-routes, ntp-servers;
+#require subnet-mask, domain-name-servers;
#timeout 60;
#retry 60;
#reboot 10;
那么,在每种情况下我的答案应该是什么?Y或者N
笔记:请记住,这是一个新的虚拟机,并且我在设置主机名和 FQDN 后立即升级到 Wheezy。
答案1
Debian 政策的一部分是不覆盖管理员所做的配置更改。相反,如果会提示您并询问您要做什么。一般来说,您会检查差异 ( D
),然后,如果仍然不确定,则启动 shell ( Z
) 并查看它。您还可以使用该 shell 执行更复杂的操作(例如,合并更改)。
当您使用 shell 环顾四周时,您将看到.dpkg-*
相关配置文件的各种版本。例如,您可以看到新版本是什么 ( .dpkg-new
)。您可以编辑旧的以合并更改,如果这样做,当您退出 shell 时,您应该选择“否”(可能是在通过再次查看差异来确认您的编辑之后)。
/etc/default/rcS
包含早期启动的各种设置。也许 Linode 已经为你改变了这一点。您可能想弄清楚它们改变了什么; diff 应该有帮助。
/etc/dhcp/dhclient.conf
包含计算机上 DHCP 客户端的设置。我猜想 Linode 已经对此进行了配置,以使虚拟机能够与其网络一起工作(或更好地工作)。您可能想要保留他们设置的任何内容(但检查差异,看看是否有您想要从新版本合并的内容)。
每隔一段时间,您就会收到一个配置已更改的提示,提示您和 Linode 都没有修改过配置文件。这些通常是相关包中的错误(维护程序脚本修改了 dpkg 配置文件),但由于它们是 Squeeze 版本中的错误,因此可能不再值得报告。
答案2
第一个 diff (rcS) 似乎是传入的注释覆盖您当前选择的选项,因此N
几乎可以肯定这是正确的选择。我不是 100% 确定,但第二个似乎是从 dhcp 中删除一些 ipv6 选项,所以您可能也想回答N
这个问题。