2

I recently changed laptop and upgraded my M2 SATA having Ubuntu into a M2 NVMe via dd. Firstly I booted into livecd (ubuntu 22), made a chroot environment, cleared all the linux-image-* and linux-headers-* packages and reinstalled linux-image-generic and linux-headers-generic, install a 5.4 version of the kernel on Ubuntu 20. I then proceeded to rebuild Grub and Initramfs.

While booting, the system hangs and finally drops an initramfs' busybox shell, to which I can notice my /dev/nvme* disks don't appear, while my plugged in LiveCD appears as /dev/sda.

The content of /proc/modules return that nvme, nvme_core, and vmd modules are loaded in, with VMD being enabled in the BIOS.

To note the /dev/nvme* volumes are available when I do a from-scratch installation from livecd. Help would be appreciated on this matter.

1
  • I have been able to successfully boot after installing Ubuntu 22, and hijacking the /boot partition to point to my Ubuntu 20 (the system is a bit unstable though).
    – Ra'Jiska
    Commented May 15, 2023 at 12:44

1 Answer 1

1

Had a similar issue. It turned out that a NVME boot required one of the modules from the linux-modules-extra-* package. So I had to do a boot from Ubuntu-Live-Image, open a shell, and do about this:

sudo -i

mount /dev/nvme0n1p2 /mnt
mount /dev/nvme0n1p1 /mnt/boot/efi
for i in /dev /proc /sys /run
do
    mount -o bind $i /mnt/$i
done

chroot /mnt /bin/bash

dpkg -l | grep linux-image   # Find your kernel package, e.g. linux-image-5.15.0-84-generic

apt-get install linux-modules-extra-5.15.0-84-generic  # Install what is missing

exit  # chroot

for i in /mnt/dev /mnt/proc /mnt&sys /mnt/run /mnt/boot/efi /mnt
do
    umount $i
done

Please note that details like version number or device names may have to be adapted to your case. If you are uncertain you may use the following command to get a better idea about your device names or map the UUID you may have seen in the boot error message:

lsblk -f
2
  • Hmm I think you've missed the part that you chroot into /mnt before dpkg and apt-get and exit the chroot after them?
    – Tom Yan
    Commented Sep 20, 2023 at 15:31
  • Your are right - just scrap the bits & pierces from the memory and forgot that part. Commented Sep 21, 2023 at 17:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .