NetBSD Problem Report #55377
From tsutsui@ceres.dti.ne.jp Fri Jun 12 17:46:26 2020
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 35A701A9219
for <gnats-bugs@gnats.NetBSD.org>; Fri, 12 Jun 2020 17:46:26 +0000 (UTC)
Message-Id: <202006121746.05CHkH0D004770@ceres.dti.ne.jp>
Date: Sat, 13 Jun 2020 02:46:17 +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 should explicitly note "boot partition" on partitioning
X-Send-Pr-Version: 3.95
>Number: 55377
>Category: install
>Synopsis: sysinst should explicitly note "boot partition" on partitioning
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: install-manager
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Jun 12 17:50:00 +0000 2020
>Closed-Date: Mon Sep 28 18:14:17 +0000 2020
>Last-Modified: Mon Sep 28 18:15:01 +0000 2020
>Originator: Izumi Tsutsui
>Release: NetBSD 9.0
>Organization:
>Environment:
System: NetBSD 9.0 (RAMDISK) #0: Fri Feb 14 00:06:28 UTC 2020
mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/cobalt/compile/RAMDISK
Architecture: all
Machine: all
>Description:
On several ports (evbarm RPI, arc, cobalt etc.), a "boot partition"
(FAT or Ext2fs) is necessary for their firmware to load bootstrap
binaries.
It is automatically prepared on sysinst partition editor,
but there is no info what partition it is except a directory
name "/boot". The directory (or mount point) name could be
an other names so users might remove such "unknown" partition.
>How-To-Repeat:
Use sysinst such ports and see the default partition:
---
Free space will be added to the partition marked with a '+'.
Size (sec) Filesystem
----------------------------------- - --------------------
>a: 10240 /stand
b: 643072 (1028784) + /
c: 0 <swap>
d: 0 /tmp (mfs)
e: 0 /usr
f: 0 /var
----------------------------------- - --------------------
---
Note "/stand" for cobalt was changed to "/ext2" on -current.
("/ext2" has been traditionally used by Cobalt Restore CD)
It's also confusing a bit showing the boot partition
at "a:" line, so it's better to explicitly denote
"this is a partition for bootstrap" etc.
>Fix:
Just add extra printf strings as "(mfs)" for /tmp:
---
RCS file: /cvsroot/src/usr.sbin/sysinst/bsddisklabel.c,v
retrieving revision 1.23.2.10
diff -u -p -d -r1.23.2.10 bsddisklabel.c
--- bsddisklabel.c 10 Feb 2020 21:39:37 -0000 1.23.2.10
+++ bsddisklabel.c 11 Jun 2020 14:25:12 -0000
@@ -258,7 +258,13 @@ draw_size_menu_line(menudesc *m, int opt
pset->infos[opt].fs_version));
mount = swap;
} else if (pset->infos[opt].mount[0]) {
- mount = pset->infos[opt].mount;
+ if (pset->infos[opt].instflags & PUIINST_BOOT) {
+ snprintf(swap, sizeof swap, "%s <boot>",
+ pset->infos[opt].mount);
+ mount = swap;
+ } else {
+ mount = pset->infos[opt].mount;
+ }
#ifndef NO_CLONES
} else if (pset->infos[opt].flags & PUIFLG_CLONE_PARTS) {
snprintf(swap, sizeof swap, "%zu %s",
---
The strings "<boot>" could be improved.
---
Izumi Tsutsui
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Mon, 28 Sep 2020 18:14:17 +0000
State-Changed-Why:
Patch commited (with minor modifications).
Thanks!
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/55377 CVS commit: src/usr.sbin/sysinst
Date: Mon, 28 Sep 2020 18:13:25 +0000
Module Name: src
Committed By: martin
Date: Mon Sep 28 18:13:25 UTC 2020
Modified Files:
src/usr.sbin/sysinst: bsddisklabel.c
Log Message:
PR 55377: mark boot partitions in the partition size display, as suggested
by Izumi Tsutsui (minor modifications + all bugs by me)
To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/usr.sbin/sysinst/bsddisklabel.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>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.