NetBSD Problem Report #42193

From tsutsui@ceres.dti.ne.jp  Sat Oct 17 17:03:28 2009
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 0ABB463BC1C
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 17 Oct 2009 17:03:28 +0000 (UTC)
Message-Id: <200910171703.n9HH3PVi010373@mirage.ceres.dti.ne.jp>
Date: Sun, 18 Oct 2009 02:03:25 +0900 (JST)
From: 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: "tar zxpf /dev/rfd0a" used in install script fails
X-Send-Pr-Version: 3.95

>Number:         42193
>Category:       port-sparc
>Synopsis:       "tar zxpf /dev/rfd0a" used in install script fails
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    tsutsui
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 17 17:05:00 +0000 2009
>Closed-Date:    Wed Jan 27 21:17:21 +0000 2010
>Last-Modified:  Wed Jan 27 21:17:21 +0000 2010
>Originator:     Izumi Tsutsui
>Release:        NetBSD 4.0
>Organization:
>Environment:
System: NetBSD 4.0
 (probably 5.0 has the same problem, but can't check due to a bug
  mentioned in PR port-sparc/42186)
Architecture: sparc
Machine: SPARCstation 1+

>Description:
sparc installation script tries "tar zxpf /dev/rfd0a" command
to extract miniroot binaries, but gzip -dc against a raw device
seems to fail to decompress (or even read) data.

>How-To-Repeat:
Boot 4.0 boot.fs and try to extract (or print) instfs.tgz
in the second installation floppy by "tar zxvf /dev/rfd0a"
(or "tar ztvf /dev/rfd0a") command.

4.0 netbsd.ram.gz (INSTALL and distrib/utils/x_gzip) doesn't work:
---
NetBSD 4.0 (INSTALL) #0: Sun Dec 16 02:32:37 PST 2007
        builds@wb29:/home/builds/ab/netbsd-4-0-RELEASE/sparc/200712160005Z-obj/home/builds/ab/netbsd-4-0-RELEASE/src/sys/arch/sparc/compile/INSTALL
total memory = 65484 KB
avail memory = 61556 KB

 :

Installation medium to load the additional utilities from: ^C
# tar ztvf /dev/rfd0a
gzip: (stdin): trailing garbage ignored
tar: End of archive volume 1 reached
tar: Sorry, unable to determine archive format.
# gzip -v
gzip: unknown option -- v
NetBSD gzip 20060927
usage: gzip [-123456789cdhltV] [<file> [<file> ...]]
# 
---

while tar ztvf /dev/fd0a (block device) works:
---
# tar ztvf /dev/fd0a  
drwxr-xr-x  2 0        0              0 Dec 16  2007 .
drwxr-xr-x  2 0        0              0 Dec 16  2007 ./bin
-r-xr-xr-x  1 0        0        2045616 Dec 16  2007 ./bin/cat
^C
tar: Signal caught, cleaning up.
tar: ustar vol 1, 3 files, 134029 bytes read, 0 bytes written in 8 secs (16753 bytes/sec)
# 
---

2.0 boot.fs (INSTALL and distrib/utils/x_gzip) doesn't work:
---
NetBSD 2.0 (INSTALL) #0: Thu Dec  2 02:04:41 UTC 2004
        builds@build:/big/builds/ab/netbsd-2-0-RELEASE/sparc/200411300000Z-obj/big/builds/ab/netbsd-2-0-RELEASE/src/sys/arch/sparc/compile/INSTALL
total memory = 65484 KB
avail memory = 61388 KB

 :

Installation medium to load the additional utilities from: ^C
# tar ztvf /dev/rfd0a
gzip: can't read stdin: Invalid argument
tar: End of archive volume 1 reached
tar: Unexpected EOF on archive file
tar: Sorry, unable to determine archive format.
# gzip --version
gzip: unknown option -- -
NetBSD gzip 20040711
usage: gzip [-cdhHltV123456789] [<file> [<file> ...]]
# 
---

2.0 miniroot (GENERIC and usr.bin/gzip, where it appeared first time,
based on distrib/utils/x_gzip) doesn't work:
---
NetBSD 2.0 (GENERIC) #0: Thu Dec  2 01:57:30 UTC 2004
        builds@build:/big/builds/ab/netbsd-2-0-RELEASE/sparc/200411300000Z-obj/big/builds/ab/netbsd-2-0-RELEASE/src/sys/arch/sparc/compile/GENERIC
total memory = 65484 KB
avail memory = 60008 KB

 :

(I)nstall/Upgrade, (H)alt or (S)hell? s
# tar ztvf /dev/rfd0a
gzip: can't read stdin: Invalid argument
tar: End of archive volume 1 reached
tar: Unexpected EOF on archive file
tar: Sorry, unable to determine archive format.
# gzip --version
NetBSD gzip 20040711
#
---

