You are not logged in.

#1 2016-12-01 02:46:14

jesu
Member
Registered: 2013-03-21
Posts: 19

[SOLVED] Unable to boot: initramfs unpacking failed, kernel panic

Hi everybody. I'm having this problem since the last days, and I don't even know for sure what caused it.
The following pictures will show what's it about:
http://i.imgur.com/Q82KyCF.jpg
http://i.imgur.com/LG1XI36.jpg
These two different screenshots show what happen when I boot. Sometimes I see one thing, sometimes I see the other thing. The main messages are:

Initramfs unpacking failed: junk in compressed archive
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

I'm on a Lenovo laptop, with dual boot (Windows 8.1), UEFI system, Intel processor, systemd-boot. I've been with this setup for a long time, so it's not an installation issue.
My EFI boot partition is /dev/sda2 and my root partition is /dev/sda8. "boot" and "esp" flags are correctly set.

As far as I can tell, I didn't do anything important to cause it. Last things I remember are updating some lib32 unrelated libraries on Arch, and installing two optional updates on Windows.

I've tried several possible solutions that I found on the forums, most of them chrooting into the system, but none worked. They were:
- Downgrade kernel and udev (kernel  to 4.8.8)
- fsck /boot (EFI) and / partitions (this fixed something on efi partition, but still didn't fixed the issue)
- check HDD SMART attributes (they are ok)
- update system (did it before writing this - systemd is 232-4, mkinitcpio is 22-1, kernel is 4.8.11-1)
- reinstalled systemd-boot (intel microcode) and initramfs images (bootctl --path=/boot install and mkinitcpio -p linux) - I did this every time I changed something or updated/downgraded any package
- tried with a different bootloader (I installed grub, worked fine but didn't solve anything)
- checked all configuration files for typos (I haven't changed any, but just in case). They were /etc/mkinitcpio.conf, /boot/loader/loader.conf, /boot/loader/entries/arch.conf
- checked proper format of /boot/loader/entries/arch.conf (I haven't changed anything, but just in case). initrd lines are well written and in the right order, root fs partition is properly addressed (tried using PARTUUID instead, but no change)
- removed "resume" hook from mkinitcpio.conf and arch.conf
- checked pacman.log for any possible error (nothing found)
- checked for efivars (no error)
- I think nothing else

Again, I repeat, every time I changed a file or a package, I run:

bootctl --path=/boot install
mkinitcpio -p linux

I don't know what else to try at the moment.

Currently I don't have any relevant file to paste as I'm on Windows and I have to reboot and chroot into the system to get it (or mount the partition from Windows, thing that I don't like to do at all). The only thing I have ATM is a blkid output:
http://i.imgur.com/1rCxapW.jpg
http://i.imgur.com/E7sB91M.jpg


Sorry for any possible typo, but I assure you commands were properly run and files were properly addressed.

If any other file or information is needed, just ask.

EDIT:
I forgot to mention another thing I tried: changing initramfs compressión method from default (bzip) to none (cat)
Recenlty I uninstalled the possible problematic Windows updates I mentioned, but had no effect.
Here are some relevant files:

EDIT 2: Solution

As Head_on_a_Stick said, regenerating the EFI partition and reinstalling the kernel and everything back made the trick. The steps to achieve this are the following:

  1. First of all, backup your ESP partition. You can copy all it's content or make a partition image. But make sure you can get back everything you have in this partition, ESPECIALLY if you have dual boot with Windows. In my case, $esp/BOOT and $esp/EFI/Microsoft are the Windows/OEM folders.

  2. Next thing I did was recreating the ESP partition. You'll have to boot with a live cd or usb stick, preferably and Arch Linux one, so you can use arch-chroot later. For this, you can use fdisk/gdisk. Check the wiki for details. And remember to backup your partition table. Even though I'm not sure if it's necessary to delete it, first I deleted the partition, then I created an EFI partition in that same space, and changed it's name to the original one (just in case Windows complains). You can also add the "hidden" flag here, which Windows uses. Make sure the partition has the "boot" and "esp" flags.

  3. After saving the updated partition table, chroot into your system and reinstall your bootloader

  4. Next thing is to regenerate initramfs and kernel image. "mkinitcpio -p linux" command won't work. You have to reinstall the kernel package. In case you use Intel microcode, algo reinstall that package

  5. An important thing to remember is that recreating the ESP partition change it's UUID, so you have to change it in your /etc/fstab file, and maybe in other file you may use it. You can check the UUID with blkid

  6. If you use dual boot, now you can copy back the Windows folders specified above.

  7. If you had any other bootloader settings, restore them, and update the bootloader. Make sure your ESP partition has it's original structure and files and that anything is missing.

  8. When you reboot, you might need to update your BIOS EFI settings. And that's all.

Last edited by jesu (2016-12-02 15:34:15)

Offline

#2 2016-12-01 03:03:13

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: [SOLVED] Unable to boot: initramfs unpacking failed, kernel panic

It would be much better if you can post actual text here as opposed to just screenshots. See the following: https://wiki.archlinux.org/index.php/Co … s_and_code.

Otherwise, chances are high those Windows updates broke something. But I have no idea what/why/how because I do not use any Windows of any kind. Sorry sad


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#3 2016-12-01 03:49:18

Texbrew
Member
From: The Lone Star State
Registered: 2016-02-09
Posts: 580

Re: [SOLVED] Unable to boot: initramfs unpacking failed, kernel panic

JohnBobSmith wrote:

It would be much better if you can post actual text here as opposed to just screenshots. See the following: https://wiki.archlinux.org/index.php/Co … s_and_code.

Otherwise, chances are high those Windows updates broke something. But I have no idea what/why/how because I do not use any Windows of any kind. Sorry sad

Agreed. I only skimmed the OP's message, but back when I was too scared to ditch Windows, a windows update trashed my grub menu by rewriting the MBR. I didn't know what else to do, so I re-installed linux, dual boot again. That's in the distant past.

I know the OP's setup is UEFI, but I don't think that's the issue. The issue is you don't own Windows. And the way MS acts, you don't own your machine, either.

I know I'm teetering on the edge of a rant here. I'll pull back.  My life is a lot happier without windows, FWIW. All of my windows hard drives are gathering dust on a shelf. Gee, it feels really good to say that once in a while.

I hope you get your problem solved, I can't help with UEFI boot setups.

Offline

#4 2016-12-01 14:16:12

jesu
Member
Registered: 2013-03-21
Posts: 19

Re: [SOLVED] Unable to boot: initramfs unpacking failed, kernel panic

Well, it could be Windows or it could be not, no idea.
Anyway, thanks for posting. And I'll try to post only text from now on.

Offline

#5 2016-12-01 22:41:08

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,289
Website

Re: [SOLVED] Unable to boot: initramfs unpacking failed, kernel panic

jesu wrote:

My EFI boot partition is /dev/sda2 and my root partition is /dev/sda8. "boot" and "esp" flags are correctly set.

Please post concrete command output rather than a vague description.

# parted -l

I think that you should recreate the FAT filesystem on the ESP from scratch and repopulate /boot -- reinstalling the kernel, running `bootctl install` and restoring the configuration files should do this.


Para todos todo, para nosotros nada

Offline

#6 2016-12-01 23:12:19

jesu
Member
Registered: 2013-03-21
Posts: 19

Re: [SOLVED] Unable to boot: initramfs unpacking failed, kernel panic

# parted -l
Model: ATA WDC WD10JPVX-00J (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  1050MB  1049MB  ntfs            Basic data partition          hidden, diag
 2      1050MB  1322MB  273MB   fat32           EFI system partition          boot, hidden, esp
 3      1322MB  2371MB  1049MB  fat32           Basic data partition          hidden
 4      2371MB  2505MB  134MB                   Microsoft reserved partition  msftres
 5      2505MB  261GB   258GB   ntfs            Basic data partition          msftdata
 8      261GB   323GB   62.3GB  ext4            linux_root
 9      323GB   955GB   631GB   ext4            linux_home
10      955GB   959GB   4296MB  linux-swap(v1)  linux_swap
 6      959GB   986GB   26.8GB  ntfs            Basic data partition          msftdata
 7      986GB   1000GB  14.5GB  ntfs            Basic data partition          hidden, diag

@Head_on_a_stick: I'll try as soon as I can to do what you suggested. What's your theory?

Offline

#7 2016-12-02 07:56:04

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,289
Website

Re: [SOLVED] Unable to boot: initramfs unpacking failed, kernel panic

Try turning off the "hidden" flag on the ESP:

# parted /dev/sda set 2 hidden off

That syntax may be wrong, I'm posting from OpenBSD -- check the man page for details (obviously).

EDIT:

What's your theory?

The FAT filesystem on the ESP may be b0rked, irrespective of the `fsck` results.

EDIT2: as you are dual-booting with Windows, make sure that the entire contents of the EFI system partition are backed up and can be restored to the new filesystem if you choose to recreate it -- the Windows bootloader is also on the ESP at $ESP/EFI/Microsoft/Boot/bootmgfw.efi

Last edited by Head_on_a_Stick (2016-12-02 08:04:37)


Para todos todo, para nosotros nada

Offline

#8 2016-12-02 15:08:08

jesu
Member
Registered: 2013-03-21
Posts: 19

Re: [SOLVED] Unable to boot: initramfs unpacking failed, kernel panic

So, finally I fixed, thanks to your suggestion Head_on_a_Stick.

First of all, changing the "hidden" flag of course had no effect.
Next thing I did was regenerating /boot and reinstalling kernel and stuff.

I'll edit the post now to add the step-by-step solution.

Again, thank you very much for helping.

Offline

#9 2017-12-24 02:12:41

DAstafyev
Member
Registered: 2017-12-24
Posts: 5

Re: [SOLVED] Unable to boot: initramfs unpacking failed, kernel panic

del

Last edited by DAstafyev (2017-12-24 02:13:42)

Offline

#10 2017-12-24 02:45:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Unable to boot: initramfs unpacking failed, kernel panic


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB