NetBSD Problem Report #56320

From kardel@Kardel.name  Wed Jul 21 15:42:53 2021
Return-Path: <kardel@Kardel.name>
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 635701A921F
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 21 Jul 2021 15:42:53 +0000 (UTC)
Message-Id: <20210721143006.BABBD44B33@Andromeda.Kardel.name>
Date: Wed, 21 Jul 2021 16:30:06 +0200 (CEST)
From: kardel@netbsd.org
Reply-To: kardel@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: sysinst 9.2_STABLE Upgrade: No root partition defined...
X-Send-Pr-Version: 3.95

>Number:         56320
>Category:       install
>Synopsis:       sysinst 9.2_STABLE Upgrade: No root partition defined.  Cannot continue
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    martin
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 21 15:45:00 +0000 2021
>Last-Modified:  Wed Jul 21 18:15:01 +0000 2021
>Originator:     kardel@netbsd.org
>Release:        NetBSD 8.1_STABLE/sysinst 9.2_STABLE/netbsd-INSTALL
>Organization:

>Environment:


System: NetBSD 9.2_STABLE (INSTALL) #0: Wed Jul 14 18:05:25 UTC 2021 (releng) attempting to upgrade
        NetBSD orcus 8.1_STABLE NetBSD 8.1_STABLE (GENERIC) #4: Mon Jul 22 09:51:59 CEST 2019 kardel@orcus:/fs/raid1a/NetBSD/netbsd-8/src/obj.amd64/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	Using the releng netbsd-INSTALL kernel from 2021-07-14 (and even more recent ones)
	sysinst claims

		No root partition defined. Cannot continue.

	after selecting the boot disk wd0 for the upgrade.
	Strangely the system boots just fine from that disk.

fdisk wd0:
Disk: /dev/rwd0
NetBSD disklabel disk geometry:
cylinders: 1860501, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 1875385008, bytes/sector: 512

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

Partitions aligned to 16065 sector boundaries, offset 63

Partition table:
0: NetBSD (sysid 169)
    start 63, size 1875384945 (915715 MB, Cyls 0-116737/80/63), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
First active partition: 0
Drive serial number: 725682 (0x000b12b2)

disklabel wd0:
# /dev/rwd0:
type: unknown
disk: INTEL SSDSC2KB9
label: 
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 1860501
total sectors: 1875385008
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# microseconds
track-to-track seek: 0	# microseconds
drivedata: 0 

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a: 133940016        63     4.2BSD   2048 16384     0  # (Cyl.      0*- 132877*)
 b:  33452496 133940079       swap                     # (Cyl. 132877*- 166064*)
 c: 1875384945        63     unused      0     0        # (Cyl.      0*- 1860500)
 d: 1875385008         0     unused      0     0        # (Cyl.      0 - 1860500)
 e: 1707992433 167392575       RAID                     # (Cyl. 166064*- 1860500)

	Thus sysinst cannot upgrade these systems.
>How-To-Repeat:
	Attempt to upgrade an 8.1_STABLE system with 9.2_STABLE sysinst and above
	partitioning.
>Fix:
	not me this time :-)

>Release-Note:

>Audit-Trail:
From: Frank Kardel <kardel@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/56320: sysinst 9.2_STABLE Upgrade: No root partition
 defined...
Date: Wed, 21 Jul 2021 17:53:58 +0200

 Naturally the fstab on the upgrade target contains the correct root entry.

 # NetBSD /targetroot/etc/fstab
 /dev/wd0a               /               ffs rw,discard              1 1

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/56320: sysinst 9.2_STABLE Upgrade: No root partition
 defined...
Date: Wed, 21 Jul 2021 18:18:54 +0200

 On Wed, Jul 21, 2021 at 03:45:00PM +0000, kardel@netbsd.org wrote:
 > 		No root partition defined. Cannot continue.

 Where was the (real) root disk last mounted and what medium did you boot from?

 Martin

From: Frank Kardel <kardel@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/56320: sysinst 9.2_STABLE Upgrade: No root partition
 defined...
Date: Wed, 21 Jul 2021 18:31:54 +0200

 On 07/21/21 18:20, Martin Husemann wrote:
 >   
 >   Where was the (real) root disk last mounted and what medium did you boot from?
 >   
 >   Martin
 >   

 Aaahh, that reminds me of the last time with the loop back mounts.

 The root was last mounted in /mnt die disable the raid mounts in 
 /mnt/etc/fstab.

 The install kernel was booted from /dev/wd0a - the root to be upgraded.

 So I need to re-try that with "fixing" /etc/fstab before booting the 
 install kernel and see

 whether sysinst can cope with that then.

 Frank

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/56320: sysinst 9.2_STABLE Upgrade: No root partition
 defined...
