Score:-1

After upgrading from 20.04 to 22.04 : Initramfs unpacking failed: invalid magic at start of compressed archive

ma flag

enter image description here

As text:

[    0.187279] Initramfs unpacking failed: invalid magic at start of compressed
archive
[    0.373537] Kernel panic - not syncing: UFS: Unable to mount root fs on unknown
wn-block(0,0)
[    0.3736011 CPU: 0 PID: 1 Comm: swapper/0 Mot tainted 5.4.0-146-generic #163-
Ubuntu
[    0.373661] Hardware name: To Be Filled By 0.E.M. To Be Filled By 0.E.M./AB35
0 Pro1, BIOS P5.80 06/14/2019
[    0.3737241 Call Trace:
[    0.373777] dump_stack+0x6d/0x8b
[    0.3738291 panic+0x101/0x2e3
[    0.373880] mount_block_root+0x23f/0x2e8
[    0.373933] mount_root+0x38/0x3a
[    0.3739841 prepare_namespace+0x13f/0x194
[    0.374036] kernel_init_freeable+0x265/0x289
[    0.374090] ? rest_init+0xb0/0xb0
[    0.374141] kernel_init+0xe/0x110
[    0.3741921 ret_from_fork+0x35/0x10
[    0.374263] Kernel Offset: 0x31200000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[    0.3743341 ---[ end Kernel panic - not syncing: UFS: Unable to mount root fs on unknown-block(0,0) ]---

I am using LUKS + LVM on my Ubuntu SSD drive.

I tried to boot using livecd, mount, chroot and update initramfs + grub, but that doesn't solve the problem.

mint@mint:~$ sudo cryptsetup luksOpen /dev/sdc5 sda5_crypt
Enter passphrase for /dev/sdc5: 
mint@mint:~$ sudo mount /dev/mapper/ubuntu--vg-root /mnt
mint@mint:~$ sudo mount --bind /dev /mnt/dev
mint@mint:~$ sudo mount --bind /dev/pts /mnt/dev/pts
mint@mint:~$ sudo mount --bind /proc /mnt/proc
mint@mint:~$ sudo mount --bind /sys /mnt/sys
mint@mint:~$ sudo mount /dev/sdc1 /mnt/boot
mint@mint:~$ sudo chroot /mnt
root@mint:/# sudo update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-5.4.0-146-generic
root@mint:/# sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-146-generic
Found initrd image: /boot/initrd.img-5.4.0-146-generic
Found linux image: /boot/vmlinuz-5.4.0-144-generic
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows 10 on /dev/nvme0n1p1
done
root@mint:/#
pl flag
Marking to close this based on the hostname being "mint" suggests this is a Linux Mint system which is unsupported here. Do let me know if this is an incorrect assumption.
viiprogrammer avatar
ma flag
I'm using Mint as a livecd
Score:-1
ma flag

After few hours, i found solution... just install new kernel version, after that i booted successfully.

Full commands list:

# My ubuntu uses LUKS + LVM with separate boot partition
# sdc - my SSD in LiveCD
# sdc5 my root partition name in LiveCD
# sda5_crypt - should be same as in /etc/crypttab in system for restoring
sudo cryptsetup luksOpen /dev/sdc5 sda5_crypt

sudo mount /dev/mapper/ubuntu--vg-root /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
# Mount boot partition
sudo mount /dev/sdс1 /mnt/boot
# chroot to /mnt
sudo chroot /mnt

# Install new kernel
cd /home/username
mkdir kern
cd kern
wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.10/amd64/linux-headers-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.10/amd64/linux-headers-5.10.0-051000_5.10.0-051000.202012132330_all.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.10/amd64/linux-image-unsigned-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v5.10/amd64/linux-modules-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb
sudo dpkg -i *.deb

After that I get this log:

Selecting previously unselected package linux-headers-5.10.0-051000-generic.
(Reading database ... 295073 files and directories currently installed.)
Preparing to unpack linux-headers-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb ...
Unpacking linux-headers-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
Selecting previously unselected package linux-headers-5.10.0-051000.
Preparing to unpack linux-headers-5.10.0-051000_5.10.0-051000.202012132330_all.deb ...
Unpacking linux-headers-5.10.0-051000 (5.10.0-051000.202012132330) ...
Selecting previously unselected package linux-image-unsigned-5.10.0-051000-generic.
Preparing to unpack linux-image-unsigned-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb ...
Unpacking linux-image-unsigned-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
Selecting previously unselected package linux-modules-5.10.0-051000-generic.
Preparing to unpack linux-modules-5.10.0-051000-generic_5.10.0-051000.202012132330_amd64.deb ...
Unpacking linux-modules-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
Setting up linux-headers-5.10.0-051000 (5.10.0-051000.202012132330) ...
Setting up linux-headers-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.10.0-051000-generic
 
Kernel preparation unnecessary for this kernel. Skipping...
applying patch disable_fstack-clash-protection_fcf-protection.patch...patching file Kbuild
Hunk #1 succeeded at 118 (offset 47 lines).
 
 
Building module:
cleaning build area...(bad exit status: 2)
unset ARCH; [ ! -h /usr/bin/cc ] && export CC=/usr/bin/gcc; env NV_VERBOSE=1 'make' -j4 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=5.10.0-051000-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/lib/modules/5.10.0-051000-generic/build LD=/usr/bin/ld.bfd CONFIG_X86_KERNEL_IBT= modules...................
cleaning build area...(bad exit status: 2)
 
nvidia.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.0-051000-generic/updates/dkms/
 
nvidia-modeset.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.0-051000-generic/updates/dkms/
 
nvidia-drm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.0-051000-generic/updates/dkms/
 
nvidia-uvm.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.0-051000-generic/updates/dkms/
 
nvidia-peermem.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.10.0-051000-generic/updates/dkms/
 
depmod...
   ...done.
Setting up linux-image-unsigned-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
I: /boot/vmlinuz.old is now a symlink to vmlinuz-5.4.0-146-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-5.4.0-146-generic
I: /boot/vmlinuz is now a symlink to vmlinuz-5.10.0-051000-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.10.0-051000-generic
Setting up linux-modules-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
Processing triggers for linux-image-unsigned-5.10.0-051000-generic (5.10.0-051000.202012132330) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.10.0-051000-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.10.0-051000-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.10.0-051000-generic
Found initrd image: /boot/initrd.img-5.10.0-051000-generic
Found linux image: /boot/vmlinuz-5.4.0-146-generic
Found initrd image: /boot/initrd.img-5.4.0-146-generic
Found linux image: /boot/vmlinuz-5.4.0-144-generic
Found initrd image: /boot/initrd.img-5.4.0-144-generic
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows 10 on /dev/nvme0n1p1
done

After booting into the system, I ran an update check and installed "5.15.0-69-generic".

Good luck!

David avatar
cn flag
You have installed an unsupported kernel. This will cause you issues with upgrades.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.