So I had an M.2 SATA drive for my main boot and root drive. This was encrypted via luks, and the root partition itself was behind an LVM. I was running fedora 39 with kernel 6.7.3-200 with nvidia drivers. This drive was rather small and was running out of space, so I got a new, much larger M.2 NVMe drive to replace it with. There is another encrypted drive, a normal SATA disc, that is also in the LVM for root.
I booted the system using a live usb for fedora 39, and from that state I cloned the M.2 SATA disc to an img file on another sata ssd in the system, using dd. Once that had finished, I replaced the M.2 SATA with the new NVMe, booted back into the live usb. It saw the new /dev/nvme0 device and I used dd to write the img file to the new M.2 NVMe drive.
Once that was finished, I used a serious of parted
, cryptsetup resize
, pvresize
, and lvresize
to resize the root partition to take up all the new free space. I checked the uuids of the partitions and they were the same.
vgscan
, pvscan
, lvscan
all worked fine, and I was able to mount the root partition using the live usb and even chroot to it. from there I cleared out my old /lib/modules
from kernels 3,4, and 5, and did a dracut --regenerate-al
to rebuilt the initramfs.
I checked the kernel params in grub, as they were passing both in as params both the root partition (using the lvm name, so /dev/fedora/root) and the uuid for the luks paritions. they matched what was on the new drive (no uuid had changed after writing with dd. I assume if they did then the live usb would have had trouble mounting anything on the lvm anyhow…) Both the luks partitions (from the new nvme disc and from the sata disc that hadn’t changed) were being passed in.
I rebooted without the usb, so from the new M.2 NVMe disc, and grub worked fine and tried booting the kernel. It prompted me for the luks password for the sata disc, but complained that it could not find the device with the uuids from the new NVMe disc.
It dropped me into the dracut emergency shell. There were no nvme devices in /dev/.
Yet if I boot back into the live usb, I get my new /dev/nvme0 device, and am able to mount the whole lvm again, and even (after mount -B
ing /sys, /proc and /dev) can chroot it for another dracut…
Any ideas why it cannot see the new nvme disc when I boot from it? Did I miss something in grub config ?