I had the same problem after fresh install Xubuntu 22.04 on HP EliteDesk 705 G4 DM with m2.NVMe drive. While booting I got:
VFS: Cannot open root device nve0n1p2 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(0,0)
There were no available partitions in my case.
As turned out it was necessary to update initramfs.
I booted to live Xubuntu again and used chroot.
Prerequisites what to know:
- disk name, for example sda, in my case nvme0n1p (can be seen for example in Gparted)
- EFI partition number, usually 1,
- Linux partition number, in my case 2,
- type of filesystem in the Linux partition, in my case ext4
Commands to run in a terminal, can be copied to a text editor, changed according to prerequisites and than pasted in the terminal window:
d=nvme0n1p # Disk with installed Linux
e=1 # Number of EFI partition
p=2 # Number of partition with installed Linux
sudo mount -o X-mount.mkdir -t ext4 /dev/${d}${p} /mnt/linux
sudo mount /dev/${d}${e} /mnt/linux/boot/efi
sudo mount --bind /dev /mnt/linux/dev
sudo mount --bind /dev/pts /mnt/linux/dev/pts
sudo mount --bind /proc /mnt/linux/proc
sudo mount --rbind /sys /mnt/linux/sys
sudo chroot /mnt/linux
In changerooted system I got kernel version by command:
uname -r
and received 6.2.0-26-generic so I updated initramfs and grub:
update-initramfs -u -k 6.2.0-26-generic
update-grub
and exited from chroot:
exit
Next boot was successful.