KERNEL PANIC! - Unable to mount fs on unknown-block(0,0)

Hello Friends

Today the city had a terrible rain and therefore a catastrophic flood, it arrived to my home until some point, many neighbors had no luck.

Assuming the worst scenario about this situation: for a MacBook Pro 2012 with Ubuntu Desktop 24:0x LTS was turn off to let me unplug the laptop.

Note the laptop was shutdown after many months 5-6

Once “finished” the disaster the laptop was turn on and take the opportunity to do the following

sudo apt update
sudo apt upgrade <--- some error about a dpkg
sudo apt autoremove
sudo apt autoclean
sudo apt clean

sudo apt update
sudo apt upgrade <--- some error about a dpkg
reboot

But when is restarted appears: a screen with a “purple” background and the left top Linux tux with an exclamation sign and the following message:

KERNEL PANIC!
Please reboot your computer.
Unable to mount fs on unknown-block(0,0)

Well because is not possible reboot (not sure how to do that - I mean, where to write?) was shutdown and turn on with the classic power button, appears the black screen with some options (the first one is Ubuntu) - I think it is the Grub - pressed enter for the first option as Ubuntu but appears the same message

What to do? It is my first time dealing with this

Thanks in advance

If something like this happened to me :

  1. boot off a USB media (e.g. Ubuntu LTS on USB - can’t remember the sequence on a Mac to force boot of something other than the internal HDD / SSSD).
  2. re-install the O/S

Sorry - if a problem looks too finicky (difficult) to resolve - I’ll usually just re-install the O/S - which isn’t a huge issue for me - I don’t lose data as my important stuff is on my NAS or shared in my “self hosted cloud storage solution” (ResilioSync)…

But - if you get a kernel panic with a USB boot - maybe your hardware is failing? That’s unlikely…

To boot a mac to a usb or other external disk

Immediately hold down the Option key after turning it on.

This is done with the usb connected from a power on

Some newer macs based on M processors can be different

But this should allow you to restart and install from the usb a linux version.

I remember there was a issue on the cmos battery if left for some time unused, but cannot remember if its a battery you can changé, depends on the manufacturing year

Here you should have taken care of the issues.

I assume continuing with this initiated the death of your OS. Unfortunately. Who told you to do so?

I might be wrong, but IIRC, the lack of battery power should end up in a start with fail-safe defaults for the present hardware.

If you can see the grub menu when the laptop boots you could try to boot the older kernel(s). If you can boot to older kernel backup all your personal data and then try to update the system.

Not quite the same on a mac due to some defaults in the cmos relationship with the bios

Prefer clean install rather than updates, they dont always work correctly, safer bet from new.

But yes to copy importent items off before doing any update or install

I agree with @callpaul.eu here, as I’m afraid the former apt autoremove created a complete mess.

Is there an Advance option? Try to login in under an older kernel or recovery like @ihasama mentioned.

I would try.

sudo dpkg --configure -a This finishes interrupted configs
sudo apt install -f Tries to repairs any broken deps that might show up
sudo apt update
sudo apt install --reinstall linux-image-generic-hwe-24.04 linux-headers-generic-hwe-24.04 Should Re-trigger proper kernel setup & initramfs
sudo update-initramfs -u -k all Rebuilds initramfs
sudo update-grub
Then reboot.

Because you can get a grub screen , you may be able to boot Ubuntu in Advanced/Recovery (ie single user) Mode. Try and boot another kernel or try single user mode.

You may also be able to edit the grub boot sequence (press e)…for example you could change the cmdline boot parameters.

If they both fail, do what @daniel.m.tripp says and boot a usb drive.
If that boots you can mount the Ubuntu filesystem and try to find the problem.

Here is what AI says

" “Unable to mount root fs on unknown-block(0,0)” means the Linux kernel cannot find or load the root file system, often caused by a missing initramfs image after an update, a full /boot partition, or incorrect GRUB configuration. Fix it by booting an older kernel from the GRUB menu, then regenerating initramfs or updating grub"

so you might have a look and see if the initramfs is missing, or if /boot is full.

That and what I did when I had my kernel panic was to restore the OS from my backup copy.

Even if I voted above for reinstalling, rescuing a completely messed up or damaged system is a special challenge and very exciting, even though restoring a backup is faster and safer.

There is no other opportunity to learn to handle such things.

Yes I agree. I learned a few things from the panic I had with Mint.

Pretty much every single day on multiple Ubuntu computers I run:

sudo apt update

sudo apt list –upgradable

sudo apt upgrade -y

sudo apt autoremove -y

sudo apt autoclean

sudo snap refresh –list

sudo snap refresh (if there are any updates)

sudo ./sc-snap-clean.sh (a script I found on It’s Foss).

flatpak update

I don’t have problems with any of that.

One time recently I did get a kernel panic, and it was due to VirtualBox. I made a post on It’s Foss about that.

This was the problem-^^^ guessing the initramfs image was not made correctly. Thus my suggestion- above..

I fully agree. Whatever it was that caused the issue, you have to care about it in the first place. Make it undone; don’t just continue.

I’m hopeful this will resolve it. In theory pkg --configure -a & apt install -f have a strong chance of fixing the problem by themselves.

Do you need to do all of this with Ubuntu where it has update available from the desktop environment

I dont think the DE version of update will do update-initramfs.
and
DE’s only work if you can boot the system.

@JoelA is right, I think. … its initrd is probably misssing… it needs to make one with update-initramfs.

This update is completely a new item to me, this posting is the first time I have heard of it.
I have never updated initramfs. Is this something I need to know?