NetBSD Problem Report #54996
From dtyson@cruncher.anduin.org.uk Fri Feb 21 18:13:12 2020
Return-Path: <dtyson@cruncher.anduin.org.uk>
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 3C1611A9213
for <gnats-bugs@gnats.NetBSD.org>; Fri, 21 Feb 2020 18:13:12 +0000 (UTC)
Message-Id: <20200221174639.68B5314478C@cruncher.anduin.org.uk>
Date: Fri, 21 Feb 2020 17:46:39 +0000 (GMT)
From: dtyson@anduin.org.uk
Reply-To: dtyson@anduin.org.uk
To: gnats-bugs@NetBSD.org
Subject: sysinst on arm messes up partitioning install disk (NetBSD 9 and later)
X-Send-Pr-Version: 3.95
>Number: 54996
>Category: install
>Synopsis: sysinst on arm messes up partitioning install disk (NetBSD 9 and later)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: install-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 21 18:15:00 +0000 2020
>Last-Modified: Sun Mar 08 12:40:01 +0000 2020
>Originator: Dave Tyson
>Release: NetBSD 9.99.37
>Organization:
Anduin
>Environment:
System: NetBSD rpi.anduin.org.uk 9.99.37 NetBSD 9.99.37 (RPI.202001150240UTC) #17: Mon Jan 20 08:15:13 JST 2020 jun@amix200m.soum.co.jp:/usr/local/Build/src/sys/arch/evbarm/compile/RPI evbarm
Architecture: evbarm
Machine: Raspberry Pi B
>Description:
Sysinst on some arm platforms seems to have trouble handling custom values when partitioning a hard disk.
When separate /, /usr, /var ... partitions are configured and sizes set these are accepted, however on
completion of the menu screen and moving onto the next screen to confirm there are missing partitions
and the (a) / partition is changed to /usr and there is no / partition. Accepting the values results in
sysinst complaining about a missing root partition
>How-To-Repeat:
Problem noted under NetBSD 9.0 on Banana Pi with sata controller, reproduced below on NetBSD-current with
a Raspberry Pi usb attached disk and Jun Ebihara image:
Problems using sysinst on arm to partition a hard disk.
sysinst dialogue:
NetBSD/evbarm 9.99.37
This menu-driven tool is designed to help you install NetBSD to a hard disk, or upgrade an existing NetBSD system, with a minimum of work.
In the following menus type the reference letter (a, b, c, ...) to select an item, or type CTRL+N/CTRL+P to select the next/previous item.
The arrow keys and Page-up/Page-down may also work.
Activate the current selection from the menu by typing the enter key.
If you booted from a floppy, you may now remove the disk.
Thank you for using NetBSD!
?????????????????????????????????????????????????
? NetBSD-9.99.37 Install System ?
? ?
?>a: Install NetBSD to hard disk ?
? b: Upgrade NetBSD on a hard disk ?
? c: Re-install sets or install additional sets ?
? d: Reboot the computer ?
? e: Utility menu ?
? f: Config menu ?
? x: Exit Install System ?
?????????????????????????????????????????????????
select install and yes to continue
On which disk do you want to install NetBSD?
????????????????????????????
? Available disks ?
? ?
?>a: sd0 (6.0G) ?
? b: Extended partitioning ?
? x: Exit ?
????????????????????????????
????????????????????????????????????????????????????????????????????????
? The disk seems not to have been partitioned before. Please select ?
? a partitioning scheme from the available options below. ?
? ?
?>a: BSD disklabel ?
? b: Master Boot Record (MBR) ?
? x: Exit ?
????????????????????????????????????????????????????????????????????????
You can now change the sizes for the system partitions. The default is to allocate all the space to the root file system. However, you may wish to have separate /usr
(additional system files), /var (log files etc) or /home (users' home directories) file systems.
Free space will be added to the partition marked with a '+'.
Size (MB) Filesystem
----------------------------------- - --------------------
>a: 16 /boot
b: 808 (6005) + /
c: 128 <swap>
d: 0 /tmp (mfs)
e: 0 /usr
f: 0 /var
----------------------------------- - --------------------
h: Add a user defined partition
i: Clone external partition(s)
j: Change input units (sectors/cylinders/MB/GB)
x: Go on. Free space 5197 MB.
I want a custom install with separate /usr, /var and /home
changed a: to be 64 - OK
b: to be 256a - OK
c: to be 512 - OK
changed e: to be 3072 - on pressing return this is set OK but b: now is reported to be 18446744073709551072
changed f: to be 1024 - OK
added a partition g for /home and use the rest of the free space (2021) -OK
screen now looks like:
Size (MB) Filesystem
----------------------------------- - --------------------
a: 64 /boot
b: 18446744073709551072 /
c: 512 <swap>
d: 0 /tmp (mfs)
e: 3072 /usr
f: 1024 /var
>g: 2021 /home
----------------------------------- - --------------------
i: Add a user defined partition
j: Clone external partition(s)
k: Change input units (sectors/cylinders/MB/GB)
x: Go on. Free space 0 MB.
let go on...
This is what is shown:
We now have your disklabel partitions for sd0 below. This is your last chance to change them.
Flags: (I)nstall, (N)ewfs. Total size: 6150M, free: 1478M
Start (MB) End (MB) Size (MB) FS type Flag Filesystem
------------ ------------ ------------ -------- ---- ----------------
a: 576 3647 3072 4.2BSD N /usr
b: 64 575 512 swap
c: 0 6148 6149 Whole disk
d: 0 63 64 MSDOS N /boot
e: 3648 4671 1024 4.2BSD N /var
------------ ------------ ------------ -------- ---- ----------------
g: Change input units (sectors/cylinders/MB/GB)
h: Edit name of the disk
i: Clone external partition(s)
j: Cancel
>x: Partition sizes ok
Notice the root partition (a) is now /usr and there is no root partition. /home has also gone. The (b) partition is the correct size so the
large number is just an artifact. If you select partition sizeis are OK then it complains about no root partition
There must be a single partition marked to be mounted on '/'.
???????????????????????????????????????????????????????
? Do you want to re-edit the disklabel partitions? ?
? ?
?>a: Re-edit ?
? b: Use this partitions anyway ?
? c: Abort installation ?
???????????????????????????????????????????????????????
>Fix:
manually partition the disk using disklabel
>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: install/54996: sysinst on arm messes up partitioning install
disk (NetBSD 9 and later)
Date: Sun, 8 Mar 2020 13:38:51 +0100
On Fri, Feb 21, 2020 at 06:15:00PM +0000, dtyson@anduin.org.uk wrote:
>
> ????????????????????????????????????????????????????????????????????????
> ? The disk seems not to have been partitioned before. Please select ?
> ? a partitioning scheme from the available options below. ?
> ? ?
> ?>a: BSD disklabel ?
> ? b: Master Boot Record (MBR) ?
> ? x: Exit ?
> ????????????????????????????????????????????????????????????????????????
This is the first bug (which I can not reproduce locally). There should be
no option "BSD disklabel" here. I get a GPT option there instead, but I am
not sure that is correct either - can RPi firmware boot from a GPT disk?
Could you maybe retest (upto this point) with a newer image, just to make
sure it still offers disklabel as primary partitioning scheme?
Can you please also report the full disk geometry for that target disk?
That makes it easier to reproduce the (later) errors with partition details.
Thanks!
Martin
>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.