Linux kernel update error, update-initramfs: failedb Solution

Source: Internet
Author: User

Linux kernel update error, update-initramfs: failedb Solution

Environment:

Win7 and Ubuntu dual systems.

Background and solution:

Two days ago, I found that the/home directory was full, and then I used gparted tool in Ubuntu to re-partition the system. After partitioning, the/boot and Windows 7 drive C are mounted to the same partition/sda1, therefore, an error is reported during startup. Therefore, the system is re-partitioned and allocated 2 GB for/boot.

However, when you run apt-get, the following error is returned:

The file/boot/config-* Is Not found. The solution is to copy the file in the original/boot file and copy it.

Then a new error is reported when you run apt-get install-f:

Setting initramfs-tools (0.103ubuntu1.1 )...
Update-initramfs: deferring update (trigger activated)
Processing the trigger for 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 ):
The sub-process has installed the post-installation script and Returns Error 1.
An error occurred during processing:
Initramfs-tools
E: Sub-process/usr/bin/dpkg returned an error code (1)

I checked it online for half a day. There are two solutions below:

1. If/boot is full, delete the old kernel.

Run uname-a to view the current kernel version.

Run dpkg -- get-selections "grep linux to view all installed kernels and uninstall the kernel with install.

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

2. Run df-h and find that the mounted boot is not full. Read the above error carefully and find that the problem occurs mainly in watershed. It may be lost or there is no way to read it. Run:

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

Then everything is OK.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.