Initramfs unpacking failed: invalid magic as start of compressed

Reinstalling by itself does not suffice. Here is the problem :
For some reason, mkinitpcio now creates zstd compressed images instead of the previous default gzip.
kernels 5.4 and 4.19 cannot read these images.
A workaround is to uncomment

COMPRESSION=“gzip”

in /etc/mkinitpcio.conf, and rebuild with

mkinitcpio -P

I am not sure if there is a way to make 5.4 and below able to read zstd.

4 Likes

Indeed, the compression was changed in Arch mkinitcpio to zstd and breaks the backwards compatibility of old kernels.

Only kernel 5.10+ supports zstd.

2 Likes

Dito - i’ve got the same screen after updating. I made my XPS 13 unbootable too with the most recent manjaro update. It’s critical, cause i had not the opportunity to save my last work (ok, a live stick solves this, but i need it for further work today) - of course i have an older image, but this is embarassing. Please don´t tell me i have to reinstall my whole system?!? - if i only knew it, i would have upgraded my kernel first.
Are there any other solutions?

read the thread, there is a solution if you are running the older kernels…

I already read all postings, sorry for my breakout. I have the same 5.4 kernel like hape. Which of the solutions do you mean, chroot oder edit mkinitpcio.conf? Sorry, i´m not really shure about this. Till today my Manjaro works stable, i never had to work on the “open heart”.

There are two solutions:

  1. solution: Switch to Kernel 5.10 or newer LTS in GRUB menu

OR

  1. solution: You need to chroot to your broken system with live USB stick, then edit /etc/mkinitpcio.conf to change the compression to gzip, then run mkinitcpio -P && update-grub, then reboot
4 Likes

Thanks! I just need to delete “#” infront of the line, correct?

Yes, that should be COMPRESSION="gzip" without # in mkinitcpio.conf

1 Like

I have this same issue and same kernel , so I guess this is the solution, right? Please excuse my naivety.
Also is there also a way to install new kernel along this.

I don’t have to do anything else , right?

I have a boot ready in usb

Yes, this is 3. possible solution:

You need to chroot to your broken system then install Kernel 5.15 LTS or 6.1 LTS to fix the issue:
pamac install linux515

Then remove old kernel e.g. 5.4 that does not support the compression zstd.

1 Like

just to confirm:

  • i created a bootable Manjaro ISO and booted from the stick
  • i opened a terminal and did ‘manjaro-chroot’ (which is installed on the iso but not in my normal version???)
  • following the proposal from @Zesko i edited mkinitpcio.conf as described, did a grub-update
  • reboot and here i’m again in my desktop!
  • i installed a newer kernel and will test later.

Remark: the update process should really cover this and change mkinitpcio.conf if older kernels are detected. I think older LTS must stay supported, if you have older HW than newer kernels are not always better.

Thanks to all who helped so fast.

HP

4 Likes

How to do chroot?
Cus after booting from usb I typed manjaro-chroot and it gave an error “Can’t create chroot on non-directory”

Can’t i do it without chroot?
Like going to terminal and nano /etc/mkinitpcio.conf because its there

i think you have to type ‘sudo manjaro-chroot’
then edit /etc/mkinitpcio.conf. If you edit before the change root, you will edit the file on the stick and not on your real installation. After editing, ‘sudo update-grub’ and then type exit and reboot.

Its same error
“Can’t create chroot on non-directory”

But i guess i need to manually go to my hard drive partition where my /etc/mkinitcpio.conf is so that way manjaro-chroot work , right?

Cus I think thats my flas drive partition thats why its giving this error

I know this sound so annoying, cus I’m totally aware of it

but after this error I m so confuse

maybe my fault. I think the complete command is ‘sudo manjaro-chroot -a’.
I took it form https://forum.manjaro.org/t/how-do-i-chroot-into-my-system-and-update-my-kernel/129729

HP

1 Like

Thanks

the second one solve my problem but idk if i have to do the first one or update my kernel

1 Like

Hey, I have the same problem today but for me it still doesnt work, maybe someone cold helb pls :slight_smile:
What I did so far:

  • Run live system (manjaro)
  • command su
  • command manjaro-chroot -a
  • command etc/mkinitcpio.conf

and heres my problem, it says etc/mkinitcpio.conf no Permission

what can I do?

if you successfully chrooted, just install a newer kernel:
mhwd-kernel -i linux510
or if you want to edit the mkinitcpio, use nano:
nano /etc/mkinitcpio.conf
edit it as instructed here, save it with ctrl+x, press ‘y’, then enter and update it:
mkinitcpio -P && update-grub
exit chroot and reboot

Thank you very much for the help!!