Hello, I'm facing some problems when I try to install Ubuntu with Windows (Dual Boot) and when I try to install just Ubuntu. Ubuntu-Windows problem: At first, I always install Windows 10 and afterwards, I run the Ubuntu Live USB in order to get Ubuntu with GRUB installed for choosing which OS I want to run at a later time. Once it is installed, Ubuntu asks me to restart the PC and unplug the USB. When the restart scenario comes, it always starts with Windows 10 and everytime I try to install GRUB with a Rescue USB, it doesn't work. Problems when I want to install just Ubuntu When I faced the dual-boot issue, I thought about installing Ubuntu first and afterwards create a partition for Windows and create GRUB at a later time. When Ubuntu asks me to restart after the installation process, I can see a sentence that dissapears in a second that says something about "Boot0001 with label 'ubuntu' for file "\EFI\ubuntu\shimx64.efi" and it enters into a reboot loop which can only be fixed if I reinstall Windows. My Mini PC is set up for run at Legacy mode with Secure Boot disabled and I can't figure out what it's the problem with Ubuntu. Is there something that I can do in order to fix this? Thank you very much in advance.
are you sure you have gpt and not mbr setup? What is the output of "sudo fdisk -l /dev/sda" . if you have nvme ssd drive, use nvme0n1 instead of sda
You should definitely install Windows first and then run Ubuntu Live USB, but before that, instead of Legacy mode chose UEFI mode, with Secure Boot enabled (the later only if you have an ATI video card, otherwise disable it). Also, take a look at this pinned post by @John Sutherland, you will find it very useful.