NetBSD Problem Report #54870

From www@netbsd.org  Sat Jan 18 14:57:37 2020
Return-Path: <www@netbsd.org>
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 E38427A158
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 18 Jan 2020 14:57:36 +0000 (UTC)
Message-Id: <20200118145736.047767A1C7@mollari.NetBSD.org>
Date: Sat, 18 Jan 2020 14:57:35 +0000 (UTC)
From: guest01@vp.pl
Reply-To: guest01@vp.pl
To: gnats-bugs@NetBSD.org
Subject: Incorrect size of USB stick calculated by sysinst
X-Send-Pr-Version: www-1.0

>Number:         54870
>Category:       install
>Synopsis:       Incorrect size of USB stick calculated by sysinst
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 18 15:00:00 +0000 2020
>Last-Modified:  Sun Jan 19 08:40:00 +0000 2020
>Originator:     guest01
>Release:        http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/202001160600Z/images/NetBSD-9.0_RC1-amd64-install.img.gz
>Organization:
-
>Environment:
NetBSD  9.0_RC1 NetBSD 9.0_RC1 (GENERIC) #0: Thu Jan  9 17:18:43 UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When you install NetBSD 9.0_RC1 on USB stick, sysinst at the beginnig dislpays one size of the stick (for example 928M) and then when you setup NetBSD partitions total size is other (for example 232M).
>How-To-Repeat:
Boot computer with NetBSD 9.0_RC1 installation image and then select:
1. Install NetBSD to hard disk
2. Shall we continue? Yes
3. On which disk do you want to install NetBSD?
   b: sd0 (929M)
4. Sysinst could not automatically determine the BIOS geoemtry of the disk.
   The phisical geometry is 471 cylinders 16 sectors 63 heads.
   You will be prompted for the geometry. Please enter the number of sectors per track (maximum 63) and the number of heads (maximum 256) that the BIOS uses to access the disk. The number of cylinders will be calculated from the disk size.
   sectors [63]: enter
   heads   [16]: enter
5. Use default partition sizes

   Total size: 232M is displayed.

>Fix:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/54870: Incorrect size of USB stick calculated by sysinst
Date: Sat, 18 Jan 2020 16:23:48 +0100

 Have you used the stick before?
 Can you show the output of:

 	fdisk sd0
 	disklabel -r sd0

 please?

 Martin

From: guest01@vp.pl
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: Re: install/54870: Incorrect size of USB stick calculated by
	sysinst
Date: Sat, 18 Jan 2020 16:41:39 +0100

 Yes, I have used the stick before.

 Here is result of fdisk sd0:

 NetBSD disklabel disk geometry:
 cylinders: 471, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
 total sectors: 475648, bytes/sector: 2048

 BIOS disk geometry:
 cylinders: 30, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
 total sectors: 475648

 Partitions aligned to 16065 sector boundaries, offset 63

 Partition table:
 0: Primary 'big' DOS, 16-bit FAT (> 32MB) (sysid 6)
     start 512, size 475136 (928 MB, Cyls 0/8/9-29/154/61)
 1: <UNUSED>
 2: <UNUSED>
 3: <UNUSED>
 No active partition.
 Drive serial number: 854754480 (0x32f284b0)

 and disklabel -r sd0

 disklabel: could not read existing label

 guest01


  =


From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/54870: Incorrect size of USB stick calculated by sysinst
Date: Sun, 19 Jan 2020 00:29:50 +0700

 That's a 2K bytes/sector "drive", which seems peculiar for a USB
 stick of such limited size.

 Is that really what it is, or has something simply made a mess of the
 geometry info?

 kre

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: Re: install/54870: Incorrect size of USB stick calculated by
 sysinst
Date: Sat, 18 Jan 2020 20:14:44 +0100

 Yeah, something strange going on here - can you show the dmesg output
 lines about sd0?

 Martin

From: guest01@vp.pl
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/54870: Incorrect size of USB stick calculated by sysinst
Date: Sat, 18 Jan 2020 21:46:37 +0100

 dmesg output lines about sd0
 sd0 at scsibus0 target 0 lun 0: <SONY, WALKMAN, 1.00> disk removable
 sd0: 929 MB, 471 cyl, 16 head, 63 sec, 2048 bytes/sect x 475648 sectors

 guest01

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/54870: Incorrect size of USB stick calculated by sysinst
Date: Sun, 19 Jan 2020 09:37:56 +0100

 On Sat, Jan 18, 2020 at 10:00:05PM +0000, guest01@vp.pl wrote:
 >  sd0 at scsibus0 target 0 lun 0: <SONY, WALKMAN, 1.00> disk removable
 >  sd0: 929 MB, 471 cyl, 16 head, 63 sec, 2048 bytes/sect x 475648 sectors

 So ti really is 2048 bytes/sect and that is what causes confusion - I'll
 look into it.

 Martin

NetBSD Home
NetBSD PR Database Search

(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.