2016-01-21 160 views
0

我正在Google Cloud上試用Google Compute Engine。升級Ubuntu 14.04.3後機器崩潰LTS

我已經在Google提供的一個預安裝的Ubuntu鏡像中安裝了基本的LAMP環境,在這種情況下,Ubuntu 14.04 LTS(構建於2016-01-14的amd64可靠鏡像)。

我安裝的軟件與我已經在Digital Ocean的許多其他服務器中安裝的軟件完全一樣,並且在我家中也安裝了Virtual Box。

我選擇的機器是1個vCPU(f1-micro),只有0.6 GB的RAM,這對於他們管理的輕量級作業來說很不錯。

用apt-get update升級系統& & 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的數量,原始圖像,處理器太小,Google機器?

我喜歡我所見過的Google Cloud Machines,但是我不能把這兩個步驟放在一邊,但我不確定它們是否可以隨時以這種方式崩潰。在這個體驗之前,所有的虛擬機都像堅實的岩石,即使在安裝和卸載任何軟件之後,也不會崩潰。這一次幾乎沒有墜毀。

非常感謝您的意見。

新細節: 我已經恢復機器形式的圖像在崩潰前。現在我可以升級系統,但升級後仍然存在錯誤。我不知道現在是否可以信任此係統的完整性:

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. 
+0

更新:我已經在我升級前接過snaphot再次嘗試,並沒有墜毀。可能是原來的崩潰是在第二次升級意圖之後。 – Juan

+0

是否可以使用新的Ubuntu映像構建重試? – George

+0

我已經重試過,它可以正常工作,但是每次我進行升級時,都會花費很多時間並拋出上面發佈的錯誤(「運行depmode」很多次)。然後,我做了一次apt-get autoremove,機器再次墜毀。我已經放棄了。我會嘗試另一個平臺,也許亞馬遜。 – Juan

回答

0

自動更新配置爲「無人值守升級」。

禁用;

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

和/或添加:

"APT :: Periodic :: Unattended-Upgrade" 0 lines ";" 

/etc/apt/apt.conf.d/10periodic文件

+0

對不起,但禁用升級不是我的選擇。升級應該完成。 – Juan

0

如果update-initramfs的運行內存(我就遇到了這個在google-具有600 MB RAM的雲實例),請嘗試:

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

相關問題