• Re: Linux image package install failure

    From Nicolas George@21:1/5 to All on Mon Mar 24 14:40:02 2025
    Barry Newberger (HE12025-03-24):
    package: dpkg
    version: 1.21.22 (amd64)

    Using Discover update following error occurred:

    <html>Package failed to install:<br/><br/>Error while installing package: installed linux-image-6.1.0-32-amd64 package post-installation script subprocess returned error exit status 1</html>

    Then read backwards until you find the error message from the
    subprocess. I did, it was quite obvious, you only need to read a dozen
    lines at the end.

    (And I assume somebody will just give you the answer instead of letting
    you learn to find it by yourself. Sigh.)

    Regards,

    --
    Nicolas George

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Barry Newberger on Mon Mar 24 14:40:02 2025
    On Mon, Mar 24, 2025 at 08:05:32 -0500, Barry Newberger wrote:
    Setting up linux-image-6.1.0-32-amd64 (6.1.129-1) ... /etc/kernel/postinst.d/dkms:
    dkms: running auto installation service for kernel 6.1.0-32-amd64.
    dkms: autoinstall for kernel: 6.1.0-32-amd64. /etc/kernel/postinst.d/initramfs-tools:
    update-initramfs: Generating /boot/initrd.img-6.1.0-32-amd64
    cpio: write error: No space left on device
    E: mkinitramfs failure cpio 2

    Either one of your file systems needs to be cleaned out, or there's
    something *odd* happening. Hopefully it's the former.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Erwan David@21:1/5 to Felix Miata on Mon Mar 24 17:10:01 2025
    On Mon, Mar 24, 2025 at 04:56:33PM CET, Felix Miata <mrmazda@stanis.net> said:
    Barry Newberger composed on 2025-03-24 08:05 (UTC-0500):
    ...
    update-initramfs: Generating /boot/initrd.img-6.1.0-32-amd64
    cpio: write error: No space left on device
    E: mkinitramfs failure cpio 2
    update-initramfs: failed for /boot/initrd.img-6.1.0-32-amd64 with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-6.1.0-32-amd64 (--configure):
    installed linux-image-6.1.0-32-amd64 package post-installation script subprocess returned error exit status 1
    Setting up linux-image-6.1.0-31-amd64 (6.1.128-1) ... /etc/kernel/postinst.d/dkms:
    dkms: running auto installation service for kernel 6.1.0-31-amd64.
    dkms: autoinstall for kernel: 6.1.0-31-amd64. /etc/kernel/postinst.d/initramfs-tools:
    update-initramfs: Generating /boot/initrd.img-6.1.0-31-amd64
    cpio: write error: No space left on device
    ...

    It's not uncommon that one discovers he has let freespace get too low by encountering a failure to install that leaves the new package's contents on disk
    taking up valuable space without completing associated setup tasks. One then logically tries to free some space by removing no longer needed packages. However,
    apt* blocks the process of removal by refusing to remove without first completing
    the installation task that cannot be completed due to lack of space. It's a circular problem. Thus space must be freed by other means.

    when this happens in initramfs it is frequently the /boot partition which is full.
    In that cas, I had to use dpkg to purge old kernels and old initramfs files.

    Beware that some firmware packages include huge data and are by
    default included in initramfs (since firmwares may be necessary to
    boot.


    --
    Erwan David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Felix Miata@21:1/5 to All on Mon Mar 24 17:00:01 2025
    Barry Newberger composed on 2025-03-24 08:05 (UTC-0500):
    ...
    update-initramfs: Generating /boot/initrd.img-6.1.0-32-amd64
    cpio: write error: No space left on device
    E: mkinitramfs failure cpio 2
    update-initramfs: failed for /boot/initrd.img-6.1.0-32-amd64 with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-6.1.0-32-amd64 (--configure):
    installed linux-image-6.1.0-32-amd64 package post-installation script subprocess returned error exit status 1
    Setting up linux-image-6.1.0-31-amd64 (6.1.128-1) ... /etc/kernel/postinst.d/dkms:
    dkms: running auto installation service for kernel 6.1.0-31-amd64.
    dkms: autoinstall for kernel: 6.1.0-31-amd64. /etc/kernel/postinst.d/initramfs-tools:
    update-initramfs: Generating /boot/initrd.img-6.1.0-31-amd64
    cpio: write error: No space left on device
    ...

    It's not uncommon that one discovers he has let freespace get too low by encountering a failure to install that leaves the new package's contents on disk
    taking up valuable space without completing associated setup tasks. One then logically tries to free some space by removing no longer needed packages. However,
    apt* blocks the process of removal by refusing to remove without first completing
    the installation task that cannot be completed due to lack of space. It's a circular problem. Thus space must be freed by other means.

    When this happens, first check the package cache: /var/cache/apt/archives/. If it
    contains .deb that is yet to be installed, consider leaving it there, but removing
    all other .debs. Removing all .debs stands a chance of biting back if something somehow goes wrong that causes networking to be lost. If there is much there, this
    is likely a total solution that will allow completion of the failing command repeated.

    Presuming in your case the cache is not the space waster, you can free lots of space by manually removing some some of those antique vmlinuz* and initrd.img* files from /boot/, then trying again the command that failed due to lack of space.
    Just don't remove the current running kernel's vmlinuz or initrd.img in the process. Do save the two immediately older pairs too, just in case something blows
    up before you finish you should be able to boot one of them. Optionally try this
    command immediately after manual file removals, before repeating the command that
    failed. It may eliminate the need:

    sudo apt-get --fix-broken install

    The question remains why you allowed so many old kernels to accumulate.

    FWIW, Ubuntu and Mint users have a high risk of this particular space problem by
    Ubuntu's packing (apparently) every firmware ever produced in one linux-firmware
    .deb currently 509,030,592 in size, many times the size of one kernel's .debs. --
    Evolution as taught in public schools is, like religion,
    based on faith, not based on science.

    Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

    Felix Miata

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)