Score:2

Find out if windows 10 are UEFI Or Legacy through linux terminal

pk flag

I tried to install ubuntu 20.04 by creating efi, swap and filesystem partitions. In the end of the installation, an error occured saying that grub could not be installed, fatal error. Now, I cannot boot neither linux or windows. I can only boot ubuntu from the usb stick. I am wondering if the problem comes from windows being on legacy mode. Is there any solution to check if windows are on legacy mode through terminal?

Jeff avatar
mx flag
Disable Legacy Mode. That is the issue.
oldfred avatar
cn flag
Windows only boots in UEFI boot mode from gpt partitioned drives and only in BIOS/CSM/Legacy mode from MBR(msdos) drives. `sudo parted -l` and partition table like "Partition Table: gpt" or `sudo fdisk -lu` & disklabel type like "Disklabel type: gpt" or the partitions on drive: BIOS & UEFI Windows partitions, note system has totally different format & meaning between BIOS & UEFI https://msdn.microsoft.com/en-us/library/windows/hardware/dn898510%28v=vs.85%29.aspx#RecommendedPartitionConfigurations & https://msdn.microsoft.com/en-us/library/windows/hardware/dn898504%28v=vs.85%29.aspx &
Score:1
gn flag

I think it's easier to just look for this in the BIOS.

Go into your BIOS by pressing the key specified in the manual of your PC (or just search on the internet) and look for "compatibility mode" or something like that, typically under "boot". If the option exists, your PC is definitely UEFI.

Another option to check this is by looking it up on the manufacturers website, like DELL. For example, my laptop is listed under specifications.

Edit:

Did you overwrite your Windows partition? Because in that case you aren't able to check how Windows used to be booted.

Another way to do this, is to make a bootable Windows-Stick using WoeUSB in the Ubuntu live session, and then using StartUp repair for Windows 10/11.

Karantai avatar
pk flag
I have ASUS UEFI BIOS utility opened. Under Boot\Secure boot, Secure boot is enabled and OS type is windows UEFI mode. Also, under compatibility support module, Launch CSM is enabled and boot device control is set to UEFI and legacy OPROM. So I believe windows are UEFI ? I am wondering, because the partitions I have are MBR and not GPT. I am not sure if that somehow is related.
Letsric avatar
gn flag
Yes, in this case Windows is UEFI.
Letsric avatar
gn flag
You can now use startup repair like I've showen in the Edit but that wown't work when you wiped Windows, or try again installing Ubuntu and posting the error message as another threat.
Karantai avatar
pk flag
The issue is that I have two drives, one ssd and one hdd. Windows are installed on ssd. I shrunk some space from hdd and tried to install ubuntu there. Also, I tried to install grub on hdd. And boom, grub could never be installed and now I cannot boot anything.
mook765 avatar
cn flag
Windows boot mode is bound to the partition table type of the drive where Windows is installed, if GPT, then it's UEFI, if it's msdos, then it's bios (legacy). You can check partition table type with `sudo fdisk -l`.
Karantai avatar
pk flag
Both ssd and hdd are said to be MBR only. So, windows are on legacy?
Letsric avatar
gn flag
Oh that is wierd. But that could be the case if you wiped Windows with Ubuntu and Ubuntu for some reason installed using Legacy.
Letsric avatar
gn flag
Have you wiped Windows, or how exactly have you modified the partitions?
Letsric avatar
gn flag
But your PC is definitly UEFI, because you have compatibility stuff and such.
Karantai avatar
pk flag
I think I have not wiped windows, although I cannot boot to them. I just shrunk space from hdd creating 3 partitions. One for efi one for swap and one for the linux file system.
Letsric avatar
gn flag
Then I would suggest using Startup repair like I described in the Post or trying to install Ubuntu again.
Letsric avatar
gn flag
You can do that by booting from the Live USB, deleting the not working Ubuntu partitions, and then telling the installer to install Ubuntu alongside Windows like it's detailed here: https://towardsdatascience.com/how-to-dual-boot-windows-10-and-linux-ubuntu-20-04-lts-in-a-few-hassle-free-steps-f0e465c3aafd?gi=e2f4b52f0a55
Letsric avatar
gn flag
But I think in order to use Windows ever again you have to do StartUp repair anyways at some point.
Jeff avatar
mx flag
If your computer uses a UEFI BIOS, then Windows is definitely UEFI.
ChanganAuto avatar
us flag
@Jeff True if Windows is factory installed. If not then you shouldn't assume it's UEFI. Many users to this day still install Windows in Legacy mode (dumb, but it's the reality). The OP mentioned both drives as MBR. That being the case it automatically tell us Windows is in Legacy mode.
Jeff avatar
mx flag
@ChanganAuto Yep. I should have thought about that...
Score:0
pk flag

The ultimate problem was that Windows was on Legacy and linux installation tried to be implemented in uefi, that is something that cannon be happening. Both operating systems must be installed either or legacy or uefi. From the moment that my first operating system, that is Windows, was installed on legacy, linux must be installed in legacy as well. Yet, when I tried to dual boot Linux, a message appeared that if I did not create an efi partition along with / (root) partition and swap partition, my computer my not be able to boot. So, this error told me that I should install Linux on uefi mode. In order not to install Linux in uefi mode but in legacy, instead of the efi partition, create a /boot ext4 partition and ubuntu will be installed in legacy mode as well. Problem solved.

David avatar
cn flag
This is in no way an answer to the question. You are saying ignore error and hope for the best.
Karantai avatar
pk flag
Just restated my solution.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.