Affected versions: Debian 11

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Kernel package configuration fails because initramfs cannot be written to /boot.

Environment & Reproduction

Common on systems with small dedicated /boot partitions.

df -h /boot
sudo apt full-upgrade
sudo update-initramfs -u

Root Cause Analysis

Old kernel images and initrd files consume all available /boot capacity.

Quick Triage

List installed kernels and /boot file sizes.

dpkg -l 'linux-image-*' | awk '/^ii/{print $2}'
ls -lh /boot
df -h /boot

Step-by-Step Diagnosis

Identify stale kernels not matching running version.

uname -r
ls /boot | grep -E 'vmlinuz|initrd'
apt-cache policy linux-image-amd64
Illustrative mockup for debian-11 — terminal_or_shell
Auditing /boot usage and kernel inventory — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Purge obsolete kernels, then regenerate initramfs and grub config.

Still having issues? Our Server Management team can diagnose and resolve this for you. Get in touch for a free consultation.

sudo apt autoremove --purge -y
sudo update-initramfs -u -k all
sudo update-grub
Illustrative mockup for debian-11 — log_or_config
Removing old kernels and regenerating initramfs — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Temporarily move old initrd files off /boot, then clean packages.

sudo mkdir -p /var/tmp/boot-archive
sudo mv /boot/initrd.img-* /var/tmp/boot-archive/
sudo apt -f install -y

Verification & Acceptance Criteria

Kernel package configuration completes and /boot has free space.

df -h /boot
sudo dpkg --audit
sudo update-initramfs -u

Rollback Plan

Restore archived boot files if boot menu entries are missing.

sudo cp -a /var/tmp/boot-archive/* /boot/ 2>/dev/null || true
sudo update-grub

Prevention & Hardening

Run periodic kernel cleanup and monitor /boot utilization.

sudo apt autoremove --purge -y
watch -n 30 df -h /boot

Related to dpkg configuration loops and reboot failures after patching.

Related tutorial: View the step-by-step tutorial for Debian 11.

View all Debian 11 tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Debian kernel and initramfs tooling references.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.