I had a dual boot installation with Win10 and Ubuntu running side by side on a 255GB NVMe SSD, but my laptop would occasionally not boot into the SSD, but would after one or two reboots, randomly deciding to not boot into the SSD sometimes, somewhat. So I thought I'll remove Ubuntu and get Windows' bootloader back through a bootable UBS running Windows installer. Unfortunately, for some reason, it didn't work, and I now couldn't boot into Windows. And to further cause problems, I couldn't make it detect my SSD even when booting (which was fixed, I actually re-enabled Secure Boot so it just wouldn't show up my SSD with grub command line showing up first thing).
So I thought that I'll just rescue this in whatever state it is by installing Ubuntu and deleting all of the contents of the SSD to start afresh. But, the installer does not detect the SSD at all. I tried to use fdisk, but the only disk it shows is the flash drive itself.
This laptop I'm using is a Thinkpad T495, and although I don't know at all what can I do to save it, I think there's a problem with some BIOS setting as I probably messed up something there. I think maybe the Boot Mode (UEFI/Legacy) or something of that sort. Any help would be much appreciated.
I never had anything but Win10 on it before dual-booting. Hell, I bought it less than 2 months ago