Software⏱️ 3 min read📅 2026-06-11

How to Fix Error 24 Error – update-initramfs : Error 24 : Write error : cannot write compressed block

Failed mkinitramfs command due to write error, likely caused by missing firmware or disk space issues.

Quick Answer: Check for missing firmware and ensure sufficient disk space before running the initramfs tools.

The error 'update-initramfs: Error 24: Write error: cannot write compressed block' is encountered when attempting to create an initramfs image for a custom kernel build. This issue affects users who have built their own kernels and are experiencing problems with module loading, such as the new webcam not functioning properly.

This error can be frustrating, especially if it prevents the system from booting or recognizing hardware components. Fortunately, there are steps that can be taken to resolve this issue and get the system up and running again.

⚠️ Common Causes

  • The primary reason for this error is related to the failure of the initramfs tools to create a compressed block in the initramfs image. This can occur due to various reasons such as insufficient disk space, corrupted firmware, or issues with the module installation process.
  • Another possible cause is the presence of a missing firmware required by the system's hardware components, which can prevent the initramfs tools from functioning correctly.

🛠️ Step-by-Step Verified Fixes

Resolving Disk Space Issues

  1. Step 1: Check if there are any disk space issues that may be preventing the creation of the initramfs image. Run the command 'df -h' to check available disk space and ensure it is sufficient for creating the initramfs image.
  2. Step 2: Remove any unnecessary files or partitions to free up disk space, if necessary.

Updating Firmware

  1. Step 1: Update the firmware required by the system's hardware components. For example, update the 'rtl_nic' firmware for the new webcam.
  2. Step 2: Run the command 'sudo apt-get update && sudo apt-get install firmware-rtl-nic' to update the firmware.

💡 Conclusion

To resolve the 'update-initramfs: Error 24: Write error: cannot write compressed block' issue, it is recommended to first check for disk space issues and ensure sufficient space is available. If this is not the cause, updating any missing firmware required by the system's hardware components may also help resolve the problem.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions