Ubuntu 20.04升级至22.04 Jammy后重启进入Initramfs问题求助
Hey there, sorry to hear you're stuck with this annoying initramfs loop after upgrading to Ubuntu 22.04 Jammy—this issue usually pops up due to filesystem corruption mid-upgrade or misconfigured boot components. Let's walk through practical fixes to get your laptop back on track:
Fix 1: Run filesystem check (fsck)
The most common cause here is a corrupted root filesystem. In the initramfs prompt, first find your root partition usinglsblkorblkid—look for the ext4 partition marked as/. Then run:fsck /dev/sdaX
Replace/dev/sdaXwith your actual root partition (like/dev/sda1). When prompted to fix detected errors, typeyand hit Enter for each prompt. Once the check finishes, typerebootto restart your system.Fix 2: Boot with an older kernel and repair GRUB
If fsck doesn't resolve the issue, try booting with a legacy kernel from your 20.04 setup:- Reboot your laptop and hold the Shift key to bring up the GRUB menu.
- Select Advanced options for Ubuntu, then pick the oldest available kernel (labeled with your 20.04 version).
- Once logged into the system, update GRUB to properly recognize the new Jammy kernel:
sudo update-grub - Reboot your laptop—this should let you boot into Ubuntu 22.04 normally.
Fix 3: Regenerate the initramfs image
If the above steps fail, the initramfs image for the new kernel might be corrupted. Boot into the older kernel as described in Fix 2, then run:sudo update-initramfs -u -k all
This regenerates initramfs for all installed kernels. After it completes, runsudo update-grubagain and reboot.
If none of these work, double-check that your /boot partition isn't full—you can verify this once logged into the older kernel with df -h /boot. A full boot partition can break kernel updates and initramfs generation.
备注:内容来源于stack exchange,提问作者ميرفت خليل السامي

