NetBSD Problem Report #57987

From www@netbsd.org  Sun Mar  3 02:33:50 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 7493C1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  3 Mar 2024 02:33:50 +0000 (UTC)
Message-Id: <20240303023349.377621A923A@mollari.NetBSD.org>
Date: Sun,  3 Mar 2024 02:33:49 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: sysinst refuses to upgrade the booted root partition
X-Send-Pr-Version: www-1.0

>Number:         57987
>Category:       install
>Synopsis:       sysinst refuses to upgrade the booted root partition
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 03 02:35:00 +0000 2024
>Last-Modified:  Sun Mar 03 13:40:01 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current
>Organization:
The NetBSD Installation (upgrade)
>Environment:
>Description:
NetBSD in VM with ld4 (unused), ld5 (gpt), dk0@ld5 (efi), dk1@ld5 (netbsd root partition).

# sysinst
a: Installation messages in English
b: Upgrade NetBSD on a hard disk
b: Yes
c: Preconfigured "wedges" dk(4)

Shows these options:

                            &#9484;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;                            
                            &#9474; Existing "wedges"    &#9474;                            
                            &#9474;                      &#9474;                            
                            &#9474;>a: EFI (dk0@ld5)     &#9474;                            
                            &#9474; x: Exit              &#9474;                            
                            &#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;                            

Presumably dk1@ld5 was excluded because of:

    712 	/*
    713 	 * Exclude a disk mounted as root partition,
    714 	 * in case of install-image on a USB memstick.
    715 	 */
    716 	if (is_active_rootpart(state->dd->dd_name,
    717 	    state->dd->dd_no_part ? -1 : 0))
    718 		return true;

https://nxr.netbsd.org/xref/src/usr.sbin/sysinst/disks.c?r=1.95#712
>How-To-Repeat:

>Fix:
Yes, please!

(Ideally we would incorporate a non-interactive upgrade tool, like syspugrade, into base and our releng processes.  But I thought I'd try this built-in approach for now instead of my hand-crufted tar/etcupdate/postinstall that I've been doing for many years, and which I guess I'll keep doing for now.)

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/57987: sysinst refuses to upgrade the booted root
 partition
Date: Sun, 3 Mar 2024 08:18:41 +0100

 There is a separate option to upgrade the running system whenn you 
 select "b: Upgrade NetBSD on a hard disk" and then get to the selected
 disks you will find (at the end, before x: Exit) "current system" as
 an option.

 Martin

From: Taylor R Campbell <riastradh@NetBSD.org>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@NetBSD.org, install-manager@NetBSD.org, gnats-admin@NetBSD.org,
	netbsd-bugs@NetBSD.org
Subject: Re: install/57987: sysinst refuses to upgrade the booted root
	partition
Date: Sun, 3 Mar 2024 13:36:12 +0000

 > Date: Sun, 3 Mar 2024 08:18:41 +0100
 > From: Martin Husemann <martin@duskware.de>
 > 
 > There is a separate option to upgrade the running system whenn you 
 > select "b: Upgrade NetBSD on a hard disk" and then get to the selected
 > disks you will find (at the end, before x: Exit) "current system" as
 > an option.

 So I see, thanks!  I must not have seen it before because / was
 mounted read-only since I had booted into single-user mode.  I wonder
 if it makes sense to find a way to bypass this or emphasize it, since
 it wasn't obvious to me to think about mounting / rw first?

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.