tar error unrecoverable?
Curt Tresenriter
ctres at grics.net
Fri Jan 24 22:12:27 UTC 2014
On Sat, 25 Jan 2014 08:37:28 +1100
Karl Auer <kauer at biplane.com.au> wrote:
> On Fri, 2014-01-24 at 15:13 -0600, Curt Tresenriter wrote:
> > > >> > I'm trying to unpack a tar.bz2 file that is failing.
> > As I said in my first post, it occurred when I tried to unpack it.
> > As I said in reply to your suggestion, it happened when I tried to
> > copy it to another hard disc.
>
> If you cannot copy it then the problem is with the physical copy on
> disk, not the data in the file.
>
> If you can copy it, but not uncompress it, then the problem is
> corrupted data in the file.
>
> It sounds as if the problem is with the copy on disk. Don't bother
> trying to untar it until you can uncompress it.
>
> By far the best option is to get another copy of the file, then delete
> the bad copy and check the rest of that disk very carefully, as this
> failure may be evidence of a failing disk.
>
> Make sure your copy (or uncompression) is to a disk formatted with
> support for >2G files. If the file is >2Gb and you are unpacking to
> the same disk this is unlikely to be the problem, but I thought I'd
> mention it. This issue often results in misleading error messages.
>
> You could try using dd (man dd) to copy the file; dd has a "noerror"
> option. You might be lucky.
>
> You could try using bzip2's "-v" option to see if you can get more
> information about the error.
>
> Since your compressed file is quite large, it contains many blocks (a
> standard bzip2 block is around a megabyte in size). You could try
> bzip2recover; you may be able to extract everything except the damaged
> block(s). "man bzip2" has more information.
>
> Regards, K.
>
Thanks for the input, and yours too Colin, I hadn't thought of dd.
I did try bzip2recover. It was going fine until it complained about
the file having more than 50000 blocks.
The message said to increase MAX_HANDLED_BLOCKS
Comments in the code say "... a .bz2 file with > 50000
blocks would have an uncompressed size if at least 40 GB..."
I guess I'll recompile bzip2recover with the new value and see what
happens.
More information about the ubuntu-users
mailing list