Can't boot after swapping NVMe drive

I had an old NVMe from my previous laptop that I wanted to recover some files from. I decided to boot it in my laptop.

This is what happened:

  • I had a perfectly working laptop that ran the same NVMe that came with it.

  • Shut it down, replaced the NVMe with the old one.

  • Tried to boot, it didn’t work. Figured there’s a problem with the old drive.

  • Replaced it again with the regular one.

  • Tried to boot, it didn’t work.

I have the luck I was in a hackerspace while doing this, so some folks have been suggesting solutions. Since then we’ve been trying to get back into my original drive. Without success.

We tried disabling all BIOS settings for security. We noticed there was no efibootmgr entry and when we place one, it gets deleted on reboot. Booting a USB live media works.

Am I fighting some BIOS thing? The BIOS says “Rev. 5” at the top.

OK, I got it fixed with putting a new efi boot entry using efibootmgr eventually.

But that doesn’t really explain why all this happens in the first place. It seems that efi entries get deleted when they don’t work maybe.