NetBSD Problem Report #53291
From martin@aprisoft.de Wed May 16 08:25:20 2018
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 479C87A103
for <gnats-bugs@gnats.NetBSD.org>; Wed, 16 May 2018 08:25:20 +0000 (UTC)
Message-Id: <20180516082510.4A6575CC8C7@emmas.aprisoft.de>
Date: Wed, 16 May 2018 10:25:10 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: GPT prevents installation
X-Send-Pr-Version: 3.95
>Number: 53291
>Category: install
>Synopsis: GPT prevents installation
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: martin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed May 16 08:30:00 +0000 2018
>Closed-Date: Sun Aug 01 12:56:47 +0000 2021
>Last-Modified: Sun Aug 01 12:56:47 +0000 2021
>Originator: Martin Husemann
>Release: NetBSD 8.0_RC1
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD emmas.aprisoft.de 8.0_BETA NetBSD 8.0_BETA (EMMAS) #1: Fri Mar 2 13:16:40 CET 2018 martin@emmas.aprisoft.de:/var/nbsd/src-8/sys/arch/i386/compile/EMMAS i386
Architecture: i386
Machine: i386
>Description:
Sysinst is unable to install onto a disk that already has a GPT, even if
using MBR in full-disk-for-NetBSD mode and creating new partitions.
>How-To-Repeat:
On a scratch machine (or VM), boot into the RC1 installer (e.g. from CD image).
Use utility menu to run /bin/sh.
do:
gpt destroy wd0
gpt create wd0
reboot
Boot into the installer again, do a standard installatin with full disk
for NetBSD, create new partition, accept all defaults.
After finishing the installer, remove installer medium and try to boot
from wd0 - it will fail (no PBR has been written, GPT protective MBR still
in place).
>Fix:
Should happen in sysinst. Manual workaround:
Go to utility, run /bin/sh, then do:
> dd if=/dev/zero of=/dev/rwd0d count=100
Exit back to sysinst, go to main menu and do the installation.
>Release-Note:
>Audit-Trail:
From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: install/53291: GPT prevents installation
Date: Wed, 16 May 2018 17:56:38 +0700
Date: Wed, 16 May 2018 08:30:00 +0000 (UTC)
From: martin@NetBSD.org
Message-ID: <20180516083000.667B97A232@mollari.NetBSD.org>
| After finishing the installer, remove installer medium and try to boot
| from wd0 - it will fail (no PBR has been written, GPT protective MBR still
| in place).
It really needs more than that - it should be able to make (if needed) an
EFI partition, and install the UEFI version of /boot there.
Of course, on most systems UEFI booting doesn't work (not the boot program's
problem, or the setup, all that works fine (done manually) - but the kernel fails
as much of the hardware doesn't get configured). So, I don't think this is really
an issue for NetBSD 8 - but whoever works on this PR should really also
consider UEFI as well as legacy booting, and make sysinst able to do it both
ways (and not necessarily one or the other - installing both methods is
possible, then the firmware can pick which it wants to use.)
kre
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: install/53291: GPT prevents installation
Date: Wed, 16 May 2018 13:06:46 +0200
On Wed, May 16, 2018 at 11:00:01AM +0000, Robert Elz wrote:
> It really needs more than that - it should be able to make (if needed) an
> EFI partition, and install the UEFI version of /boot there.
Yes, of course, but there are other things to fix first.
This is about trying to install a MBR labeld disk and failing silently,
ending up with a strange "No bootable system found" message.
Martin
From: John Nemeth <jnemeth@cue.bc.ca>
To: gnats-bugs@NetBSD.org, install-manager@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Cc:
Subject: Re: install/53291: GPT prevents installation
Date: Wed, 16 May 2018 18:57:03 -0700
On May 16, 8:30am, martin@NetBSD.org wrote:
}
} >Number: 53291
} >Synopsis: GPT prevents installation
} >Arrival-Date: Wed May 16 08:30:00 +0000 2018
} >Originator: Martin Husemann
} >Release: NetBSD 8.0_RC1
} >Organization:
} The NetBSD Foundation, Inc.
} >Environment:
} System: NetBSD emmas.aprisoft.de 8.0_BETA NetBSD 8.0_BETA (EMMAS) #1: Fri Mar 2 13:16:40 CET 2018 martin@emmas.aprisoft.de:/var/nbsd/src-8/sys/arch/i386/compile/EMMAS i386
} Architecture: i386
} Machine: i386
} >Description:
}
} Sysinst is unable to install onto a disk that already has a GPT, even if
} using MBR in full-disk-for-NetBSD mode and creating new partitions.
}
} >How-To-Repeat:
}
} On a scratch machine (or VM), boot into the RC1 installer (e.g. from CD image).
} Use utility menu to run /bin/sh.
}
} do:
} gpt destroy wd0
} gpt create wd0
} reboot
}
} Boot into the installer again, do a standard installatin with full disk
} for NetBSD, create new partition, accept all defaults.
}
} After finishing the installer, remove installer medium and try to boot
} from wd0 - it will fail (no PBR has been written, GPT protective MBR still
} in place).
Is this possible confustion with a UEFI disk as UEFI doesn't use
PBRs? GPT with UEFI and GPT without UEFI use considerably different
mechanims to boot.
} >Fix:
} Should happen in sysinst. Manual workaround:
}
} Go to utility, run /bin/sh, then do:
}
} > dd if=/dev/zero of=/dev/rwd0d count=100
}
} Exit back to sysinst, go to main menu and do the installation.
}
}-- End of excerpt from martin@NetBSD.org
From: Martin Husemann <martin@duskware.de>
To: John Nemeth <jnemeth@cue.bc.ca>
Cc: gnats-bugs@NetBSD.org
Subject: Re: install/53291: GPT prevents installation
Date: Thu, 17 May 2018 13:35:28 +0200
On Wed, May 16, 2018 at 06:57:03PM -0700, John Nemeth wrote:
> Is this possible confustion with a UEFI disk as UEFI doesn't use
> PBRs? GPT with UEFI and GPT without UEFI use considerably different
> mechanims to boot.
This happens when attemtping to create a legacy boot environment with
the installer, but the disk already has a GPT (for whatever reasons).
The recipe in the "how to repeat" section perfectly reproduces it for
me (but we have already seen reports of the same symptoms in the wild).
Martin
Responsible-Changed-From-To: install-manager->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Sun, 01 Aug 2021 12:56:47 +0000
Responsible-Changed-Why:
Take
State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sun, 01 Aug 2021 12:56:47 +0000
State-Changed-Why:
This no longer hapens - sysinst does not accept a protective MBR
and instead uses GPT for this disk - and offers to switch it to
MBR instead, in which case all traces of the old GPT get
properly erased.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.