1.6 boot.fs (INSTALL and distrib/utils/x_gzip) works:
---
NetBSD 1.6 (INSTALL) #0: Mon Sep  9 08:43:56 UTC 2002
    autobuild@tgm.daemon.org:/autobuild/sparc/OBJ/autobuild/src/sys/arch/sparc/compile/INSTALL
total memory = 65484 KB
avail memory = 61236 KB

 :

Installation medium to load the additional utilities from: ^C
# tar ztvf /dev/rfd0a
drwxr-xr-x  2 0        0              0 Dec 16  2007 .
drwxr-xr-x  2 0        0              0 Dec 16  2007 ./bin
-r-xr-xr-x  1 0        0        2045616 Dec 16  2007 ./bin/cat
^C
tar: Signal caught, cleaning up.
tar: ustar vol 1, 3 files, 102400 bytes read, 0 bytes written in 4 secs (25600 bytes/sec)
# gzip -V
NetBSD gzip 1.0
# 
---

1.6 miniroot (GENERIC and gnu/usr.bin/gzip) works:
---
NetBSD 1.6 (GENERIC) #0: Mon Sep  9 08:27:06 UTC 2002
    autobuild@tgm.daemon.org:/autobuild/sparc/OBJ/autobuild/src/sys/arch/sparc/compile/GENERIC
total memory = 65484 KB
avail memory = 60284 KB

 :

(I)nstall/Upgrade, (H)alt or (S)hell? s
# tar ztvf /dev/rfd0a
drwxr-xr-x  2 root     wheel          0 Dec 16  2007 .
drwxr-xr-x  2 root     wheel          0 Dec 16  2007 ./bin
-r-xr-xr-x  1 root     wheel    2045616 Dec 16  2007 ./bin/cat
^C
tar: Signal caught, cleaning up.
tar: ustar vol 1, 3 files, 131072 bytes read, 0 bytes written in 6 secs (21845 bytes/sec)
# gzip --version
gzip 1.2.4 (18 Aug 93)
Compilation options:
DIRENT UTIME STDC_HEADERS HAVE_UNISTD_H 
# 
---

>Fix:
- fix usr.bin/gzip to handle it properly
- use "dd if=/dev/rfd0a | tar zxpf -" in the script
- use block device by default in the script
- abandon whole the old installation method and implement ustarfs based
  install floppies even in old release branches
etc?
---
Izumi Tsutsui

>Release-Note:

