Fedora UEFI and usb bug after ssd switch

I have a very weird issue with my newly installed fedora kde spin.
So, my goal was to upgrade the nvme ssd of my laptop (Dell Precision 5520) from 250G to 500G and at the same time, switch from manjaro to fedora.
One of the thing I really wanted to do was to switch from legacy boot (bios) to uefi so that I could use fwupd to update my firmware.
So I installed fedora kde spin without any problem in uefi with secure boot enabled. the uefi boot entry for fedora from my uefi firmware boot list was shown as Fedora . After the install, fwupd found updates for my firmware and the firmware update went without a hitch :slight_smile:

However, I needed to put back the previous ssd to finish backupping some data, so I switched back to legacy boot, changed the ssd, backed up some data, switched back to the new ssd and then everything went wrong.
I first forgot to switch back to uefi with secure boot, so at first the laptop could not boot. Then after switching back to uefi, I could only boot with uefi with secure boot disabled.
Also now, the entry for booting fedora in my uefi firmware is labelled with my ssd (500G samsung ssd…) instead of Fedora .
The weirdest thing is that now, my laptop refuses to boot (only the dell log shows without ever doing anything) when my bootable usb key is connected.
When on fedora, when I connect my bootable usb key, the key is not recognized by plasma.
If I monitor /dev , /dev/sdb actually shows up after connected the usb key, but if I launch the kde partition manager, the partition manager will freeze for at least 30 sec, and after it won’t show the usb key and /dev/sdb will have disappeared.
One other thing I noticed is that when I first installed fedora, after grub, I had the message booting in insecure mode once , but now I have it twice :confused:

I don’t know what is wrong with my setup so if anyone have an advice, I’m ready to try anything :slight_smile:

Initially it sounds like the bios/uefi lost the secure boot configuration when you switched drives. I know there are ways to rebuild those, but I usually end up just reinstalling myself.

The following document may help your specific situation:

Personally I would have gone another route, and this option may work for you as well. NVME and SSD USB enclosures are extremely cheap, and even rugged version (for travelers) are at a decent pricepoint. What may be a better option for you is to reinstall fedora as you originally had it with secureboot - then perform your data backup/restoration using the older NVME as a USB drive instead.

Thanks for your reply, after reading your link, I digged a little bit in the sequence boot menu.
I realized that you could boot from multiple files in the UEFI folder and as you said maybe that the configuration went somehow wrong.

So on a whim, I decided to reset my whole bios settings. and by doing that, it also reset the boot sequence and found the previous Fedora entry as before, which can be boot in secure mode !
For information, the Fedora entry correspond to this file: /boot/efi/EFI/fedora/shim.efi

The remaining questions are:

why do I have this booting in insecure mode message while booting with secure boot enabled ?

and what is happening to my usb key ? For now, I think it’s broken, but I need to try on another computer.

Here is the answer for why I still have this booting in insecure mode message: