NetBSD Problem Report #47774

From tsutsui@ceres.dti.ne.jp  Sun Apr 28 02:39:35 2013
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 7205663F2EE
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 28 Apr 2013 02:39:35 +0000 (UTC)
Message-Id: <201304280239.r3S2dVcR024657@mirage.localdomain>
Date: Sun, 28 Apr 2013 11:39:31 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@gnats.NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: sysinst(8) should handle ptyfs itself
X-Send-Pr-Version: 3.95

>Number:         47774
>Category:       install
>Synopsis:       sysinst(8) should handle ptyfs itself
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 28 02:40:00 +0000 2013
>Last-Modified:  Mon Apr 29 03:31:25 +0000 2013
>Originator:     Izumi Tsutsui
>Release:        NetBSD 6.0 and -current
>Organization:
>Environment:
System: NetBSD 6.1_RC3 and -current
Architecture: all
Machine: all
>Description:
Since around NetBSD 6.0_RC1, old style pty device nodes
(/dev/[pt]typ0 etc.) has been deprecated and they are
no longer created by the default "MAKEDEV all" target.

On the other hand, sysinst(8) implicitly requires a pseudo tty
during installation, but not all MD installation environments
handle mount_ptyfs(8) or prepare compat pty nodes properly,
as filed in PR/46812 and PR/47123.

Now it turns out hp300 install RAMDISK kernels in netbsd-6-0
and netbsd-6 still have the same issue.
(no "ipty" target in distrib/hp300/ramdisk/Makefile,
 and I'm working on it)

For future releases (i.e. 7.0), we can fix it by
- create old style 'ipty' nodes in *all* possible RAMDISK
- add mount_ptyfs(8) in all possible ramdisk or miniroot
  and mount it in .profile script etc. before sysinst is invoked 
but in that way we have to check a lot of MD installation stuff
that could still be missed as the hp300 case.

To make MD changes minimum, I'd like to make sysinst(8) binary
check /dev/pts and handle mount(MOUNT_PTYFS) op in it
as mount_ptyfs(8) does if openpty(2) fails
http://nxr.netbsd.org/xref/src/sbin/mount_ptyfs/mount_ptyfs.c?r=1.10#210
so that we don't have to sweep all possble MD ramdisk lists and
startup .profile scripts and we can remove old depricated
compat pty stuff in installation environments.

The rest work is to enable "file-system PTYFS" in all possible
MD installation kernels, but we can check it much easier than
messy MD stuff in src/distrib.

See also discussion in PR/46812.

>How-To-Repeat:
See PR/46812 and PR/47123.

>Fix:
Suggested as the above, though we needs more discussion.

>Audit-Trail:
From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47774 CVS commit: src
Date: Sun, 28 Apr 2013 08:08:05 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Sun Apr 28 08:08:04 UTC 2013

 Modified Files:
 	src/distrib/hp300/ramdisk: Makefile
 	src/etc/etc.hp300: MAKEDEV.conf

 Log Message:
 Fix yet another "openpty() failed" error during sysinst.

 Prepare a new entry for ramdisk that includes ipty target in
 etc.hp300/MAKEDEV.conf and use it in distrib/hp300/ramdisk/Makefile.
 See also PR/46812, PR/47123, and PR/47774.

 We could simply add "ipty" to MAKEDEVTARGETS as miniroot/Makefile does,
 but it's better to shrink ramdisk size as much as possible.

 Should be pulled up to both netbsd-6 and netbsd-6-0.


 To generate a diff of this commit:
 cvs rdiff -u -r1.31 -r1.32 src/distrib/hp300/ramdisk/Makefile
 cvs rdiff -u -r1.13 -r1.14 src/etc/etc.hp300/MAKEDEV.conf

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

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47774 CVS commit: [netbsd-6-0] src
Date: Mon, 29 Apr 2013 03:26:35 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Mon Apr 29 03:26:35 UTC 2013

 Modified Files:
 	src/distrib/hp300/ramdisk [netbsd-6-0]: Makefile
 	src/etc/etc.hp300 [netbsd-6-0]: MAKEDEV.conf

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #880):
 	etc/etc.hp300/MAKEDEV.conf: revision 1.14
 	distrib/hp300/ramdisk/Makefile: revision 1.32
 Fix yet another "openpty() failed" error during sysinst.
 Prepare a new entry for ramdisk that includes ipty target in
 etc.hp300/MAKEDEV.conf and use it in distrib/hp300/ramdisk/Makefile.
 See also PR/46812, PR/47123, and PR/47774.
 We could simply add "ipty" to MAKEDEVTARGETS as miniroot/Makefile does,
 but it's better to shrink ramdisk size as much as possible.
 Should be pulled up to both netbsd-6 and netbsd-6-0.


 To generate a diff of this commit:
 cvs rdiff -u -r1.30 -r1.30.14.1 src/distrib/hp300/ramdisk/Makefile
 cvs rdiff -u -r1.13 -r1.13.10.1 src/etc/etc.hp300/MAKEDEV.conf

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

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47774 CVS commit: [netbsd-6] src
Date: Mon, 29 Apr 2013 03:26:52 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Mon Apr 29 03:26:52 UTC 2013

 Modified Files:
 	src/distrib/hp300/ramdisk [netbsd-6]: Makefile
 	src/etc/etc.hp300 [netbsd-6]: MAKEDEV.conf

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #880):
 	etc/etc.hp300/MAKEDEV.conf: revision 1.14
 	distrib/hp300/ramdisk/Makefile: revision 1.32
 Fix yet another "openpty() failed" error during sysinst.
 Prepare a new entry for ramdisk that includes ipty target in
 etc.hp300/MAKEDEV.conf and use it in distrib/hp300/ramdisk/Makefile.
 See also PR/46812, PR/47123, and PR/47774.
 We could simply add "ipty" to MAKEDEVTARGETS as miniroot/Makefile does,
 but it's better to shrink ramdisk size as much as possible.
 Should be pulled up to both netbsd-6 and netbsd-6-0.


 To generate a diff of this commit:
 cvs rdiff -u -r1.30 -r1.30.8.1 src/distrib/hp300/ramdisk/Makefile
 cvs rdiff -u -r1.13 -r1.13.4.1 src/etc/etc.hp300/MAKEDEV.conf

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

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.