Linux更新核心錯誤,update-initramfs: failedb解決方案,3194錯誤的解決方案

來源:互聯網
上載者:User

Linux更新核心錯誤,update-initramfs: failedb解決方案,3194錯誤的解決方案

環境:

win7,Ubuntu雙系統。

問題出現背景與解決方案:

        前兩天發現/home目錄滿了,然後就在Ubuntu下用 gparted 工具對系統重分區,分區後結果/boot與win7的C盤掛載到了同一個分區/sda1上,因此啟動時報錯。因此對系統進行了重分區,划出了2G用作/boot。

        但是划出後,在運行apt-get時,報錯如下:

沒有找到檔案/boot/config-*,解決辦法就是把原來的/boot下的檔案複製,並拷貝過來。


然後在運行apt-get install -f 的時候又報了新錯誤:


正在設定 initramfs-tools (0.103ubuntu1.1) ...
update-initramfs: deferring update (trigger activated)
正在處理用於 initramfs-tools 的觸發器...
update-initramfs: Generating /boot/initrd.img-3.11.0-12-generic
E: /usr/share/initramfs-tools/hooks/watershed failed with return 1.
update-initramfs: failed for /boot/initrd.img-3.11.0-12-generic with 1.
dpkg: error processing initramfs-tools (--configure):
 子進程 已安裝 post-installation 指令碼 返回了錯誤號碼 1
在處理時有錯誤發生:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)


網上查了半天,下面有兩個解決方案:

1,/boot已滿,需要刪去舊核心。

      運行 uname -a 查看當前運行核心版本。

      運行 dpkg --get-selections|grep linux 查看所有安裝的核心,並把帶 install 的卸載掉

        sudo apt-get remove linux-image-2.6.24-16-generic

2,運行 df -h 發現掛在的boot並沒有滿。仔細閱讀上面的錯誤,發現主要是 watershed 出現問題了,可能是丟失或者沒有辦法讀了。執行:

      sudo chmod -x /usr/share/initramfs-tools/hooks/watershed

    則一切ok。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.