Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Nov 2004 09:57:02 +0000
From:      Andrew Sinclair <syncman@optusnet.com.au>
To:        kientzle@freebsd.org
Cc:        Kris Kennaway <kris@obsecurity.org>
Subject:   bsdtar needs --ignore-zero & --ignore-failed-read
Message-ID:  <41AAF26E.8090101@optusnet.com.au>

next in thread | raw e-mail | index | archive | help
This follows on from my post to questions@freebsd.org:
    Date: 16th Nov 2004   21:35
    Subject: Re: 5.3-RC2 tar breaks operation with "(null)"

    I've upgraded to 5.3-RC2 in November and have noticed that bsdtar is 
now the standard Tape Archiver. While I do appreciate the simplicity of 
the new interface, it does lack a couple of essential options; in 
particular, those dealing with failed media.

    I found this out when attempting to extract an archive from a CD-RW. 
It had a few bad blocks so the drive just returned blocks of zero where 
these occured. This was enough to stop the extract operation dead in its 
tracks. I copied this to disc with dd and ran the extract operation 
again but it could not read past the corrupt portion. I was able to work 
around it with gtar and the --ignore-zero and --ignore-failed-read 
options but I could not find an equivalent solution for bsdtar.

    My suggestion is to include these options in libarchive and to 
assert --ignore-zero in bsdtar by default on plain files (i.e. those not 
on sequential media, not on a character special device file but on a 
random access file system). In the case of a plain file extracted with 
tar, the complete contents should be read. I'm not aware of any case 
where people typically append anything other than TAR dumps to an 
archive. For other programs (pkg_add), it may be best to leave this 
turned off.


Regards,

    Andrew Sinclair.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41AAF26E.8090101>