You are not logged in.

#1 2020-01-26 16:33:32

legdeg
Member
Registered: 2020-01-26
Posts: 10

[SOLVED]initramfs: unpacking failed: invalid magic at start of compres

Arch Linux won't boot after a recent pacman -Syu. I'm getting the following message logged:

initramfs: unpacking failed: invalid magic at start of compressed archive
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(259,2) 
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.14-arch1-1 #1

Followed by a kernel call trace.

The error message looks similar to https://bbs.archlinux.org/viewtopic.php?id=136540, but following the fix there (chroot from live system, reinstall linux and udev, run mkinitcpio -p linux) does not solve the problem.

I did recently fsck the boot vfat partition, not sure if that's related to this issue.

Last edited by legdeg (2020-01-26 18:19:00)

Offline

#2 2020-01-26 17:27:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: [SOLVED]initramfs: unpacking failed: invalid magic at start of compres

Do you have enough space on your /boot partition?

Offline

#3 2020-01-26 17:32:05

legdeg
Member
Registered: 2020-01-26
Posts: 10

Re: [SOLVED]initramfs: unpacking failed: invalid magic at start of compres

V1del wrote:

Do you have enough space on your /boot partition?

I'd imagine so. There's 427M space remaining and linux installation and mkinitcpio didn't complain about anything.

Offline

#4 2020-01-26 17:37:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: [SOLVED]initramfs: unpacking failed: invalid magic at start of compres

Is this an EFI boot? Might be some corruption on the vfat file system, run an fsck over it.

Offline

#5 2020-01-26 18:18:34

legdeg
Member
Registered: 2020-01-26
Posts: 10

Re: [SOLVED]initramfs: unpacking failed: invalid magic at start of compres

The problem went away after I updated intel microcode.

Offline

#6 2021-02-23 12:16:19

Al.Piotrowicz
Member
Registered: 2017-08-07
Posts: 116

Re: [SOLVED]initramfs: unpacking failed: invalid magic at start of compres

I had the exactly same problem after last mkinitcpio upgrade:

upgraded mkinitcpio (29-1 -> 30-1)

The default compression algorithm has been changed to ZSTD in the recent version. I had have to chroot on the liveusb and regenerate initramfs image with changing the compression to lz4:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=()

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS=(base udev lvm2 encrypt autodetect modconf block filesystems keyboard fsck shutdown)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

Then the problem got away and I was able to boot into the luks password prompt. I've read on some reddit thread, that it may have something in common to kernel modules compression method which is xz in my case, but Im not sure.
Any ideas are very welcome. Thanks.

Offline

#7 2021-02-23 13:10:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: [SOLVED]initramfs: unpacking failed: invalid magic at start of compres

Please don't necrobump/hijack solved threads with issues that cannot possibly have been the original cause. The default compression change should work with all kernels from the repos currently but that wasn't an issue when this thread was originally created.

Closing this old thread.

Last edited by V1del (2021-02-23 13:10:59)

Offline

Board footer

Powered by FluxBB