Wednesday, January 11, 2017

linux - Empy boot sequency in BIOS


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.


Answer



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.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...