"Initramfs unpacking failed" after installing os

Hello everyone! A couple of days ago i installed EndeavourOS on my pc. Install was successful but after reboot it showed me message Initramfs unpacking failed: invalid magic at start of compressed archive.
I found on forum that rebuilding initramfs using another compression can fix it. I tried all of compression method that can give me dracut but the system showed one of the message:

Initramfs unpacking failed: invalid magic at start of compressed archive
Initramfs unpacking failed: no cpio magic
Initramfs unpacking failed: junk within compressed archive
Initramfs unpacking failed: brocken padding

Also i tried to reinstall linux, udev, dracut and fully reinstall the system but faced the same problem.

Are you sure that the ISO you used for the installation was intact? have you checked the checksum?

Fortunately I haven’t deleted ISO yet. I checked and yep, checksum is correct

Ok, I found the time to search a solution to my problem. During another OS reinstallation, I decided to choose ext4 instead of brtfs, and the system booted correctly. I thought that the problem was in the file system or in Grub, so I installed systemd-boot with btrfs and OS started successfully again. Does this mean that Grub for some reason does not understand btrfs or understands it incorrectly? Is there a way to fix this??

I’ve resolved this issue. I noticed that after installing on ext4 with Grub or on btrfs with systemd-boot, the initramfs, kernel and Grub folder were located on the EFI partition. However, when using btrfs with Grub, they were placed on the main partition where the system was installed (in EFI partition was only EFI folder).

To fix this, I copied all files from /boot to /efi, remounted the EFI partition to /boot, and reinstalled Grub using the command sudo grub-install --target=x86_64-efi --efi-directory=/boot. After that, the OS booted normally. Now I can use EndeavourOS with btrfs and Grub :grinning:. It’s possible that, for kernel updates need to change /efi to /boot in the fstab.

I believe there might be an easier way to solve this problem, but I haven’t discovered it yet.

That is pretty interesting problem. I don’t think I have ever seen that before.

Just a heads up that with your current configuration if you ever restore a snapshot of your root filesystem, manual intervention will be needed. After restoring, you will need to arch-chroot in and reinstall your kernel packages.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.