Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Oct 2017 11:53:46 -0500
From:      Karl Denninger <karl@denninger.net>
To:        freebsd-stable@freebsd.org
Subject:   Re: Installing amd64 FreeBSD 11.1 in dual-boot with Windows 7 on an MBR partitioned disk
Message-ID:  <3475118a-208b-5f25-7da3-b8a7e83afe2f@denninger.net>
In-Reply-To: <CANt7McFK349gVvZhgED62J9dxZSDW5kw2_mrYs73QcqYBzGU_A@mail.gmail.com>
References:  <CANt7McGqZG0mJFmuQgE4_rFu_0kmnyUCUCZyrrThKMjJtnyewA@mail.gmail.com> <59D7BE53.5050409@grosbein.net> <CANt7McEUP1MC32zJt0%2BbOi-1A6FFXr-C2D6ibKB5gZKr5xWEyQ@mail.gmail.com> <CANCZdfpRJg4twPJ34V=6s-MEXnKM-9eHzW3pyb93TyN%2Bg4vfBg@mail.gmail.com> <CANt7McFK349gVvZhgED62J9dxZSDW5kw2_mrYs73QcqYBzGU_A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]

On 10/7/2017 11:27, Rostislav Krasny wrote:
> On Sat, Oct 7, 2017 at 6:26 PM, Warner Losh <imp@bsdimp.com> wrote:
>> Sorry for top posting. Sounds like your BIOS will read the botox64.efi from
>> the removable USB drive, but won't from the hard drive. Force BIOS booting
>> instead of UEFI and it will install correctly. However, it may not boot
>> Windows, which I think requires UEFI these days.
>>
>> The root of the problem is that we have no way to setup the EFI boot
>> variables in the installer that we need to properly installed under UEFI.
>> I'm working on that, so you'll need to be patient...
>>
>> Warner
> My computer doesn't have any EFI partition and this explains why the
> installed FreeBSD boots in the BIOS mode on it. The installation media
> probably has the EFI partition (with the bootx64.efi) and then BIOS
> probably boots the installation media in the UEFI mode instead of the
> BIOS mode. So the "machdep.bootmethod" sysctl doesn't represent the
> BIOS boot mode configuration but a boot method the currently running
> system was booted in. If this is true then the "machdep.bootmethod"
> sysctl should not be used in bsdinstall. At least not for the
> bootability check. Something else should be used for the bootability
> check or the bsdinstall should trust the user choice.
>
> BTW this is how the EFI partition looks like in someone's Windows 7
> disk manager:
> https://www.easyuefi.com/wintousb/images/en_US/efi-system-partition.png
> and this how it looks without any EFI partition in my system (with
> Windows 7 / FreeBSD dual-boot)
> http://i68.tinypic.com/9u19b8.png
>
> I think even that NTFS System Reserved partition is not mandatory for
> Windows installation. It just used to keep Windows boot files in a
> safe, place preventing accidental deletion by a user. It's being
> created if Windows is installed on an empty disk but if you create
> just one big NTFS partition prior to the Windows installation and
> install it on that single partition it will be ok. There will be just
> more Windows system files on the C disk, for example ntldr,
> NTDETECT.COM. It can be checked on VM, for example on VirtualBox.
> _______________________________________________
The problem with the new installer appears to be that it follows this
heuristic when you boot FreeBSD media from a USB stick or similar media:

1. If the system CAN boot EFI then it WILL EFI boot the FreeBSD
installer from that media.

2. The installer sees that it booted from EFI.  It also sees a fixed
disk with a non-EFI boot environment.  It declares that fixed disk
environment "non-bootable", which is not by any means a known fact.

3. Having done that it will then "offer" to re-initialize the disk as
EFI/GPT, which is ok if you don't have anything else on there that you
want.  If you DO then it's obviously not ok, and in that instance it
both won't load the MBR boot manager *and* won't load the second-stage
MBR boot code either.

You can get around this by hand-installing both parts of the boot code,
which is what I wound up doing on my Lenovo laptop.  That machine was
originally delivered with Windows 7 and upgraded "in place" to Win10,
which is why the disk is MBR-partitioned rather than EFI/GPT, although
the machine itself does support EFI booting.

I would suggest that the FreeBSD installer should be more-intelligent
about this, but I suspect it's a fairly uncommon set of circumstances. 
Far more troublesome in the EFI world is the fact that "out-of-the-box"
multi-boot in an EFI environment is a five-alarm pain in the butt
although there are EFI boot managers that make it reasonable.

-- 
Karl Denninger
karl@denninger.net <mailto:karl@denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/

