Rebooting ubuntu causes the laptop to not be able to boot unless I have a bootable USB or something other than my SSD plugged in. Shutting down and booting again from either windows or ubuntu works fine, and so does restarting from windows. I tried updating the BIOS, reinstalling a number of different ubuntu versions (including 16.04.3 and 17.10), but both present the same issue. It is probably also worth mentioning that the issue still persists if I do not actually install ubuntu, but reboot from the "Try ubuntu" option of my bootable USB. My specs:

Dell XPS 15 9950:

SSD: Samsung NVMe PM951 512GB

Processor: Intel i7-6700HQ (2.6 Ghz)

GPU: Intel Graphics 530/NVIDIA GeForce 960M

I did switch the SATA Operation from RAID On to AHCI, while windows was in safe mode, as per all the tutorials that I found. Partitioning was done with the default partition manager (though I tried with intact partitions while rebooting from the live stick). Secure boot is off from the BIOS and I also deacctivated it from a previous linux I had installed. I also reset Windows 10 a number of times during the process. Lastly, I am aware of an almost identical question posted, but it has neither upvotes, nor replies, and I'm at my wit's end. I probably wouldn't mind giving up on Ubuntu and installing Debian instead, but I have no idea how (am new to linux and no tutorials are available).

P.S.: At a certain point I had a properly working ubuntu 16.04 (possibly 16.04.1 since the stick I used is a good few months old), but upgrading to 17.10 went wrong and I decided to reinstall.

Edit: I also thought I should mention the fact that on reboot the PC goes directly to Dell support assist and says "Hard drive not installed" (or hard disk, can't remember) and that apart from this issue ubuntu seems to work fine.