update-initramfs: Generating /boot/initrd.img-5.15.0-92-generic E: /usr/share/initramfs-tools/hooks/btrfs failed with return 1. update-initramfs: failed for /boot/initrd.img-5.15.0-92-generic with 1.

Bug #2052669 reported by Imri Paloja
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

My bare metal server would not restart. After some research, I found out that I get the following error:

    "Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"

I started up in a Rescue, and followed the steps in https://askubuntu.com/a/41939/36315, to "update-initramfs -u -k {version}".

Then I got the below message:

update-initramfs: Generating /boot/initrd.img-5.15.0-92-generic
E: /usr/share/initramfs-tools/hooks/btrfs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.15.0-92-generic with 1.

I found a workaround for it: https://askubuntu.com/a/916283/36315

   "sudo chmod -x /usr/share/initramfs-tools/hooks/fixrtc"

I did that for every file in usr/share/initramfs-tools/hooks/*

After that I did

    update-initramfs -u -k all
    update-grub

I rebooted from Rescue, and then I got the following error:

    "Kernel Panic - not syncing: No working init found. Try passing init= option to kernel."

AFter this, I reinstalled Ubuntu 22.04 on my bare metal server, but even after reinstall, I get the "No working init found" error message.

I have no idea now how to fix this.

Any help is greatly appreciated!

Imri Paloja (blade19899)
description: updated
description: updated
Imri Paloja (blade19899)
description: updated
Revision history for this message
Benjamin Drung (bdrung) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. From your description it is hard to tell if you experienced one or multiple bugs. Does running "update-initramfs -u -k {version}" succeed?

Changed in initramfs-tools (Ubuntu):
status: New → Incomplete
Revision history for this message
Imri Paloja (blade19899) wrote (last edit ):

"update-initramfs -u -k {version}" did not work. As I mentioned, after that command I got error:

    "E: /usr/share/initramfs-tools/hooks/btrfs failed with return 1."

I did this in a rescue system booted via network, not the internal Linux rescue.

I chrooted into my Linux installed on the server disk!

After I reinstalled Ubuntu on this bare metal server, i got the error

    "Kernel Panic - not syncing: No working init found. Try passing init= option to kernel."

So my current problem is that even after installing Ubuntu, I get "No working init found".

I reinstalled some packages, to heopefully fix this, but no luck.

After that I just apt list all installed packages, and reinstalled all those packages again, but no luck.

Revision history for this message
Benjamin Drung (bdrung) wrote :

Can you into a rescue/live environment, chroot into the installed system on the server disk and try to regenerate the initramfs? In case it succeeds, can you post "ls -alh /boot" and "lsinitramfs /boot/initrd.img-${version}"?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for initramfs-tools (Ubuntu) because there has been no activity for 60 days.]

Changed in initramfs-tools (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.