NetBSD Problem Report #57927

From www@netbsd.org  Sun Feb 11 20:09:26 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_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 65C021A9238
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 11 Feb 2024 20:09:26 +0000 (UTC)
Message-Id: <20240211200924.E74CD1A9239@mollari.NetBSD.org>
Date: Sun, 11 Feb 2024 20:09:24 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: sysinst gpt editor loses partition options, can't change options for one partition at a time
X-Send-Pr-Version: www-1.0

>Number:         57927
>Category:       install
>Synopsis:       sysinst gpt editor loses partition options, can't change options for one partition at a time
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    martin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 11 20:10:00 +0000 2024
>Closed-Date:    Wed Feb 14 15:14:17 +0000 2024
>Last-Modified:  Wed Feb 14 15:14:17 +0000 2024
>Originator:     Taylor R Campbell
>Release:        10.0_RC4
>Organization:
The NetBSD Foundinst
>Environment:
>Description:
Someone on Mastodon reports:

> - If I create a new GPT partition and set options for it, sysinst will forget those options after I set them once I leave the menu.
> 
> - sysinst will set the options for partition 2 to be the same as partition 1 after I change them.
> 
> My workaround was to Ctrl-C to exit sysinst, create the partitions manually on the command line using gpt (which no longer segfaults, unlike in the 9.3 install image), and create the filesystems manually. It took two tries in sysinst after that, but it found the correct partitions and worked after that.
>How-To-Repeat:
As in description.  I haven't reproduced the problem, just filing this so we can track reproduction/diagnosis/fix.
>Fix:

>Release-Note:

>Audit-Trail:
From: Harold Gutch <logix@foobar.franken.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/57927: sysinst gpt editor loses partition options, can't change options for one partition at a time
Date: Mon, 12 Feb 2024 01:21:55 +0100

 I don't know if I am doing this right because my end result doesn't
 *quite* match the symptoms here, but in sysinst, the sequence

   a a a b a a c 

 will bring you to the GPT partition menu, after which

   b c 6000 e g h b i / x

 will create one partition with the three flags, "install", "newfs" and
 "mount" and the "async" mount option and configure it to be mounted on
 /.  Then, with

  c e x

 we ask for a second partition to be created, and the only important
 thing here is that we set the "install" flag, the rest doesn't seem to
 matter.  This *should* just clear the "install" flag from partition
 "a" but I would argue that it should leave the rest untouched.  What
 it actually does is clear all three flags and also all mount options.
 If the first partition does not have the install flag before we set it
 on the second, then nothing happens.

 But it doesn't *clone* the options from one of the partitions to the
 other.  I played around a bit with this and didn't manage to reproduce
 this part of the original report.

 Oddly, not setting the install flag on partition 1 but setting it on
 partition two and then, subsequently, setting it on partition 1 does
 *not* clear out everything in partition 2 and only clears the
 "install" flag:

   b c 6000 h d x c c 4000 e h a x a e x

 (you can run this after doing the above simply by first clearing out
 the two partitions, no need to reboot or to restart sysinst or so).


   Harold

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/57927: sysinst gpt editor loses partition options, can't
 change options for one partition at a time
Date: Mon, 12 Feb 2024 07:15:44 +0100

 On Mon, Feb 12, 2024 at 12:25:01AM +0000, Harold Gutch wrote:
 >  I don't know if I am doing this right because my end result doesn't
 >  *quite* match the symptoms here, but in sysinst, the sequence
 >  
 >    a a a b a a c 
 >  
 >  will bring you to the GPT partition menu, after which
 >  
 >    b c 6000 e g h b i / x
 >  
 >  will create one partition with the three flags, "install", "newfs" and
 >  "mount" and the "async" mount option and configure it to be mounted on
 >  /.  Then, with
 >  
 >   c e x
 >  
 >  we ask for a second partition to be created, and the only important
 >  thing here is that we set the "install" flag, the rest doesn't seem to
 >  matter.  This *should* just clear the "install" flag from partition
 >  "a" but I would argue that it should leave the rest untouched.  What
 >  it actually does is clear all three flags and also all mount options.
 >  If the first partition does not have the install flag before we set it
 >  on the second, then nothing happens.

 Can you send me (off list?) screen shots of the display showing the partitions
 with offsets + flags after each step and details about the disk size
 and partitioning before you start all this?

 Just from the key sequences I am not sure if I try exactly the same
 in sysinst versions not running on an RPi.

 Are we talking about a 32bit or 64bit setup here? RPi has some special
 treatment in 32bit due to different boot setup.

 Thanks,

 Martin