>Audit-Trail:
From: Izumi Tsutsui <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/42193 CVS commit: src/distrib/sparc/ramdisk
Date: Thu, 24 Dec 2009 14:56:14 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Thu Dec 24 14:56:14 UTC 2009

 Modified Files:
 	src/distrib/sparc/ramdisk: dot.profile

 Log Message:
 Use /dev/fd0a rather than /dev/rfd0a to read instfs.tgz image from floppy.
 It looks newer (appearred after 1.6) gzip tries to read less than DEV_BSIZE
 (to check header?) so we can't use raw device directly.
 (note sparc bootfs ramdisk doesn't have dd(1))

 Workaround for PR port-sparc/42193, and would also fix PR install/28734.


 To generate a diff of this commit:
 cvs rdiff -u -r1.19 -r1.20 src/distrib/sparc/ramdisk/dot.profile

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

Responsible-Changed-From-To: port-sparc-maintainer->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Fri, 25 Dec 2009 00:30:29 +0900
Responsible-Changed-Why:


State-Changed-From-To: open->pending-pullups
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Fri, 25 Dec 2009 00:30:29 +0900
State-Changed-Why:
All netbsd-4 and netbsd-5 branches should have this fix.


From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/42193 CVS commit: [netbsd-5] src
Date: Sat, 23 Jan 2010 17:47:37 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Sat Jan 23 17:47:37 UTC 2010

 Modified Files:
 	src/distrib/sparc/miniroot [netbsd-5]: Makefile.inc
 	src/distrib/sparc/ramdisk [netbsd-5]: dot.profile
 	src/sys/arch/sparc/dev [netbsd-5]: audioamd.c fd.c
 	src/sys/arch/sparc/sparc [netbsd-5]: auxreg.h
 	src/sys/arch/sparc/stand/common [netbsd-5]: promdev.c

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #1251):
 	sys/arch/sparc/sparc/auxreg.h: revision 1.13
 	distrib/sparc/ramdisk/dot.profile: revision 1.20
 	sys/arch/sparc/dev/audioamd.c: revision 1.25
 	sys/arch/sparc/dev/fd.c: revision 1.147
 	sys/arch/sparc/stand/common/promdev.c: revision 1.23
 	distrib/sparc/miniroot/Makefile.inc: revision 1.16
 Build miniroot binaries for sparc with -Os to shrink instfs.tgz
 for the second boot floppy which use miniroot objects.
 This is workaround for PR install/42146, and ok'ed by mrg@.
 Don't try to read disklabel to check FS_RAID on floppy boot since
 reopening floppy could cause Data Access Exception later.
 Fixes PR port-sparc/42186, ok'ed by mrg@.
 Disable "fast trap" handlers which invoke software interrupts
 in sparc/amd7930intr.s and sparc/bsd_fdintr.s until they are
 rewritten to adapt new MI softint(9) API.
 No particular comments on PR port-sparc/42192, but
 this fixes timeout problem on floppy access on my SPARCstation 1+.
 XXX: floppy support on sun4m seems to have another problem (data overrun).
 Use /dev/fd0a rather than /dev/rfd0a to read instfs.tgz image from floppy.
 It looks newer (appearred after 1.6) gzip tries to read less than DEV_BSIZE
 (to check header?) so we can't use raw device directly.
 (note sparc bootfs ramdisk doesn't have dd(1))
 Workaround for PR port-sparc/42193, and would also fix PR install/28734.
 Explicitly clear AUXIO4M_FTC bit in FTC_FLIP macro used on
 pseudo-dma for floppy, as well as AUXIO4C_FTC bit for sun4c.
 A comment in the macro says AUXIO4M_FTC bit is auto-clear,
 but my two SS20s (including compatible) with 150MHz hyperSPARCs
 get data_overrun without it, and no bad side effect on SS5
 (works with and without this change).
 Closes PR port-sparc/42516, which is the last one of a bunch of
 floppy issue on NetBSD/sparc since NetBSD 2.0 days. See
 http://mail-index.NetBSD.org/port-sparc/2009/12/20/msg000484.html
 for details.


 To generate a diff of this commit:
 cvs rdiff -u -r1.12 -r1.12.34.1 src/distrib/sparc/miniroot/Makefile.inc
 cvs rdiff -u -r1.19 -r1.19.4.1 src/distrib/sparc/ramdisk/dot.profile
 cvs rdiff -u -r1.23 -r1.23.28.1 src/sys/arch/sparc/dev/audioamd.c
 cvs rdiff -u -r1.141 -r1.141.6.1 src/sys/arch/sparc/dev/fd.c
 cvs rdiff -u -r1.12 -r1.12.88.1 src/sys/arch/sparc/sparc/auxreg.h
 cvs rdiff -u -r1.21 -r1.21.14.1 src/sys/arch/sparc/stand/common/promdev.c

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

From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/42193 CVS commit: [netbsd-4] src
Date: Wed, 27 Jan 2010 20:59:47 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Wed Jan 27 20:59:46 UTC 2010

 Modified Files:
 	src/distrib/sparc/ramdisk [netbsd-4]: dot.profile
 	src/sys/arch/sparc/sparc [netbsd-4]: auxreg.h
 	src/sys/arch/sparc/stand/common [netbsd-4]: promdev.c

 Log Message:
 Pull up following revision(s) (requested by tsutsui in ticket #1379):
 	sys/arch/sparc/sparc/auxreg.h: revision 1.13
 	distrib/sparc/ramdisk/dot.profile: revision 1.20
 	sys/arch/sparc/stand/common/promdev.c: revision 1.23
 Don't try to read disklabel to check FS_RAID on floppy boot since
 reopening floppy could cause Data Access Exception later.
 Fixes PR port-sparc/42186, ok'ed by mrg@.
 Use /dev/fd0a rather than /dev/rfd0a to read instfs.tgz image from floppy.
 It looks newer (appearred after 1.6) gzip tries to read less than DEV_BSIZE
 (to check header?) so we can't use raw device directly.
 (note sparc bootfs ramdisk doesn't have dd(1))
 Workaround for PR port-sparc/42193, and would also fix PR install/28734.
 Explicitly clear AUXIO4M_FTC bit in FTC_FLIP macro used on
 pseudo-dma for floppy, as well as AUXIO4C_FTC bit for sun4c.
 A comment in the macro says AUXIO4M_FTC bit is auto-clear,
 but my two SS20s (including compatible) with 150MHz hyperSPARCs
 get data_overrun without it, and no bad side effect on SS5
 (works with and without this change).
 Closes PR port-sparc/42516, which is the last one of a bunch of
 floppy issue on NetBSD/sparc since NetBSD 2.0 days. See
 http://mail-index.NetBSD.org/port-sparc/2009/12/20/msg000484.html
 for details.


 To generate a diff of this commit:
 cvs rdiff -u -r1.18 -r1.18.16.1 src/distrib/sparc/ramdisk/dot.profile
 cvs rdiff -u -r1.12 -r1.12.24.1 src/sys/arch/sparc/sparc/auxreg.h
 cvs rdiff -u -r1.20.8.1 -r1.20.8.2 src/sys/arch/sparc/stand/common/promdev.c

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

State-Changed-From-To: pending-pullups->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Wed, 27 Jan 2010 21:17:21 +0000
State-Changed-Why:
Pulled up.


>Unformatted:

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.