From 1133a335c4d428491d38a7fd6d58627adc527a1b Mon Sep 17 00:00:00 2001 From: krw Date: Sun, 4 Jul 2021 20:37:11 +0000 Subject: [PATCH] Fix legacy booting. Don't flag the EFI SYS partition "DOSACTIVE". Leave that status to the OpenBSD partition. Reverts part of r1.77. Problem reported and fix tested by Mihai Popescu. Thanks! Cluebats from deraadt@ and code bisecting by dv@. ok kettenis@ --- sbin/fdisk/mbr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sbin/fdisk/mbr.c b/sbin/fdisk/mbr.c index 9a0ec6cd55d..6bedb18d1cc 100644 --- a/sbin/fdisk/mbr.c +++ b/sbin/fdisk/mbr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mbr.c,v 1.77 2021/06/20 18:44:19 krw Exp $ */ +/* $OpenBSD: mbr.c,v 1.78 2021/07/04 20:37:11 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -135,12 +135,10 @@ MBR_init(struct mbr *mbr) PRT_fix_BN(&mbr->part[3], 3); #else if (b_sectors > 0) { - mbr->part[0].flag = DOSACTIVE; mbr->part[0].id = b_type; mbr->part[0].bs = b_offset; mbr->part[0].ns = b_sectors; PRT_fix_CHS(&mbr->part[0]); - mbr->part[3].flag = 0; mbr->part[3].ns += mbr->part[3].bs; mbr->part[3].bs = mbr->part[0].bs + mbr->part[0].ns; mbr->part[3].ns -= mbr->part[3].bs; -- 2.20.1