0

I have a PC with installed Win10 and Ubuntu in EFI mode. I have to replace motherboard for one that's not support UEFI. Now I can't load any OS - just getting a black screen with blinking cursor. Boot-repair loaded from us says that I have to load in EFI mode, but new motherboard have no support for it. Can I convert my drive without reinstalling the OSes?

LLIax
  • 327
  • 1
    If you want Windows 10 better to buy a newer motherboard. Every motherboard in last 5 years has UEFI since Windows 8 came out requiring UEFI. You only need a tiny 1 or 2MB unformatted partition anywhere on drive for grub-pc to install. Probably easiest to use Boot-Repair. But Windows only boots from a gpt partitioned drive with UEFI. And your Windows Product Key was in the UEFI. You have to purchase a new copy of Windows. If you install any other pirated copy of Windows you give all your data to hackers. – oldfred Jun 30 '17 at 16:24

2 Answers2

1

To elaborate on oldfred's comment:

  • Computer manufacturers rapidly switched from BIOS-based to UEFI-based firmware beginning in mid-to-late 2011. Just about any computer that shipped with Windows 8 used UEFI, because Microsoft required a UEFI-only feature, Secure Boot, for manufacturers to claim their hardware was certified for Windows. Although there were some holdouts (mostly servers and a few bare motherboards), almost any new x86 or x86-64 computer or motherboard you buy today will have EFI firmware. It's conceivable that your board is configured to boot in BIOS/CSM/legacy mode, but is EFI-based, so changing a firmware setting may be what you need to do.
  • EFIs use boot loaders stored on the EFI System Partition (ESP) and pointers to those boot loaders stored in NVRAM. Thus, transferring a hard disk from one EFI-based computer to another may result in the disk not booting in its new computer. There are several ways to work around this problem, such as:
    • You can copy a boot manager (probably GRUB, EFI/ubuntu/grubx64.efi) to the fallback filename of EFI/BOOT/bootx64.efi on the ESP.
    • You can re-create the NVRAM entry. This is a better solution than the preceding one, but doing it requires that you know how to use efibootmgr (in Linux), bcdedit or EasyUEFI (in Windows), bcfg (in an EFI shell), or other similar tools. See this question for one example of using efibootmgr. (The question got one detail wrong that caused the questioner problems, as noted in my answer, but is otherwise a good template.) You can use efibootmgr from an Ubuntu installation disk in its "try before installing" mode.
    • You can use Boot Repair. This tool is overkill for this situation, but it's likely to be easier than using efibootmgr or a similar tool. Note that if you boot your recovery system in BIOS mode, it will try to install a BIOS mode of GRUB, which will be partially helpful at best, so you should be sure you know how to boot in EFI mode before trying this approach.
    • A final option is to use my rEFInd boot manager. Put on a USB flash drive or CD-R, this tool should boot any EFI boot loader it finds. You can use it indefinitely this way, but it's better to use rEFInd on a removable disk as a temporary emergency tool; boot into the OS of your choice and use the tool of your preference to repair or re-install your boot loader.
  • If your new motherboard is an old BIOS-based one, then it's old enough that you might want to consider ditching it for a new one. If that's out of the question, though, then there are several options:
    • You can wipe the disk and re-install everything. This is the easiest approach to explain, and probably to do, but it will also be painful, especially if you have no backups and no means to make them. Note, however, that the other options are likely to be risky, so you'd be well advised to obtain the means to make a backup before proceeding with any of them -- and once you've got the backup, wiping the disk and re-installing becomes less painful.
    • You can convert the disk from GPT to MBR form and install new Windows and Ubuntu (GRUB) boot loaders. My gdisk tool (which comes standard with Ubuntu) can do the GPT-to-MBR conversion, as described here. You can use Boot Repair to install a BIOS-mode GRUB. Getting Windows to boot will be trickier, though. I recommend you ask about this aspect on a Windows forum.
    • I recently ran across this procedure that claims to enable booting Windows in BIOS mode from a GPT disk. I have not tried this procedure! I present a pointer to it only in case you're willing to study it and try it on your own. If you get it to work, you could then use Boot Repair to get Ubuntu working, too -- but you'll likely need to create a small (~1MiB) BIOS Boot Partition.
    • If you're really adventurous, you could try using DUET or Clover on your BIOS-based computer. These are essentially EFIs implemented as BIOS boot loaders; they enable BIOS-based computers to use EFI boot loaders and OSes. Note that Clover is better supported, and is likely to be the better one to use; but it's essentially a Hackintosh boot loader, so some of its tools, file formats, etc., are intended for use with macOS, which may make it difficult to get started with it. IIRC, there's an .iso image you might use to get started. Note also that these tools don't work on all computers. In my experience, they're more likely to work on Intel-based computers than on AMD-based machines.
    • With any of these approaches, you may have problems with the Windows license, as oldfred noted -- but maybe there's a legitimate way around that. (Like oldfred, I strongly recommend against using a pirated Windows!) Ask about it on a Windows forum.

Thus, you do have options; but if your computer truly is BIOS-based, those options are either expensive (new motherboard) or risky and time-consuming. I've tried to be complete in my listing of options; I'm not really enthusiastic about any of those BIOS-only options, except perhaps wiping the disk clean and re-installing everything. If your new motherboard is actually EFI-based, you're better off, but you'll still need to use some recovery tools to get it working.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
0

since you were using uefi, I assume the disk is partitioned with gpt.

1) legacy boot can not read gpt disks.

2) windows may need a fresh install. I don't know if it cam be converted.

3) ubuntu an be converted to legacy boot by reinstalling grub in MBR mode.

if you have a spare drive, you can copy the partitions over. reformat the internal drive to MBR then copy partitions back and install grub.

there is a process for making a gpt disk boot in bios mode, it invlovles writing an mBR to the disk and a making a small grub-bios partition.

this post gives references for enabling BIOS grub to boot and use the gpt disk.

https://askubuntu.com/a/366319/694267

ravery
  • 6,874
  • Note that your issue #1 only applies to Windows; the limitation is one of the Windows boot loader, not of the BIOS itself, as should be clear from your #3 -- I just want to make this explicit. An old-style BIOS actually understands neither MBR partitions nor the newer GPT; it's the boot loader that reads the partition table, not the BIOS. The Windows boot loader is pretty limiting in this way. GRUB, and some other Linux boot loaders, are more flexible. – Rod Smith Jul 01 '17 at 03:37
  • @Rob, the bios has to mount and read the MBR to get the bootloader. thsiis why a grub bios is required to boot a gpt disk. once grub is loaded yes it can read the gpt table, but you have to get it loaded first – ravery Jul 01 '17 at 03:42
  • There's no such thing as "mounting" an MBR. The MBR is simply the first sector of the disk, and it contains no filesystem to be mounted. (It could be the first sector of a filesystem on an unpartitioned disk, but that's a corner case that's irrelevant in this context.) I don't follow the rest of your response, since there's no such thing as "a grub bios." Do you mean a BIOS-mode GRUB? If so, there are other ways to boot from a GPT disk in BIOS mode. (LILO will do it, for instance.) A BIOS-mode GRUB would be an example of a boot loader that reads the GPT, as in my comment. – Rod Smith Jul 01 '17 at 03:50