Affected versions: Debian 12

📖 ~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 updates fail because initramfs cannot be written to a full boot partition.

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 artifacts and initrd files consume available space in /boot.

Quick Triage

List kernel files and identify removable stale packages.

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

Step-by-Step Diagnosis

Compare running kernel with installed inventory.

uname -r
ls /boot | grep -E 'vmlinuz|initrd'
grep -RIn "No space left" /var/log 2>/dev/null | tail -n 20
Illustrative mockup for debian-12 — terminal_or_shell
Auditing boot partition usage — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Purge obsolete kernels, regenerate initramfs, and update GRUB.

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-12 — log_or_config
Removing old kernels and rebuilding initramfs — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Archive old boot files temporarily, then clean package state.

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

Verification & Acceptance Criteria

Boot partition has free space and package configuration finishes cleanly.

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

Rollback Plan

Restore archived initrd files if needed and rebuild boot config.

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

Prevention & Hardening

Monitor /boot utilization and automate stale kernel cleanup.

sudo apt autoremove --purge -y
watch -n 30 df -h /boot
apt list --installed | grep linux-image

Often co-occurs with dpkg loops and post-update reboot failures.

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

View all Debian 12 tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Debian kernel package and initramfs maintenance documentation.

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.