[-- Attachment #2 --]
0	*H
010
	`He0	*H

00H^Ōc!5
H0
	*H
010	UUS10UFlorida10U	Niceville10U
Cuda Systems LLC10UCuda Systems CA1!0UCuda Systems LLC 2017 CA0
170817164217Z
270815164217Z0{10	UUS10UFlorida10U
Cuda Systems LLC10UCuda Systems CA1%0#UCuda Systems LLC 2017 Int CA0"0
	*H
0
h-5B>[;olӴ0~͎O9}9Ye*$g!ukvʶLzN`jL>MD'7U45CB+kY`bd~b*c3Ny-78ju]9HeuέsӬDؽmgwER?&UURj'}9nWD i`XcbGz\gG=u%\Oi13ߝ4
K44pYQr]Ie/r0+eEޝݖ0C15Mݚ@JSZ(zȏNTa(25DD5.l<g[[ZarQQ%Buȴ~~`IohRbʳڟu2MS8EdFUClCMaѳ!}ș+2k/bųE,n当ꖛ\(8WV8	d]b	yXw	܊:I39
00U]^§Q\ӎ0U#0T039N0b010	UUS10UFlorida10U	Niceville10U
Cuda Systems LLC10UCuda Systems CA1!0UCuda Systems LLC 2017 CA	@Ui0U00U0
	*H
:P U!>vJnio-#ן]WyujǑR̀Q
nƇ!GѦFg\yLxgw=OPycehf[}ܷ['4ڝ\[p6\o.B&JF"ZC{;*o*mcCcLY߾`
t*S!񫶭(`]DHP5A~/NPp6=mhk밣'doA$86hm5ӚS@jެEgl
)0JG`%k35PaC?σ
׳HEt}!P㏏%*BxbQwaKG$6h¦Mve;[o-Iی&
I,Tcߎ#t wPA@l0P+KXBպT	zGv;NcI3&JĬUPNa?/%W6G۟N000k#Xd\=0
	*H
0{10	UUS10UFlorida10U
Cuda Systems LLC10UCuda Systems CA1%0#UCuda Systems LLC 2017 Int CA0
170817212120Z
220816212120Z0W10	UUS10UFlorida10U
Cuda Systems LLC10Ukarl@denninger.net0"0
	*H
0
T[I-ΆϏdn;Å@שy.us~_ZG%<MYd\gvfnsa1'6Egyjs"C [{~_KPn+<*pv#Q+H/7[-vqDV^U>f%GX)H.|l`M(Cr>е͇6#odc"YljҦln8@5SA0&ۖ"OGj?UDWZ5	dDB7k-)9Izs-JAv
J6L$Ն1SmY.Lqw*SH;EF'DĦH]MOgQQ|Mٙג2Z9y@y]}6ٽeY9Y2xˆ$T=eCǺǵbn֛{j|@LLt1[Dk5:$=	`	M00<+00.0,+0 http://ocsp.cudasystems.net:88880	U00	`HB0U0U%0++03	`HB
&$OpenSSL Generated Client Certificate0U%՞V=؁;bzQ0U#0]^§Q\ӎϡ010	UUS10UFlorida10U	Niceville10U
Cuda Systems LLC10UCuda Systems CA1!0UCuda Systems LLC 2017 CAH^Ōc!5
H0U0karl@denninger.net0
	*H
۠A0-j%--$%g2#ޡ1^>{K+uGEv1ş7Af&b&O;.;A5*U)ND2bF|\=]<sˋL!wrw٧>YMÄ3\mWR hSv!_zvl? 3_ xU%\^#O*Gk̍YI_&Fꊛ@&1n”} ͬ:{hTP3B.;bU8:Z=^Gw8!k-@xE@i,+'Iᐚ:fhztX7/(hY` O.1}a`%RW^akǂpCAufgDixUTЩ/7}%=jnVZvcF<M=
2^GKH5魉
_O4ެByʈySkw=5@h.0z>
W1000{10	UUS10UFlorida10U
Cuda Systems LLC10UCuda Systems CA1%0#UCuda Systems LLC 2017 Int CAk#Xd\=0
	`HeE0	*H
	1	*H
0	*H
	1
171007165346Z0O	*H
	1B@Auj%g:#;=	bf*uFG\@ڢES2#av-0l	*H
	1_0]0	`He*0	`He0
*H
0*H
0
*H
@0+0
*H
(0	+7100{10	UUS10UFlorida10U
Cuda Systems LLC10UCuda Systems CA1%0#UCuda Systems LLC 2017 Int CAk#Xd\=0*H
	10{10	UUS10UFlorida10U
Cuda Systems LLC10UCuda Systems CA1%0#UCuda Systems LLC 2017 Int CAk#Xd\=0
	*H
~LAx`uZzxxjя@vX:ÕɸT *hST%ϵ͌}^ݚq$е!
[:I	;GeQ" i LЖ|44XH9fk7=srw|s؎).!xzYGH{w$;/"8AD-8>7@$Aeh8lŰ4u=ϵf%tOѴ|K`@Z_4bw:\3gy<`}
fBª,x=Z4R=/']ܶ\W^HN}AIT@VR^4efg/4Hw30,t@y6â.58iEETj\'nU/)jP 0FM'jS,({Db0BѝU{cag4)gH]^+}\YHyƨӂr.P%OS
QW

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3475118a-208b-5f25-7da3-b8a7e83afe2f>