NetBSD Problem Report #55740

From mouse@Stone.Rodents-Montreal.ORG  Wed Oct 21 13:29:02 2020
Return-Path: <mouse@Stone.Rodents-Montreal.ORG>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 853AD1A923E
	for <>; Wed, 21 Oct 2020 13:29:02 +0000 (UTC)
Message-Id: <202010211328.JAA06805@Stone.Rodents-Montreal.ORG>
Date: Wed, 21 Oct 2020 09:28:59 -0400 (EDT)
From: Mouse <mouse@Rodents-Montreal.ORG>
Reply-To: mouse@Rodents-Montreal.ORG
Subject: [dM] 9.1 sysinst MBR rejects offset=8
X-Send-Pr-Version: 3.95

>Number:         55740
>Category:       install
>Synopsis:       9.1 sysinst MBR code rejects offset=8
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    martin
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 21 13:30:00 +0000 2020
>Last-Modified:  Wed Oct 21 13:40:01 +0000 2020
>Originator:     Mouse
>Release:        NetBSD 9.1
Architecture: amd64
Machine: amd64
	The MBR partitioning code in sysinst wouldn't let me specify
	(on a blanked-out disk far larger than necessary) start=8
	size=33554432, silently replacing the start with 2048 (see
	how-to-repeat, below).

	I could, maybe, understand refusing to accept it (I'd still
	consider it a bug, unless it gave some convincing
	justification, but it'd be more understandable).  But I'd
	expect some kind of error report, not just silently using a
	value different from what I gave it!

	Boot 9.1 sysinst from amd64/installation/cdrom/boot.iso,
	picking option 3 for the boot prompt and doing "consdev com0"
	before doing (from the serial console) "boot".  Then, in order,
	my path through sysinst was:

	- (a) Installation messages in English
	- (a) Install NetBSD to hard disk
	- (b) Yes (ie, continue)
	- (a) wd0 (932G - the only disk available)

	I had wiped the disk by copying 64M from /dev/zero onto the
	beginning of it before starting, so it said it "seems not to
	have been partitioned before" (which was actually false - it
	had been partitioned numerous times - though the mistake is
	understandable; this message might benefit from a rewording,
	maybe "seems to have no partitioning in place").  So I chose

	- (b) Master Boot Record (MBR)

	It "was able to uniquely match the disk [I] chose with a disk
	known to the BIOS", and there's only one drive on the machine
	in any case, so, even though it's false (the disk is extremely
	unlikely to not have varying geometry) I picked

	- (a) This is the correct geometry

	As expected, it showed me a "Current MBR partition table"
	containing "(no partitions defined)".  I picked

	- (c) Add a partition

	It showed me (whitespace not exact)
		type: NetBSD
		start: 1 MB
		size: 953868 MB
		end: 953869 MB
	I picked

	- (e) Change input units (...)
	- (d) Sectors

	It changed to show
		start: 2048 sec
		size: 1953523120 sec
	I picked

	- (b) start

	and entered 8.  It changed to show
		start: 8 sec

	I picked

	- (x) Partition OK

	It went back to the MBR display, but it showed a start of 2048!

	I tried changing the start to 8 and it still persisted in
	overriding it to 2048.

	Perhaps I should have tried other values, such as 63 (the other
	common offset I've seen), but I didn't.
	Fix unknown (probably somewhere in sysinst).  In my case, as a
	workaround, I let it put the partition where it wanted - it was
	a scratch disk, and the install was going to get copied to
	another partition on another drive in any case.



Responsible-Changed-From-To: install-manager->martin
Responsible-Changed-When: Wed, 21 Oct 2020 13:38:37 +0000

From: Martin Husemann <>
Subject: Re: install/55740: [dM] 9.1 sysinst MBR rejects offset=8
Date: Wed, 21 Oct 2020 15:37:59 +0200

 The 2048 comes from the default 1MB alignement applied to your disk,
 but it is not supposed to use that when you are working with "sectors"
 as input unit.

 So: it is a bug.



NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.