From: krw Date: Sun, 4 Jul 2021 20:37:11 +0000 (+0000) Subject: Fix legacy booting. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1133a335c4d428491d38a7fd6d58627adc527a1b;p=openbsd 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@ --- 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;