1

I have a Dell Inspiron 5000 with Windows 10 preinstalled. I attempted to install a Linux distro (OpenSuse 42.2) on it (dual booting), but now the BIOS will not recognise my hard drive. I should note this is my first time dealing with UEFI, so I'm a fair bit out of my depth here. I'll list everything I did.

The bootloader would not recognise the DVD drive with the Linux DVD as a bootable device, so I went to the BIOS settings and disabled secure boot, enabled legacy option roms and finally changed the boot list options from UEFI to legacy. I was then able to boot from the Linux DVD and install to a new partition. When installing I left all bootloader settings default. I noted that it used Grub2 and not Grub2-efi.

Upon rebooting the computer couldn't find any bootable device; it went through to some diagnostic checking. I rebooted to the bootloader menu, and under the Legacy heading I was able to select my hard drive which launched Grub. However Grub only showed options for OpenSuse, nothing for dual booting Windows. So I went back to the BIOS settings and changed the settings to how they were before: UEFI, no legacy and secure boot enabled. When I then rebooted to the bootloader menu the legacy heading had vanished along with all options to boot from the hard drive.

I went to the BIOS settings again, and in Boot Sequence the boot sequence was completely empty. So I clicked "Add Boot Option" to add the hard drive as an option. However an error dialogue popped up saying, "Warning: File System Not Found!" This error persisted whether I enabled legacy, UEFI or secure boot.

I now have a computer with Windows and Linux installed on separate partitions, but I can only boot to Linux and only if I manually go to the bootloader menu when the BIOS is in legacy mode.

Is there any way to restore my BIOS to boot to Windows?

I have a backup of documents and so on, but not of the entire hard drive prior to my fiddling with the BIOS.

3
  • By changing your boot mode to legacy and disabling the secure boot you effectively disabled UEFI as far as booting operating systems go. Any operating system that is installed after will likely assume that it is a BIOS based system and act accordingly. You need to restore the options back to UEFI boot for Windows to work, it should have been enough to just disable secure boot. It is unclear as to whether you deleted or overwrote any partitions while installing Linux so you may have taken out the boot partition.
    – Mokubai
    Commented Jul 26, 2017 at 7:21
  • 1
    As a minimum you need to change back from legacy boot, and probably boot from a Windows install USB and see if it can do a boot repair. If that works then reinstall Linux while keeping it in the newer "non-legacy" mode. If you cannot boot from USB in this new mode then you need to either get a distro that can, or a better program to create a boot disk for the distro.
    – Mokubai
    Commented Jul 26, 2017 at 7:25
  • Either that or you leave it in legacy mode, completely reinstall Windows so that it is set up right for that boot mode, and then install Linux. That way they are both correct and using the old mode.
    – Mokubai
    Commented Jul 26, 2017 at 7:28

2 Answers 2

5

First off, Legacy Boot (i.e. BIOS mode) is mutually exclusive with "new" UEFI boot mode. A version of Windows installed while the system is in one mode is, to say the least, aggravating to make work in the other mode.

For the moment if Windows is what you care about then we can ignore Linux. As a first step you need to disable the legacy boot option. Your copy of Windows was installed in UEFI mode and so its bootloader is set up differently from a "legacy" BIOS bootloader.

If Windows boots then awesome, if not then you need to break out a bootable Windows USB stick. Microsoft's Media Creator will do this for you. There is an option to do a boot repair in there, it should hopefully fix any problems you might have.

Once Windows is back up and running then we can look at Linux again. Do not switch back to legacy boot. If Linux won't boot in the new UEFI mode then you need to find a distro that will, or find a better way of writing the downloaded ISO file to a USB stick. I've had good luck with both UNetbootin as well as Pendrivelinux in the past. Create a new bootable stick and see if it boots, if it doesn't then try a different distro. When I tried a few years ago Ubuntu refused to boot from USB on my laptop while Xubuntu was fine, same versions supposedly. YMMV. Newer versions of Linux should hopefully be fine.


If, on the other hand, you don't care about your current copy of Windows and booting Linux in non legacy mode refuses to work then you will have to bite the bullet, switch to Legacy mode, format the hard drive as MBR, reinstall Windows, reinstall Linux and carry on that way.

One of the reasons Windows will not boot in Legacy Mode is because Windows is limited to GPT partitioned disks for UEFI mode, and the BIOS (Legacy) mode cannot boot from GPT partitions. Linux can kludge around it, but it's not great for dual booting.


So you either need to stick with UEFI mode (not legacy) and find a way to get Linux to work, or reinstall everything in legacy mode.

1
  • Great advice, thank you. As per your comment above it seems that Grub, in legacy mode, was overwriting the boot partition. To fix the partition I changed to UEFI boot mode and reinstalled OpenSuse, making sure I used GRUB-EFI. This seems to have fixed part of the problem; when I boot up I now go straight to Grub. The downside is that Grub still doesn't recognise Windows. I'll run the recovery disc of Windows as you suggested to fix the Windows partitions (and after reinstall Grub if needed).
    – jla
    Commented Jul 26, 2017 at 8:49
0

Mokubai's analysis is correct, and I agree that disabling the BIOS/CSM/legacy boot support is a necessary part of recovering. (Well, there are alternatives, but they're likely to be awkward and inferior.) I simply want to offer an alternative means of recovery:

  1. Download the USB flash drive or CD-R version of my rEFInd boot manager.
  2. Create a boot medium from the files you download.
  3. Boot with the external rEFInd medium. (You may need to either disable Secure Boot or jump through extra hoops to get Secure Boot working with rEFInd.)
  4. From rEFInd's menu, test that the Windows option works, then reboot back into rEFInd.
  5. rEFInd should present at least one option to boot your OpenSUSE. These options might or might not work directly, depending on how you installed OpenSUSE. In particular, you might need to hit F2 or Insert twice in rEFInd and add a root={your-root-device} option to the kernel parameters, particularly if you used a separate /boot partition. This isn't certain, though, so you should first try without this option.
  6. If you can get OpenSUSE booted through rEFInd, you can install a fresh EFI-mode boot loader from that boot. Two options are likely to be relatively easy.
    • If the GRUB EFI package is installed, then typing grub-install as root will probably do the job; however, you might also need to update the GRUB configuration file with grub-mkconfig. I don't recall the exact options you'd use under OpenSUSE to write the file to the correct location.
    • You can install the rEFInd RPM (available from the page referenced earlier). Once installed to the hard disk, it should work just like the version you booted from an external medium.

As a side note, some tools for creating bootable Linux installers omit the BIOS-mode or EFI-mode boot loader. This can make them unbootable in one mode or the other. Many people, when confronted with such problems, make the mistake you did of enabling BIOS/CSM/legacy support in the firmware -- but that just creates a bigger problem down the line, as you discovered. Using a tool that creates a bootable medium for your computer and in the desired boot mode is the appropriate response. See this page of mine for my experiences on this topic; however, be aware that there are differences from one distribution to another and from one computer to another, so what works for me with Ubuntu on my computer or for some random person with Fedora on her computer might not work for you with OpenSUSE on your computer. Thus, you might need to try two or three tools or methods before you find one that works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .