Hi all, I have a trouble with CPIO:
I have a file called asa802. I extract it with the following command:
Quote:
bastien@bastien-laptop:~/asaemu/asa802-k8_1$ cd uncompressed/
bastien@bastien-laptop:~/asaemu/asa802-k8_1/uncompressed$ rm -rf *
bastien@bastien-laptop:~/asaemu/asa802-k8_1/uncompressed$ cpio -id --no-absolute-filenames < ../asa802
Then I tried to rebuild archive:
Quote:
bastien@bastien-laptop:~/asaemu/asa802-k8_1/uncompressed$ find . | cpio -o > asa802_cpio
61020 blocks
bastien@bastien-laptop:~/asaemu/asa802-k8_1$ ls -la
total 157924
drwx------ 3 bastien bastien 4096 2009-06-08 14:36 .
drwxr-xr-x 5 bastien bastien 4096 2009-06-08 14:16 ..
-rw-r--r-- 1 bastien bastien 31251968 2009-06-08 14:18 asa802
-rw-r--r-- 1 bastien bastien 31242240 2009-06-08 14:36 asa802_cpio
drwxr-xr-x 12 bastien bastien 4096 2009-06-08 14:34 uncompressed
Filesizes are not identical !
As I saw these messages:
Quote:
pio: dev/ram0: Cannot mknod: Opération non permise
cpio: dev/mem: Cannot mknod: Opération non permise
cpio: dev/kmem: Cannot mknod: Opération non permise
cpio: dev/null: Cannot mknod: Opération non permise
cpio: dev/port: Cannot mknod: Opération non permise
cpio: dev/hda: Cannot mknod: Opération non permise
...
I tried:
Quote:
bastien@bastien-laptop:~/asaemu/asa802-k8_1$ cd uncompressed/
bastien@bastien-laptop:~/asaemu/asa802-k8_1/uncompressed$ rm -rf *
bastien@bastien-laptop:~/asaemu/asa802-k8_1/uncompressed$ sudo cpio -id --no-absolute-filenames < ../asa802
And messages disappears, but filesizes are still not identical
Tried also without the -h newc parameter, but same problem.
Do you know why ? The problem is not that the archive has a different size, but when I boot with the original archive (it's a unix FS, i boot it with QEmu), it works, and the second case got an error. I think it's maybe I extract with --no-absolutes-filenames, and when I zip it again, the filenames are wrong, but how should I fix it, as I can't extract it in my FS, it would overwrite some of my system files :s
Thanks for your help