NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-sparc/42193: "tar zxpf /dev/rfd0a" used in install script fails



>Number:         42193
>Category:       port-sparc
>Synopsis:       "tar zxpf /dev/rfd0a" used in install script fails
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 17 17:05:00 +0000 2009
>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@localhost:/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@localhost:/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



Home | Main Index | Thread Index | Old Index