You are not logged in.

#1 2024-06-18 00:22:26

nightfury
Member
Registered: 2024-05-21
Posts: 11

Initramfs unpacking failed: Invalid magic at start of ....

So I have a windows dual boot which I rarely use, Arch being my daily driver and for some stuff I had open my windows. When restarting it started to update and when rebooted in my systemd bootloader. I was greeted with:

Error preparing initrd: Volume corrupt

So I managed to solve it by repair my btrfs root partition.
But then I was greeted with:

Error loading \vmlinuz-linux: Unsupported

This was also solved by me chrooting into my own setup and updating my linux kernel and headers to 6.9.5 1-1.
But since then when I try to boot back into my system I am faced with

Initramfs unpacking failed: Invalid magic at start of Compressed archive

Now what all I have tried,
- I edited the mkinitcpio.conf in /etc/ to add COMPRESSION="zstd" and then rebuilding initramfs my mkinitcpio -P
- I also reinstalled Linux kernel and header

Now I am just a beginner in solving my machines issues so please help accordingly and it will be of great help if you could explain what u r actually doing.

Last edited by nightfury (2024-06-18 06:00:07)

Offline

#2 2024-06-18 13:29:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,223

Re: Initramfs unpacking failed: Invalid magic at start of ....

check whether you're running out of free space on /boot and how big that ultimately actually is. chances are you have too little space there, and will have to either resize the filesystem/partition, relocate the kernel files to your root partition, or potentially disable generation of the fallback image assuming you don't change HW much, see https://bbs.archlinux.org/viewtopic.php?id=293333

Offline

#3 2024-06-18 13:39:36

cryptearth
Member
Registered: 2024-02-03
Posts: 2,186

Re: Initramfs unpacking failed: Invalid magic at start of ....

Offline

#4 2024-06-18 17:10:34

nightfury
Member
Registered: 2024-05-21
Posts: 11

Re: Initramfs unpacking failed: Invalid magic at start of ....

V1del wrote:

check whether you're running out of free space on /boot and how big that ultimately actually is. chances are you have too little space there, and will have to either resize the filesystem/partition, relocate the kernel files to your root partition, or potentially disable generation of the fallback image assuming you don't change HW much, see https://bbs.archlinux.org/viewtopic.php?id=293333

My boot partition is of 1gb space so I guess that shouldn't be an issue, but I'll check once.
Also how can I check space of my boot partition without chrooting, is that possible.

Offline

#5 2024-06-18 17:11:21

nightfury
Member
Registered: 2024-05-21
Posts: 11

Re: Initramfs unpacking failed: Invalid magic at start of ....

cryptearth wrote:

Sure will keep in mind from next time but I was confused where to post it.

Offline

#6 2024-06-18 18:22:26

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,959

Re: Initramfs unpacking failed: Invalid magic at start of ....

You might be looking at the wrong initramfs, how to you load CPU microcode updates?
https://wiki.archlinux.org/title/Microcode

Did you try to re-install amd-ucode?

Online

#7 2024-06-18 21:27:27

Maniaxx
Member
Registered: 2014-05-14
Posts: 761

Re: Initramfs unpacking failed: Invalid magic at start of ....

nightfury wrote:

I edited the mkinitcpio.conf in /etc/ to add COMPRESSION="zstd"

This will end up in /etc/mkinitcpio.conf.pacnew files with potential to break the bootchain (after system update) as your active mkinitcpio.conf file remains untouched (not getting updates).
Better use drop-ins (/etc/mkinitcpio.conf.d) and restore the original file with 'sudo tar xf /var/cache/pacman/pkg/mkinitcpio-39.2-2-any.pkg.tar.zst -C / --overwrite etc/mkinitcpio.conf'.
'zstd' is default so you don't need that in particular though.

https://wiki.archlinux.org/title/Pacman … nd_Pacsave
https://wiki.archlinux.org/title/mkinit … figuration

Last edited by Maniaxx (2024-06-18 21:38:14)


sys2064

Offline

#8 2024-06-19 09:34:42

nightfury
Member
Registered: 2024-05-21
Posts: 11

Re: Initramfs unpacking failed: Invalid magic at start of ....

seth wrote:

You might be looking at the wrong initramfs, how to you load CPU microcode updates?
https://wiki.archlinux.org/title/Microcode

Did you try to re-install amd-ucode?

Ok so I reinstalled the amd-ucode and just to be safe I even rebuilt my Initramfs.
But still Initramfs unpacking failed then I did something which is a bit unusual I installed another arch with same kernels on my same machine and then copied it’s Initramfs and amd-ucode to my suprise my prev sys booted up, this makes me wonder there’s more to know about these than what I thought. If any of any of you would like to add something do add I would love to give it a read.

Offline

#9 2024-06-19 10:45:58

Maniaxx
Member
Registered: 2014-05-14
Posts: 761

Re: Initramfs unpacking failed: Invalid magic at start of ....

Make sure your system is not partially updated (especially #3.3 and #3.5).

Post this:

$ ls /etc |grep pacnew
$ pacman -Qkk mkinitcpio
$ cat /etc/mkinitcpio.d/linux.preset
$ cat /etc/mkinitcpio.conf
$ sudo file /boot/initramfs-linux.img   # do this on the defect initramfs
$ sudo lsinitcpio -a /boot/initramfs-linux.img   # do this on the defect initramfs

Last edited by Maniaxx (2024-06-19 10:48:04)


sys2064

Offline

Board footer

Powered by FluxBB