my laptop went in to the hibernation during distro upgrade . I run in to this error during boot :
Kernel Panic- not syncing: VFS: Unable to mount root fs on unknown block (0,0)
Here the screenshot with the error details: https://i.stack.imgur.com/ALcIh.jpg To fix it I did steps from this topic: kernel panic not syncing vfs unable to mount root fs on unknown block oo swapper not tainted Here all steps I did :
ubuntu@ubuntu:~$ sudo mount /dev/mapper/ubuntu--vg-root /mnt
ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev
ubuntu@ubuntu:~$ sudo mount --bind /dev/pts /mnt/dev/pts/
ubuntu@ubuntu:~$ sudo mount --bind /proc/ /mnt/proc/
ubuntu@ubuntu:~$ sudo mount --bind /sys/ /mnt/sys/
ubuntu@ubuntu:~$ sudo mount --bind /run /mnt/run
ubuntu@ubuntu:~$ sudo chroot /mnt
root@ubuntu:/# uname -a
Linux ubuntu 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
root@ubuntu:/# cal /boot/
config-5.4.0-26-generic System.map-5.4.0-26-generic
initrd.img-5.4.0-26-generic
root@ubuntu:/# update-initramfs -u -k 5.4.0-26-generic
update-initramfs: Generating /boot/initrd.img-5.4.0-26-generic
root@ubuntu:/# update-grub2
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
/usr/sbin/grub-mkconfig: 275: cannot create /boot/grub/grub.cfg.new: Directory nonexistent
The last command had an Issue .
Here additional Info :
root@ubuntu:/# grub-install -v
grub-install: Info: executing modprobe efivars 2>/dev/null.
grub-install: Info: Looking for /sys/firmware/efi ...
grub-install: Info: ...found.
x86_64-efi wird für Ihre Plattform installiert.
grub-install: Info: »/boot/grub/device.map« kann nicht geöffnet werden: Datei oder Verzeichnis nicht gefunden.
grub-install: Fehler: EFI-Verzeichnis kann nicht gefunden werden.
Can any one please help me with this ? Thank you !
[EDIT] I did all steps again with mounting boot partition . The only change I had was here :
update-initramfs -u -k 5.4.0-26-generic
ln: Die harte Verknüpfung '/boot/initrd.img-5.4.0-26-generic.dpkg-bak' => '/boot/initrd.img-5.4.0-26-generic' konnte nicht angelegt werden: Vorgang nicht zulässig
update-initramfs: Generating /boot/initrd.img-5.4.0-26-generic
Any one any Idea ?
Here some additional Info :
lsblk -f
sda
├─sda1
│ vfat FAT32 18E8-5B11 465,6M 9% /boot
├─sda2
│ ext2 1.0 6c5d8821-3ae5-4dc7-9b50-4b1eedbd6ec5
└─sda3
LVM2_m LVM2 durg23-i4ZY-vzY0-2BQU-IoGz-j4cU-JCVgvQ
├─ubuntu--vg-root
│ ext4 1.0 346cd866-61d7-4339-bd6f-043897a89b2a 7G 93% /
└─ubuntu--vg-swap_1
swap 1 387b8baf-13e0-4be6-8c60-659f9aa7a4b4
sdb iso966 Jolie Ubuntu 20.04 LTS amd64
│ 2020-04-23-07-51-42-00
├─sdb1
│ iso966 Jolie Ubuntu 20.04 LTS amd64
│ 2020-04-23-07-51-42-00
├─sdb2
│ vfat FAT12 1AC3-20ED
└─sdb3
ext4 1.0 writable
8fe94b8c-a489-4927-bd44-473c51d40ea0
root@ubuntu:/# [ -d /sys/firmware/efi ] && echo UEFI || echo BIOS
UEFI
root@ubuntu:/# dpkg -l | grep '^ii grub'
ii grub-common 2.06-2ubuntu7 amd64 GRand Unified Bootloader (common files)
ii grub-efi 2.06-2ubuntu7 amd64 GRand Unified Bootloader, version 2 (dummy package)
ii grub-efi-amd64 2.06-2ubuntu7 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii grub-efi-amd64-bin 2.06-2ubuntu7 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 modules)
ii grub-efi-amd64-signed 1.180+2.06-2ubuntu7 amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version, signed)
ii grub2-common
/etc/default/grub' Sourcing file
/etc/default/grub.d/init-select.cfg' /usr/sbin/grub-mkconfig: 275: cannot create /boot/grub/grub.cfg.new: Directory nonexistent – andrej Aug 21 '22 at 13:25