NetBSD Problem Report #54065
From tsutsui@ceres.dti.ne.jp Sat Mar 16 15:37:07 2019
Return-Path: <tsutsui@ceres.dti.ne.jp>
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 167C17A188
for <gnats-bugs@gnats.NetBSD.org>; Sat, 16 Mar 2019 15:37:07 +0000 (UTC)
Message-Id: <201903161537.x2GFb2Bb011330@ceres.dti.ne.jp>
Date: Sun, 17 Mar 2019 00:37:02 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: sysinst: make newfs_ext2fs -O REVs configurable
X-Send-Pr-Version: 3.95
>Number: 54065
>Category: install
>Synopsis: sysinst: make newfs_ext2fs -O REVs configurable
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: martin
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Mar 16 15:40:00 +0000 2019
>Closed-Date: Mon Feb 24 13:57:21 +0000 2020
>Last-Modified: Mon Feb 24 13:57:21 +0000 2020
>Originator: Izumi Tsutsui
>Release: NetBSD -current, after 20190307
>Organization:
>Environment:
System: NetBSD 8.0 NetBSD 8.0 (GENERIC) #0: Tue Jul 17 14:59:51 UTC 2018 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Recently newfs_ext2fs(8) has been changed to create -O1 (DYNAMIC_REV)
file system by default:
http://mail-index.netbsd.org/source-changes/2019/03/06/msg104050.html
---
Module Name: src
Committed By: mrg
Date: Wed Mar 6 05:11:13 UTC 2019
Modified Files:
src/sbin/newfs_ext2fs: newfs_ext2fs.8 newfs_ext2fs.c
Log Message:
make ext2fs rev1 the default. this enables LARGEFILES support.
---
but current sysinst(8) assumes its default is -O0 and there is
no way to specify options for newfs_ext2fs -O REVs.
The Cobalt firmware requires to have Ext2 REV0 to load a bootloader
from a boot partition so NetBSD/cobalt installation will fail.
(note I wrote newfs_ext2fs(8) for cobalt restorecd :-)
>How-To-Repeat:
Code inspection.
>Fix:
Changes like the following patch is necessary (untested):
Index: usr.sbin/sysinst/defs.h
===================================================================
RCS file: /cvsroot/src/usr.sbin/sysinst/defs.h,v
retrieving revision 1.28
diff -u -p -d -r1.28 defs.h
--- usr.sbin/sysinst/defs.h 27 Nov 2018 17:13:41 -0000 1.28
+++ usr.sbin/sysinst/defs.h 16 Mar 2019 15:25:41 -0000
@@ -218,6 +218,7 @@ typedef struct _partinfo {
uint pi_flags;
#define PIF_NEWFS 0x0001 /* need to 'newfs' partition */
#define PIF_FFSv2 0x0002 /* newfs with FFSv2, not FFSv1 */
+#define PIF_EXT2REV1 PIF_FFSv2 /* newfs_ext2fs with REV1, not REV0 */
#define PIF_MOUNT 0x0004 /* need to mount partition */
#define PIF_ASYNC 0x0010 /* mount -o async */
#define PIF_NOATIME 0x0020 /* mount -o noatime */
Index: usr.sbin/sysinst/disks.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/sysinst/disks.c,v
retrieving revision 1.28
diff -u -p -d -r1.28 disks.c
--- usr.sbin/sysinst/disks.c 27 Nov 2018 17:13:41 -0000 1.28
+++ usr.sbin/sysinst/disks.c 16 Mar 2019 15:25:42 -0000
@@ -1093,7 +1093,8 @@ make_filesystems(void)
#endif
#ifdef USE_EXT2FS
case FS_EX2FS:
- asprintf(&newfs, "/sbin/newfs_ext2fs");
+ asprintf(&newfs, "/sbin/newfs_ext2fs -O %d"
+ lbl->pi_flags & PIF_EXT2REV1 ? 1 : 0));
lbl->mnt_opts = "-text2fs";
lbl->fsname = "ext2fs";
break;
---
Izumi Tsutsui
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: install-manager->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Sat, 16 Mar 2019 16:05:24 +0000
Responsible-Changed-Why:
Take
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@netbsd.org
Cc: martin@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: install/54065 (sysinst: make newfs_ext2fs -O REVs configurable)
Date: Sat, 30 Nov 2019 08:06:21 +0900
> Synopsis: sysinst: make newfs_ext2fs -O REVs configurable
Is this fixed in 9.0_RC1? (otherwise cobalt installation will fail)
---
Izumi Tsutsui
From: Martin Husemann <martin@duskware.de>
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Cc: gnats-bugs@netbsd.org
Subject: Re: install/54065 (sysinst: make newfs_ext2fs -O REVs configurable)
Date: Sat, 30 Nov 2019 17:14:33 +0100
On Sat, Nov 30, 2019 at 08:06:21AM +0900, Izumi Tsutsui wrote:
> > Synopsis: sysinst: make newfs_ext2fs -O REVs configurable
>
> Is this fixed in 9.0_RC1? (otherwise cobalt installation will fail)
No, but it is on my list of must-have fixes before the final release, will
get to it soon, sorry it did not make RC1.
Martin
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54065 CVS commit: src/usr.sbin/sysinst
Date: Wed, 11 Dec 2019 19:23:38 +0000
Module Name: src
Committed By: martin
Date: Wed Dec 11 19:23:38 UTC 2019
Modified Files:
src/usr.sbin/sysinst: disks.c label.c msg.mi.de msg.mi.en msg.mi.es
msg.mi.fr msg.mi.pl
src/usr.sbin/sysinst/arch/cobalt: md.h
Log Message:
PR 54065: add optional "old compat" variant of ext2fs in file system
type selection and use that as default for the cobalt boot file system.
To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/usr.sbin/sysinst/disks.c
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/sysinst/label.c
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/sysinst/msg.mi.de
cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/sysinst/msg.mi.en
cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/sysinst/msg.mi.es
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/sysinst/msg.mi.fr
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/sysinst/msg.mi.pl
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/sysinst/arch/cobalt/md.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54065 CVS commit: [netbsd-9] src/usr.sbin/sysinst
Date: Tue, 17 Dec 2019 09:44:52 +0000
Module Name: src
Committed By: msaitoh
Date: Tue Dec 17 09:44:52 UTC 2019
Modified Files:
src/usr.sbin/sysinst [netbsd-9]: bsddisklabel.c defs.h disklabel.c
disks.c gpt.c label.c main.c mbr.c msg.mi.de msg.mi.en msg.mi.es
msg.mi.fr msg.mi.pl partitions.c partitions.h partman.c wskbd.c
src/usr.sbin/sysinst/arch/alpha [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/amiga [netbsd-9]: md.h
src/usr.sbin/sysinst/arch/arc [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/cobalt [netbsd-9]: md.c md.h
src/usr.sbin/sysinst/arch/emips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/evbarm [netbsd-9]: md.c menus.md.en
menus.md.es menus.md.fr menus.md.pl
src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/hp300 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mipsco [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/mvme68k [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/pmax [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/prep [netbsd-9]: md.c
src/usr.sbin/sysinst/arch/x68k [netbsd-9]: md.c md.h
Log Message:
Pull up following revision(s) (requested by martin in ticket #560):
usr.sbin/sysinst/partitions.h: revision 1.11
usr.sbin/sysinst/defs.h: revision 1.49
usr.sbin/sysinst/mbr.c: revision 1.23
usr.sbin/sysinst/msg.mi.en: revision 1.26
usr.sbin/sysinst/disks.c: revision 1.58
usr.sbin/sysinst/arch/evbarm/menus.md.pl: revision 1.2
usr.sbin/sysinst/msg.mi.es: revision 1.20
usr.sbin/sysinst/arch/mvme68k/md.c: revision 1.9
usr.sbin/sysinst/gpt.c: revision 1.13
usr.sbin/sysinst/arch/evbarm/md.c: revision 1.10
usr.sbin/sysinst/arch/arc/md.c: revision 1.10
usr.sbin/sysinst/disklabel.c: revision 1.18
usr.sbin/sysinst/bsddisklabel.c: revision 1.33
usr.sbin/sysinst/disklabel.c: revision 1.19
usr.sbin/sysinst/main.c: revision 1.19
usr.sbin/sysinst/partman.c: revision 1.45
usr.sbin/sysinst/arch/alpha/md.c: revision 1.7
usr.sbin/sysinst/msg.mi.de: revision 1.19
usr.sbin/sysinst/arch/evbarm/menus.md.en: revision 1.2
usr.sbin/sysinst/arch/x68k/md.h: revision 1.4
usr.sbin/sysinst/arch/x68k/md.c: revision 1.9
usr.sbin/sysinst/arch/evbarm/menus.md.es: revision 1.2
usr.sbin/sysinst/wskbd.c: revision 1.4
usr.sbin/sysinst/label.c: revision 1.15
usr.sbin/sysinst/arch/amiga/md.h: revision 1.5
usr.sbin/sysinst/label.c: revision 1.16
usr.sbin/sysinst/arch/hp300/md.c: revision 1.9
usr.sbin/sysinst/arch/emips/md.c: revision 1.8
usr.sbin/sysinst/label.c: revision 1.17
usr.sbin/sysinst/arch/pmax/md.c: revision 1.7
usr.sbin/sysinst/partitions.c: revision 1.6
usr.sbin/sysinst/arch/prep/md.c: revision 1.10
usr.sbin/sysinst/arch/mipsco/md.c: revision 1.7
usr.sbin/sysinst/partitions.c: revision 1.7
usr.sbin/sysinst/partitions.c: revision 1.8
usr.sbin/sysinst/arch/ews4800mips/md.c: revision 1.5
usr.sbin/sysinst/disklabel.c: revision 1.20
usr.sbin/sysinst/arch/evbarm/menus.md.fr: revision 1.2
usr.sbin/sysinst/msg.mi.fr: revision 1.24
usr.sbin/sysinst/disklabel.c: revision 1.21
usr.sbin/sysinst/partitions.h: revision 1.9
usr.sbin/sysinst/msg.mi.pl: revision 1.27
usr.sbin/sysinst/disklabel.c: revision 1.22
usr.sbin/sysinst/disklabel.c: revision 1.23
usr.sbin/sysinst/arch/i386/md.c: revision 1.27
usr.sbin/sysinst/disklabel.c: revision 1.24
usr.sbin/sysinst/disklabel.c: revision 1.25
usr.sbin/sysinst/arch/cobalt/md.h: revision 1.5
usr.sbin/sysinst/disklabel.c: revision 1.26
usr.sbin/sysinst/disklabel.c: revision 1.27
usr.sbin/sysinst/partitions.h: revision 1.10
usr.sbin/sysinst/arch/cobalt/md.c: revision 1.10
PR install/54582: allow MD code to disable on-disk presence verification
of "real" disklabels. Auto-enable this (at run time) when there is no other
partitioning scheme but disklabel configured.
Hard-coded enable this for x68k to allow using kernel based translations
for native Human68k partitions.
Get rid of the evbarm preliminary menu: do not bother to ask the user
whether this is a RPi - query the FDT instead.
PR 54065: add optional "old compat" variant of ext2fs in file system
type selection and use that as default for the cobalt boot file system.
For now rely on the kernel mapping native RDB partitions.
Fix detection of existing disklabels in the case when we only have
the disklabel partitioning scheme available.
Fix DISKLABEL_NO_ONDISK_VERIFY (accidently disabled in previous)
Fix inverted comparison
Do not try to change the keyboard layout if we are not running on the
console.
When trying to tell a fictious but empty label from a real one, skip
partition a if it has the same start and size as the raw partition.
Remove bogus assert.
When finding (paritioning scheme native) partition types for file systems
from our install description, pass the partition type (not only the file
system type). Sometimes (e.g. EFI boot partition on GPT) the filesystem
type (MSDOS) is not a unique selector.
Adapt MD parts to changes in get_fs_part_type (pass partition type).
If a fictious label has no RAW_PART assume there is no valid disk label.
Pass proper track size when initializing the default alignment - this is
important with sunlabels.
Fix overlapping partitions display
Reject (what we consider) empty/invalid fake disklabels no matter whether
we have other partitioning schemes available or not.
Do not show disklabel command invocation by default (only if there are
errors).
After installing boot blocks with RUN_NO_CLEAR (and handling the
potential errors) make sure to clear the stdscreen.
To generate a diff of this commit:
cvs rdiff -u -r1.23.2.7 -r1.23.2.8 src/usr.sbin/sysinst/bsddisklabel.c
cvs rdiff -u -r1.42.2.4 -r1.42.2.5 src/usr.sbin/sysinst/defs.h
cvs rdiff -u -r1.10.2.6 -r1.10.2.7 src/usr.sbin/sysinst/disklabel.c
cvs rdiff -u -r1.44.2.11 -r1.44.2.12 src/usr.sbin/sysinst/disks.c
cvs rdiff -u -r1.6.2.6 -r1.6.2.7 src/usr.sbin/sysinst/gpt.c
cvs rdiff -u -r1.10.2.3 -r1.10.2.4 src/usr.sbin/sysinst/label.c
cvs rdiff -u -r1.17.2.1 -r1.17.2.2 src/usr.sbin/sysinst/main.c
cvs rdiff -u -r1.19.2.3 -r1.19.2.4 src/usr.sbin/sysinst/mbr.c
cvs rdiff -u -r1.13.2.4 -r1.13.2.5 src/usr.sbin/sysinst/msg.mi.de
cvs rdiff -u -r1.19.2.5 -r1.19.2.6 src/usr.sbin/sysinst/msg.mi.en
cvs rdiff -u -r1.14.2.4 -r1.14.2.5 src/usr.sbin/sysinst/msg.mi.es
cvs rdiff -u -r1.17.2.5 -r1.17.2.6 src/usr.sbin/sysinst/msg.mi.fr
cvs rdiff -u -r1.20.2.5 -r1.20.2.6 src/usr.sbin/sysinst/msg.mi.pl
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/usr.sbin/sysinst/partitions.c
cvs rdiff -u -r1.4.2.4 -r1.4.2.5 src/usr.sbin/sysinst/partitions.h
cvs rdiff -u -r1.41.2.2 -r1.41.2.3 src/usr.sbin/sysinst/partman.c
cvs rdiff -u -r1.3 -r1.3.2.1 src/usr.sbin/sysinst/wskbd.c
cvs rdiff -u -r1.6 -r1.6.2.1 src/usr.sbin/sysinst/arch/alpha/md.c
cvs rdiff -u -r1.3.2.1 -r1.3.2.2 src/usr.sbin/sysinst/arch/amiga/md.h
cvs rdiff -u -r1.8.2.1 -r1.8.2.2 src/usr.sbin/sysinst/arch/arc/md.c
cvs rdiff -u -r1.8.2.1 -r1.8.2.2 src/usr.sbin/sysinst/arch/cobalt/md.c
cvs rdiff -u -r1.3.2.1 -r1.3.2.2 src/usr.sbin/sysinst/arch/cobalt/md.h
cvs rdiff -u -r1.7 -r1.7.2.1 src/usr.sbin/sysinst/arch/emips/md.c
cvs rdiff -u -r1.8.2.1 -r1.8.2.2 src/usr.sbin/sysinst/arch/evbarm/md.c
cvs rdiff -u -r1.1 -r1.1.30.1 src/usr.sbin/sysinst/arch/evbarm/menus.md.en \
src/usr.sbin/sysinst/arch/evbarm/menus.md.es \
src/usr.sbin/sysinst/arch/evbarm/menus.md.fr \
src/usr.sbin/sysinst/arch/evbarm/menus.md.pl
cvs rdiff -u -r1.4 -r1.4.2.1 src/usr.sbin/sysinst/arch/ews4800mips/md.c
cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/hp300/md.c
cvs rdiff -u -r1.20.2.3 -r1.20.2.4 src/usr.sbin/sysinst/arch/i386/md.c
cvs rdiff -u -r1.6 -r1.6.2.1 src/usr.sbin/sysinst/arch/mipsco/md.c
cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/mvme68k/md.c
cvs rdiff -u -r1.6 -r1.6.2.1 src/usr.sbin/sysinst/arch/pmax/md.c
cvs rdiff -u -r1.8.2.1 -r1.8.2.2 src/usr.sbin/sysinst/arch/prep/md.c
cvs rdiff -u -r1.8 -r1.8.2.1 src/usr.sbin/sysinst/arch/x68k/md.c
cvs rdiff -u -r1.2.2.1 -r1.2.2.2 src/usr.sbin/sysinst/arch/x68k/md.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 23 Feb 2020 00:24:12 +0000
State-Changed-Why:
I'll check this on my Qube2700 soon[tm].
State-Changed-From-To: feedback->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Mon, 24 Feb 2020 13:57:21 +0000
State-Changed-Why:
I've confirmed sysinst invokes
> Command: /sbin/newfs_ext2fs -O 0 /dev/rwd0e
properly.
Note there is another problem that the old default EXT2 mount point "/stand"
conflicts with the module dirs. I'll file a new PR and fix it.
>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.