"kernel panic - not syncing: vfs: unable to mount root fs on unknown-block(0,0)" after update

Twiks

New Member
Joined
Feb 5, 2023
Messages
3
Reaction score
0
Credits
29
Hi everyone,

I updated my system from Kubuntu 20.10 to the LTS version 22.04 and can't boot my computer anymore. I get this error every time I'm trying, together with the notion that there's "no memory left".

So far I have tried the following:

kubuntu@kubuntu:~$ df -hl
Filesystem Size Used Avail Use% Mounted on
tmpfs 1,6G 1,7M 1,6G 1% /run
/dev/sdb 3,6G 3,6G 0 100% /cdrom
/cow 7,8G 208M 7,6G 3% /
tmpfs 7,8G 0 7,8G 0% /dev/shm
tmpfs 5,0M 8,0K 5,0M 1% /run/lock
tmpfs 7,8G 504K 7,8G 1% /tmp
tmpfs 1,6G 60K 1,6G 1% /run/user/999
/dev/sda2 704M 280M 373M 43% /media/kubuntu/cd392a5e-9529-4bc8-aa82-dd0be0146a6d

/dev/sda2 is the boot partition and it seems just fine to me. A df gives me:

/dev/mapper/vgkubuntu-root 958045344 723185096 186120512 80% /
/dev/sda2 719936 286208 381264 43% /boot
/dev/sda1 523248 5364 517884 2% /boot/efi

Which seems just fine as well. So I continued with the procedure recommended by many on the web:

% decrypt lvm
kubuntu@kubuntu:~$ sudo cryptsetup luksOpen /dev/sda3 sda3_crypt
% mount partition
kubuntu@kubuntu:~$ sudo mount /dev/mapper/vgkubuntu-root /mnt
% remove the symbolic link, got an error here
kubuntu@kubuntu:~$ sudo rm /mnt/etc/mtab
% mount boot partition
kubuntu@kubuntu:~$ sudo mount /dev/sda2 /mnt/boot
% mount efi
kubuntu@kubuntu:~$ sudo mount /dev/sda1 /mnt/boot/efi
% further commands
kubuntu@kubuntu:~$ sudo mount -o bind /dev /mnt/dev
kubuntu@kubuntu:~$ sudo mount --rbind /sys /mnt/sys
kubuntu@kubuntu:~$ sudo mount -t proc /proc /mnt/proc
kubuntu@kubuntu:~$ sudo cp /proc/mounts /mnt/etc/mtab
% chroot
kubuntu@kubuntu:~$ sudo chroot /mnt /bin/bash
% Update initramfs
(base) root@kubuntu:/# update-initramfs -k all -c
update-initramfs: Generating /boot/initrd.img-5.15.0-58-generic
update-initramfs: Generating /boot/initrd.img-5.4.0-137-generic
% re-install grub
(base) root@kubuntu:/# grub-install
% update grub
(base) root@kubuntu:/# 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.15.0-58-generic
Found initrd image: /boot/initrd.img-5.15.0-58-generic
Found linux image: /boot/vmlinuz-5.4.0-137-generic
Found initrd image: /boot/initrd.img-5.4.0-137-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done

Doesn't help though and I still can't boot, despite the fact that everything seems to have worked out nicely . Does anyone have a solution? I'd really appreciate it. Thank so much!

Just FYI:

Crypttab

'sda3_crypt UUID=d1f7746e-2101-4553-bfbd-697d740522ad none luks,discard'

fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/vgkubuntu-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda2 during installation
UUID=cd392a5e-9529-4bc8-aa82-dd0be0146a6d /boot ext4 defaults 0 2
# /boot/efi was on /dev/sda1 during installation
UUID=F083-9680 /boot/efi vfat umask=0077 0 1
/dev/mapper/vgkubuntu-swap_1 none swap sw 0 0

lsblk -f