Date: Wed, 21 Jul 2021 18:39:11 +0200

 On Wed, Jul 21, 2021 at 04:35:01PM +0000, Frank Kardel wrote:
 >  The root was last mounted in /mnt die disable the raid mounts in 
 >  /mnt/etc/fstab.

 Mount it manually on /targetroot or / once before trying the upgrade, the
 "last mounted on" info (like: dumpfs $disk | fgrep fsmnt) needs to
 look like something that was / before sysinst will autodetect it.

 The "cannot continue" part is stupid, it lacks a manual partition
 selector (SMOP, but tedious).

 >  The install kernel was booted from /dev/wd0a - the root to be upgraded.

 You mean install kernel with ramdisk as root? That would do it.

 Martin

Responsible-Changed-From-To: install-manager->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Wed, 21 Jul 2021 16:41:29 +0000
Responsible-Changed-Why:
take


From: Frank Kardel <kardel@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/56320: sysinst 9.2_STABLE Upgrade: No root partition
 defined...
Date: Wed, 21 Jul 2021 18:44:31 +0200

 Will try once I am on-site again - probably tomorrow.

 Frank
 On 07/21/21 18:40, Martin Husemann wrote:
 > The following reply was made to PR install/56320; it has been noted by GNATS.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: install/56320: sysinst 9.2_STABLE Upgrade: No root partition
 >   defined...
 > Date: Wed, 21 Jul 2021 18:39:11 +0200
 >
 >   On Wed, Jul 21, 2021 at 04:35:01PM +0000, Frank Kardel wrote:
 >   >  The root was last mounted in /mnt die disable the raid mounts in
 >   >  /mnt/etc/fstab.
 >   
 >   Mount it manually on /targetroot or / once before trying the upgrade, the
 >   "last mounted on" info (like: dumpfs $disk | fgrep fsmnt) needs to
 >   look like something that was / before sysinst will autodetect it.
 >   
 >   The "cannot continue" part is stupid, it lacks a manual partition
 >   selector (SMOP, but tedious).
 >   
 >   >  The install kernel was booted from /dev/wd0a - the root to be upgraded.
 >   
 >   You mean install kernel with ramdisk as root? That would do it.
 >   
 >   Martin
 >   


From: Frank Kardel <kardel@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/56320: sysinst 9.2_STABLE Upgrade: No root partition
 defined...
Date: Wed, 21 Jul 2021 18:46:03 +0200

 On 07/21/21 18:40, Martin Husemann wrote:
 >   >  The install kernel was booted from /dev/wd0a - the root to be upgraded.
 >   
 >   You mean install kernel with ramdisk as root? That would do it.
 >   
 >   Martin
 >   

 yepp netbsd-INSTALL.gz with the embedded ramdisk.

 Frank

From: Frank Kardel <kardel@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: install/56320: sysinst 9.2_STABLE Upgrade: No root partition
 defined...
Date: Wed, 21 Jul 2021 20:11:11 +0200

 mounting /dev/wd0a on /targetroot instead of /mnt did the trick - thanks.

 Frank

 On 07/21/21 18:40, Martin Husemann wrote:
 > The following reply was made to PR install/56320; it has been noted by GNATS.
 >
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: install/56320: sysinst 9.2_STABLE Upgrade: No root partition
 >   defined...
 > Date: Wed, 21 Jul 2021 18:39:11 +0200
 >
 >   On Wed, Jul 21, 2021 at 04:35:01PM +0000, Frank Kardel wrote:
 >   >  The root was last mounted in /mnt die disable the raid mounts in
 >   >  /mnt/etc/fstab.
 >   
 >   Mount it manually on /targetroot or / once before trying the upgrade, the
 >   "last mounted on" info (like: dumpfs $disk | fgrep fsmnt) needs to
 >   look like something that was / before sysinst will autodetect it.
 >   
 >   The "cannot continue" part is stupid, it lacks a manual partition
 >   selector (SMOP, but tedious).
 >   
 >   >  The install kernel was booted from /dev/wd0a - the root to be upgraded.
 >   
 >   You mean install kernel with ramdisk as root? That would do it.
 >   
 >   Martin
 >   


>Unformatted:

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.