升级Ubuntu 14.04.3 LTS

时间:2016-01-21 19:00:18

标签: ubuntu cloud google-compute-engine

我正在Google Cloud上试验Google Compute Engine。

我在Google提供的一个预安装的Ubuntu映像中设置了一个基本的LAMP环境,在这种情况下,Ubuntu 14.04 LTS(amd64可信赖映像建立于2016-01-14)。

我安装的软件与我在Digital Ocean的许多其他服务器中安装的软件完全相同,而且我家中的虚拟盒也是如此。

我选择的机器是1个vCPU(f1-micro),只有0.6 GB的RAM,这对他们管理的轻松工作来说很好。

使用apt-get update&& amp;升级系统后apt-get升级,系统崩溃,再也没有启动过。我已多次停止并重新启动该实例,但它已经死了,尝试重新启动时CPU的使用率为400%。

升级后我得到的错误是:

Fetched 24.6 MB in 1s (13.2 MB/s)
(Reading database ... 144753 files and directories currently installed.)
Preparing to unpack .../linux-firmware_1.127.20_all.deb ...
Unpacking linux-firmware (1.127.20) over (1.127.19) ...
Preparing to unpack .../gcc-4.9-base_4.9.3-0ubuntu4_amd64.deb ...
Unpacking gcc-4.9-base:amd64 (4.9.3-0ubuntu4) over (4.9.1-0ubuntu1) ...
Setting up gcc-4.9-base:amd64 (4.9.3-0ubuntu4) ...
(Reading database ... 144753 files and directories currently installed.)
Preparing to unpack .../libgcc1_1%3a4.9.3-0ubuntu4_amd64.deb ...
Unpacking libgcc1:amd64 (1:4.9.3-0ubuntu4) over (1:4.9.1-0ubuntu1) ...
Setting up libgcc1:amd64 (1:4.9.3-0ubuntu4) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
(Reading database ... 144753 files and directories currently installed.)
Preparing to unpack .../software-properties-common_0.92.37.7_all.deb ...
Unpacking software-properties-common (0.92.37.7) over (0.92.37.6) ...
Preparing to unpack .../python3-software-properties_0.92.37.7_all.deb ...
Unpacking python3-software-properties (0.92.37.7) over (0.92.37.6) ...
Preparing to unpack .../kpartx_0.4.9-3ubuntu7.7_amd64.deb ...
Unpacking kpartx (0.4.9-3ubuntu7.7) over (0.4.9-3ubuntu7.6) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up linux-image-3.16.0-59-generic (3.16.0-59.79~14.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.19.0-47-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-59-generic /boot/vmlinuz-3.16.0-59-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-59-generic /boot/vmlinuz-3.16.0-59-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-59-generic
xz: (stdin): Cannot allocate memory
E: mkinitramfs failure cpio 141 xz -8 --check=crc32 1
update-initramfs: failed for /boot/initrd.img-3.16.0-59-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.16.0-59-generic.postinst line 1025.
dpkg: error processing package linux-image-3.16.0-59-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-3.19.0-47-generic (3.19.0-47.53~14.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.16.0-59-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-47-generic /boot/vmlinuz-3.19.0-47-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-47-generic /boot/vmlinuz-3.19.0-47-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-47-generic
xz: (stdin): Cannot allocate memory
E: mkinitramfs failure find 141 cpio 141 xz -8 --check=crc32 1
update-initramfs: failed for /boot/initrd.img-3.19.0-47-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.19.0-47-generic.postinst line 1025.
dpkg: error processing package linux-image-3.19.0-47-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-3.16.0-59-generic:
 linux-image-extra-3.16.0-59-generic depends on linux-image-3.16.0-59-generic; however:
  Package linux-image-3.16.0-59-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.16.0-59-generic (--configure):
 dependency problems - leaving unconfigured
Setting up linux-firmware (1.127.20) ...
dpkg: dependency problems prevent configuration of linux-image-generic-lts-utopic:
 linux-image-generic-lts-utopic depends on linux-image-3.16.0-59-generic; however:
  Package linux-image-3.16.0-59-generic is not configured yet.
 linux-image-generic-lts-utopic depends on linux-image-extra-3.16.0-59-generic; however:
  Package linux-image-extra-3.16.0-59-generic is not configured yet.

dpkg: error processing package linux-image-generic-lts-utopic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-hwe-generic-trusty:
 linux-imNo apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                                   No apport report written because MaxReports is reached already
                                             No apport report written because MaxReports is reached already
                                                                                                           No apport report written because MaxReports is reached already
                                     No apport report written because MaxReports is reached already
                                                                                                   No apport report written because MaxReports is reached already
                             age-hwe-generic-trusty depends on linux-image-generic-lts-utopic; however:
  Package linux-image-generic-lts-utopic is not configured yet.

dpkg: error processing package linux-image-hwe-generic-trusty (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-hwe-generic-trusty:
 linux-hwe-generic-trusty depends on linux-image-hwe-generic-trusty; however:
  Package linux-image-hwe-generic-trusty is not configured yet.

dpkg: error processing package linux-hwe-generic-trusty (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-extra-3.19.0-47-generic:
 linux-image-extra-3.19.0-47-generic depends on linux-image-3.19.0-47-generic; however:
  Package linux-image-3.19.0-47-generic is not configured yet.

dpkg: error processing package linux-image-extra-3.19.0-47-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic-lts-vivid:
 linux-image-generic-lts-vivid depends on linux-image-3.19.0-47-generic; however:
  Package linux-image-3.19.0-47-generic is not configured yet.
 linux-image-generic-lts-vivid depends on linux-image-extra-3.19.0-47-generic; however:
  Package linux-image-extra-3.19.0-47-generic is not configured yet.

dpkg: error processing package linux-image-generic-lts-vivid (--configure):
 dependency problems - leaving unconfigured
Setting up python3-software-properties (0.92.37.7) ...
Setting up software-properties-common (0.92.37.7) ...
Setting up kpartx (0.4.9-3ubuntu7.7) ...
Errors were encountered while processing:
 linux-image-3.16.0-59-generic
 linux-image-3.19.0-47-generic
 linux-image-extra-3.16.0-59-generic
 linux-image-generic-lts-utopic
 linux-image-hwe-generic-trusty
 linux-hwe-generic-trusty
 linux-image-extra-3.19.0-47-generic
 linux-image-generic-lts-vivid
E: Sub-process /usr/bin/dpkg returned an error code (1)

任何人都有类似的问题? 我应该责备什么? RAM的数量,原始图像,处理器太小,谷歌机器?

我喜欢我在谷歌云计算机上所看到的内容,但我不能同时介绍这两个步骤,而我不确定他们是否可以随时以这种方式崩溃。在这次经历之前,所有的虚拟机都像坚硬的岩石,即使在激烈的安装和卸载任何类型的软件之后也永远不会崩溃。这个几乎没有任何东西坠毁。

提前感谢您的意见。

新细节: 我已经从崩溃前的图像恢复了机器。现在我可以升级系统,但升级后仍然存在错误。我不知道我现在是否可以信任这个系统的完整性:

12 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-3.16.0-59-generic (3.16.0-59.79~14.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
The link /initrd.img is a dangling linkto /boot/initrd.img-3.19.0-49-generic
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-59-generic /boot/vmlinuz-3.16.0-59-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-59-generic /boot/vmlinuz-3.16.0-59-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-59-generic
xz: (stdin): Cannot allocate memory
E: mkinitramfs failure find 141 cpio 141 xz -8 --check=crc32 1
update-initramfs: failed for /boot/initrd.img-3.16.0-59-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.16.0-59-generic.postinst line 1025.
dpkg: error processing package linux-image-3.16.0-59-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up linux-image-3.16.0-60-generic (3.16.0-60.80~14.04.1) ...
Running depmod.

2 个答案:

答案 0 :(得分:0)

自动更新在"无人值守升级"。

中配置

禁用;

注释掉Allowed-Origins文件的/etc/apt/apt.conf.d/50unattended-upgrades

和/或添加:

"APT :: Periodic :: Unattended-Upgrade" 0 lines ";"
<{1>}文件中的

答案 1 :(得分:0)

如果update-initramfs内存不足(我在带有600 MB内存的google-cloud实例上遇到此问题),请尝试:

export XZ_DEFAULTS="--memlimit=80MiB"

然后重新尝试apt-get upgrade(或dpkg --configure -a)。

您可能需要在/etc/bash.bashrc中添加该内容,以便在unattended-upgrades运行时使用它。

来源:https://lists.debian.org/debian-arm/2016/01/msg00032.html