(base) root@kubuntu:/# lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0
loop1
loop2
loop3
loop4
loop5
loop6
sda
├─sda1 505,7M 1% /boot/efi
├─sda2 372,3M 40% /boot
└─sda3
└─sda3_crypt
├─vgkubuntu-root 177,5G 75% /
└─vgkubuntu-swap_1

PS: I'm working from a Kubuntu 22.04 live usb. I checked that both my laptop and the live system run with UEFI.
 
Last edited:


D

Deleted member 108694

Guest
Looks to me you are missing initramfs for the latest kernel

Code:
sudo update-initramfs -u -k 5.15.0.58-generic

then run
Code:
sudo update-grub
now reboot

all those "loop" are a side affect of Snap Packages
 
OP
T

Twiks

New Member
Joined
Feb 5, 2023
Messages
3
Reaction score
0
Credits
29
Thanks.

(base) root@kubuntu:/# update-initramfs -u -k 5.15.0.58-generic
update-initramfs: Generating /boot/initrd.img-5.15.0.58-generic
W: missing /lib/modules/5.15.0.58-generic
W: Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/5.15.0.58-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
cat: /var/tmp/mkinitramfs_uSSLlQ/lib/modules/5.15.0.58-generic/modules.builtin: Datei oder Verzeichnis nicht g
efunden
W: Can't find modules.builtin.modinfo (for locating built-in drivers' firmware, supported in Linux >=5.2)
depmod: WARNING: could not open modules.order at /var/tmp/mkinitramfs_uSSLlQ/lib/modules/5.15.0.58-generic: No
such file or directory
depmod: WARNING: could not open modules.builtin at /var/tmp/mkinitramfs_uSSLlQ/lib/modules/5.15.0.58-generic:
No such file or directory
(base) root@kubuntu:/#

How do I proceed from here?

Well, the command seemed to have work out with the other kernel:

(base) root@kubuntu:/# update-initramfs -u -k 5.4.0-137-generic
update-initramfs: Generating /boot/initrd.img-5.4.0-137-generic
(base) root@kubuntu:/#

Indeed, the 'no memory left' message does not appear anymore, but the other does:

VFS: Cannot open root device "mapper/vgkubuntu-root" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(00)
 
OP
T

Twiks

New Member
Joined
Feb 5, 2023
Messages
3
Reaction score
0
Credits
29
Hi,

I solved the problem. :D

Code:
% decrypt lvm
kubuntu@kubuntu:~$ sudo cryptsetup luksOpen /dev/sda3 sda3_crypt
% mount partition
kubuntu@kubuntu:~$ sudo mount /dev/mapper/vgkubuntu-root /mnt
% mount boot partition
kubuntu@kubuntu:~$ sudo mount /dev/sda2 /mnt/boot
% mount efi
kubuntu@kubuntu:~$ sudo mount /dev/sda1 /mnt/boot/efi
% further commands.- /sys must be mounted with --rbind!
kubuntu@kubuntu:~$ sudo mount -o bind /dev /mnt/dev
kubuntu@kubuntu:~$ sudo mount --rbind /sys /mnt/sys
kubuntu@kubuntu:~$ sudo mount -t proc /proc /mnt/proc
kubuntu@kubuntu:~$ sudo cp /proc/mounts /mnt/etc/mtab
% establish internet connection
kubuntu@kubuntu:~$ sudo mount -o bind /etc/resolv.conf /mnt/etc/resolv.conf
% enter chroot
kubuntu@kubuntu:~$ sudo chroot /mnt /bin/bash

I then re-installed all packages:

Code:
dpkg --get-selections | grep "\binstall" | awk '{print $1}' > /tmp/dpkg.log
xargs -n1 apt-get --reinstall install -y < /tmp/dpkg.log

And re-installed the latest kernel:
Code:
sudo apt-get install --reinstall linux-image-$(uname -r)
dpkg --configure -a
apt-get autoremove
update-grub

Now everything runs smoothly. ;)

Thanks for your help!
 

Members online


Top