BIOS configuration dualboot

Help with issues regarding installation of Debian

BIOS configuration dualboot

Postby teus » 2018-09-26 03:14

I would need some help to figure out what's going on here. I can't get to figure out how to dualboot with either the legacy or UEFI Bios.

I went through this process on my laptop (Dell Precision 3510), which has Windows 7 preinstalled: make free space at the end of the disk, boot Debian Live, let Debian partition the unused space as it desires, proceed with installation. I never changed any BIOS settings in regard to UEFI/Legacy BIOS settings.
Upon reboot, Windows loaded just like before. No sign of GRUB.
Playing around with the BIOS: UEFI is used by default, so I changed it to Legacy. This loads GRUB and boots Debian, but GRUB does not list my Windows installation. I ran update-grub, mounted my windows partition and tried os-prober too, but no dice. I can't add Windows to my list of boot devices.

I found this guide from Dell:https://www.dell.com/support/article/us/en/19/sln301754/how-to-install-ubuntu-and-windows-8-or-10-as-a-dual-boot-on-your-dell-pc?lang=en
By default, secure boot disabled and "Enable legacy option ROM" is enabled. When I changed my BIOS back to UEFI, my laptop refused to boot Windows when I disabled "Enable legacy option ROM". Isn't Win7 UEFI compatible?

I'm baffled and could use some help... thanks.
teus
 
Posts: 14
Joined: 2013-03-11 12:21

Re: BIOS configuration dualboot

Postby Head_on_a_Stick » 2018-09-26 05:17

Your motherboard may be booting Windows' bootmgfw.efi loader regardless of any attempts to force it to do otherwise, this is not uncommon.

Try this from a Windows Administrator prompt in Powershell:
Code: Select all
bcd edit \set "{bootmgr}" path "\path\to\debian\grubx64.efi"

I can't remember exactly where grubx64.efi is located but it should be on the EFI system partition (FAT-formatted with an ef00 partition code) in the debian subdirectory.

It is likely that Windows updates will reset this so set it as a batch command to be run at every boot.

EDIT: this method requires that Debian be installed in UEFI mode.
User avatar
Head_on_a_Stick
 
Posts: 8013
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: BIOS configuration dualboot

Postby dilberts_left_nut » 2018-09-26 05:59

Also, the live image didn’t used to be UEFI install capable - not sure if that has changed now.
Best to use an actual installer image.
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 4887
Joined: 2009-10-05 07:54
Location: enzed

Re: BIOS configuration dualboot

Postby p.H » 2018-09-26 14:04

teus wrote:Playing around with the BIOS: UEFI is used by default, so I changed it to Legacy. This loads GRUB and boots Debian, but GRUB does not list my Windows installation. I ran update-grub, mounted my windows partition and tried os-prober too, but no dice. I can't add Windows to my list of boot devices.

It means that Debian was installed for boot in BIOS/legacy mode (with grub-pc) whereas Windows was installed to boot in native EFI mode.
GRUB BIOS (grub-pc) cannot chainload an EFI bootloader (and the other way around), so it is normal that os-prober and update-grub do not detect Windows boot manager.

teus wrote:When I changed my BIOS back to UEFI, my laptop refused to boot Windows when I disabled "Enable legacy option ROM". Isn't Win7 UEFI compatible?

It is, but IIRC it requires that the UEFI firmware has some legacy features enabled (not the same as legacy boot). Note that the latest versions of the UEFI specification has these features disabled, so Windows 7 may not be able to work in native EFI mode with UEFI firmwares following these latest versions.

Head_on_a_Stick wrote:I can't remember exactly where grubx64.efi is located but it should be on the EFI system partition (FAT-formatted with an ef00 partition code) in the debian subdirectory.

It would if GRUB EFI was installed.
Note that "ef00" is not a real partition code. It is just a mnemonic used by gdisk. The real code is either "ef" in a DOS/MBR table or a 128-bit GUID in a GPT table.

Head_on_a_Stick wrote:EDIT: this method requires that Debian be installed in UEFI mode.

Indeed, but Debian was obviously not installed in EFI mode.

dilberts_left_nut wrote:Also, the live image didn’t used to be UEFI install capable - not sure if that has changed now.

It has changed. Stretch live images are EFI capable.
p.H
 
Posts: 602
Joined: 2017-09-17 07:12

Re: BIOS configuration dualboot

Postby Head_on_a_Stick » 2018-09-26 15:06

p.H wrote:Note that "ef00" is not a real partition code. It is just a mnemonic used by gdisk.

I knew you were going to say that :lol:

Yes I forgot to put "in gdisk", sorry OP.

p.H wrote:Debian was obviously not installed in EFI mode

So why not link the OP to a guide that would have got Debian installed in UEFI mode?

https://wiki.debian.org/GrubEFIReinstall

@OP: the EFI system partition will be mounted under \EFI in Windows.
User avatar
Head_on_a_Stick
 
