Corrupted backup floppies from cpio

Rob Hulsebos hulsebos at philmds.UUCP
Tue Oct 18 18:27:25 AEST 1988


In article <6794 at chinet.chi.il.us> johnk at chinet.chi.il.us (John Kennedy) writes:
>When I went to restore the files, with a cpio -icdumv < /dev/rdsk/0s24,
>the first few disks read okay, but then the "out of phase. get help"
>message appeared.  Apparently the disks were not written correctly.
Yes, I've seen this bug too. Apparently, when 'cpio' writes to its output-
device but gets an error, it just cancels writing the current file without
giving an error, and continues with the next file. But because a header is
already written to floppy, and the file written after the header does not
match the length noted in the header, 'cpio' gets out-of-sync when it reads
the disk back :-(

Tar behaves better in this aspect.
To my humble opinion, 'cpio' should at least give an error-message. As it is 
now, you're required to read back disks written with 'cpio' immediately after
they have been made, unless you're 100% sure that the disks are OK. 

In article <4873 at b-tech.ann-arbor.mi.us> zeeff at b-tech.UUCP (Jon Zeeff) writes:
>You can use the fixcpio program or I believe that you can use afio.
>Sources for both should be available from archive sites.
The best solution would be to fix 'cpio'. 

------------------------------------------------------------------------------
R.A. Hulsebos, Philips I&E Automation Modules       ...!mcvax!philmds!hulsebos
Building TQ-III-1 room 11                                 phone: +31-40-785723
Eindhoven, The Netherlands                         "f77 hello.c; a.out" works!



More information about the Comp.unix.questions mailing list