From: Harold Gutch <logix@foobar.franken.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/57927: sysinst gpt editor loses partition options, can't change options for one partition at a time
Date: Mon, 12 Feb 2024 10:09:32 +0100

 Hi,

 this was on amd64 (emulated, in VirtualBox).

 I can redo and send screenshots later today, in around 7 hours.


   Harold

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/57927: sysinst gpt editor loses partition options, can't
 change options for one partition at a time
Date: Mon, 12 Feb 2024 11:06:36 +0100

 On Mon, Feb 12, 2024 at 09:10:01AM +0000, Harold Gutch wrote:
 >  this was on amd64 (emulated, in VirtualBox).

 Ah, ok - that is easy to reproduce. You started with a blank disk?
 What size?

 >  I can redo and send screenshots later today, in around 7 hours.

 Shouldn't be necessary in that case.

 Martin

From: Harold Gutch <logix@foobar.franken.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/57927: sysinst gpt editor loses partition options, can't change options for one partition at a time
Date: Mon, 12 Feb 2024 13:23:21 +0100

 Hi,

 On Mon, Feb 12, 2024 at 10:10:02AM +0000, Martin Husemann wrote:
 >  On Mon, Feb 12, 2024 at 09:10:01AM +0000, Harold Gutch wrote:
 >  >  this was on amd64 (emulated, in VirtualBox).
 >  
 >  Ah, ok - that is easy to reproduce. You started with a blank disk?
 >  What size?

 Yes, blank disk, 16 GB.  I chose 6 and 4 GB as partitions sizes for no
 particular reason other than "don't use everything available" (obvious
 for the first partion as I wanted to add a second - but for the second
 I did the same because I thought it might be useful for testing this
 to add yet another partition).  I didn't test what happens if I let
 the second partition fill out the remainder of the disk.

 Other things : the VM had 2 cores, 4 GB RAM, EFI was enabled, and I
 was booting the RC4 .iso.


   Harold

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57927 CVS commit: src/usr.sbin/sysinst
Date: Wed, 14 Feb 2024 13:52:11 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Wed Feb 14 13:52:11 UTC 2024

 Modified Files:
 	src/usr.sbin/sysinst: label.c

 Log Message:
 PR 57927: when comparing old and new partition state during renumbering,
 ignore differences in the install target flag - the backend might have
 flipped it off already to ensure only a single partition is marked
 as install target.


 To generate a diff of this commit:
 cvs rdiff -u -r1.50 -r1.51 src/usr.sbin/sysinst/label.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: install-manager->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Wed, 14 Feb 2024 14:02:13 +0000
Responsible-Changed-Why:
My bug


State-Changed-From-To: open->pending-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Wed, 14 Feb 2024 14:02:13 +0000
State-Changed-Why:
[pullup-10 #594]


From: "Stephen Borrill" <sborrill@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57927 CVS commit: [netbsd-10] src/usr.sbin/sysinst
Date: Wed, 14 Feb 2024 15:08:29 +0000

 Module Name:	src
 Committed By:	sborrill
 Date:		Wed Feb 14 15:08:29 UTC 2024

 Modified Files:
 	src/usr.sbin/sysinst [netbsd-10]: label.c

 Log Message:
 Pull up the following revisions(s) (requested by martin in ticket #594):
 	usr.sbin/sysinst/label.c:	revision 1.51

 PR 57927: when comparing old and new partition state during renumbering,
 ignore differences in the install target flag - the backend might have
 flipped it off already to ensure only a single partition is marked
 as install target.


 To generate a diff of this commit:
 cvs rdiff -u -r1.46.2.2 -r1.46.2.3 src/usr.sbin/sysinst/label.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Wed, 14 Feb 2024 15:14:17 +0000
State-Changed-Why:
Pullup completed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.