Posts: 8013
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: BIOS configuration dualboot

Postby p.H » 2018-09-26 21:13

Head_on_a_Stick wrote:So why not link the OP to a guide that would have got Debian installed in UEFI mode?

Because this page sucks.
p.H
 
Posts: 602
Joined: 2017-09-17 07:12

Re: BIOS configuration dualboot

Postby teus » 2018-09-27 07:19

Thanks for all the help so far. It's all very on-point. I'm simply shocked by the complexity of this affair. I'll be working my way through all the info here.

The image I used is debian-live-.5.0-amd64-xfce.iso.
Documentation states the following:
UEFI support in live images
Since the first release of Stretch (9.0), UEFI is now supported on both installation and live images.
In previous releases UEFI support existed only in Debian's installation images. The accompanying live images did not have support for UEFI boot.
teus
 
Posts: 14
Joined: 2013-03-11 12:21

Re: BIOS configuration dualboot

Postby teus » 2018-09-27 07:51

Using the live boot, I chrooted, but couldn't mount the EFI partition. " special device does not exist" is the error.
Installed efibootmgr, it said it couldn't find efi variables on the system.
I'm reinstalling now with an installer image, rather than a livecd image.

edit: the installer also fails to recognize the windows partition.
teus
 
Posts: 14
Joined: 2013-03-11 12:21

Re: BIOS configuration dualboot

Postby p.H » 2018-09-27 08:26

You must make sure that the installer boots in EFI mode. The menu screen is different.
- legacy boot -> classical ISOLinux menu
- EFI boot -> GRUB menu with "EFI" printed somewhere
p.H
 
Posts: 602
Joined: 2017-09-17 07:12

Re: BIOS configuration dualboot

Postby teus » 2018-09-27 08:52

In rescue mode I can mount the boot partition. efibootmgr says EFI variables are not supported on this system. I mounted /boot/efi and ran the GRUB instructions, but theres no \EFI\ubuntu\grubx64.efi to be found.
p.H wrote:You must make sure that the installer boots in EFI mode. The menu screen is different.
- legacy boot -> classical ISOLinux menu
- EFI boot -> GRUB menu with "EFI" printed somewhere

hmm, I couldn't see it. I only get the legacy boot menu, I don't get a splash screen that lets me pick it. I went back to the BIOS setup and disabled "Enable legacy option ROM"
now my USB stick boots in UEFI mode and I get het UEFI installer. I'm ready to shoot myself now.
I'll report back once I run the UEFI installer.
teus
 
Posts: 14
Joined: 2013-03-11 12:21

Re: BIOS configuration dualboot

Postby p.H » 2018-09-27 09:23

teus wrote:In rescue mode I can mount the boot partition. efibootmgr says EFI variables are not supported on this system. I mounted /boot/efi and ran the GRUB instructions, but theres no \EFI\ubuntu\grubx64.efi to be found.

The rescue mode of the installer menu or the rescue mode in installed GRUB menu ?
EFI variables are only supported when the system is booted in EFI mode.
What GRUB instructions ?
\EFI\ubuntu\grubx64.efi would be present only after installing Ubuntu in EFI mode.
p.H
 
Posts: 602
Joined: 2017-09-17 07:12

Re: BIOS configuration dualboot

Postby Palmstroem » 2018-09-27 09:31

If your laptop came with Windows in EFI mode pre-installed and you need Windows, I would install Debian in EFI mode, too. But EFI BIOSes can sometimes be nasty and even bcdedit - as Head_on_a_Stick proposes - might not work. I had success with rEFInd; see here http://forums.debian.net/viewtopic.php?f=16&t=134399 what I did to achieve a dualboot.
Palmstroem
 
Posts: 16
Joined: 2017-08-12 12:36

Re: BIOS configuration dualboot

Postby teus » 2018-09-27 16:18

OK, my dualboot is working, once I launched the USB stick in UEFI mode. I have GRUB, and GRUB sees windows, but I had to enable the "Legacy option ROM" again. Otherwise Win7 won't boot!
Delightfully cumbersome. I should report this to Dell or something.
p.H wrote:
teus wrote:In rescue mode I can mount the boot partition. efibootmgr says EFI variables are not supported on this system. I mounted /boot/efi and ran the GRUB instructions, but theres no \EFI\ubuntu\grubx64.efi to be found.

The rescue mode of the installer menu or the rescue mode in installed GRUB menu ?
EFI variables are only supported when the system is booted in EFI mode.
What GRUB instructions ?
\EFI\ubuntu\grubx64.efi would be present only after installing Ubuntu in EFI mode.

rescue mode of the installer menu. and yes, that wouldnt work since I launched it in Legacy mode. GRUB instructions were from https://wiki.debian.org/GrubEFIReinstall
teus
 
Posts: 14
Joined: 2013-03-11 12:21


Return to Installation

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable