Sponsored Content
Full Discussion: CPIO Problem
Special Forums UNIX and Linux Applications CPIO Problem Post 302323549 by nekkro-kvlt on Monday 8th of June 2009 08:51:25 AM
Old 06-08-2009
CPIO Problem

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

Last edited by nekkro-kvlt; 06-08-2009 at 09:57 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cpio

by mistake I deleted all the files in /usr2/symix/users/wfpsys/tpsc/ directory. full backup has taken yesterday using "CPIO" command and I am able to view the files from tape also using cpio command. but i couldn't able to restore back the files. Can you please help me immeditely by giving the... (2 Replies)
Discussion started by: wipro fluid power
2 Replies

2. UNIX for Dummies Questions & Answers

Help with cpio

Hi all, Please help me with the extraction of files from a cpio. what I mean is basically I have received a file from someone i.e rooh.cpio. this file rooh.cpio contains various files in it. I want to know how I can extract the files and copy them to a different directory . Your quick... (2 Replies)
Discussion started by: rooh
2 Replies

3. UNIX for Dummies Questions & Answers

cpio problem

Hi everyone. I'm needing some help with this. I've made some backups on the same tape using cpio. With cpio -civt < /dev/rmt/0un i could see the first backups files, but now i'm getting the next messages <<End of medum on "imput">> <<To continue, type device/file name when ready>>. I... (3 Replies)
Discussion started by: livortiz
3 Replies

4. UNIX for Advanced & Expert Users

CPIO related

i have a cpio.z file containing another cpio file . I want to view the contents of the cpio file inside . How to do it? my parent cpio file invoked with cpio -itv looks some thing like ompmum4 sbadgire> zcat 210_2122_ECP_03.cpio.Z| cpio -itv -rwxr-xr-x 1 20519 20519 761856... (1 Reply)
Discussion started by: rraajjiibb
1 Replies

5. UNIX for Dummies Questions & Answers

cpio

Hello, how can I restore files from a DAT using CPIO ? If I make : # mkdir save # cd /save # cpio -icumvdB </dev/rct0 Does the archive restore only in the directory /save ? And how can I restore a specified file from the DAT with the cpio command ? How can I know the size of the... (2 Replies)
Discussion started by: kok
2 Replies

6. HP-UX

Please help with cpio on HP-UX

Hello all ... I am an Oracle DBA that got stuck in a HP-UX SA role and need some help figuring out a UNIX problem. According to Oracle documentation, I am to issue the following command ... cpio -idcmv <file_name> However when I do, the server just hangs there and does nothing til I... (3 Replies)
Discussion started by: soestx
3 Replies

7. UNIX and Linux Applications

CPIO Problem, copy to the root dir / instead of current dir

HI all, I got a CPIO archive that contains a unix filesystem that I try to extract, but it extract to the root dir / unstead of current dir, and happily it detects my file are newer otherwise it would have overwrited my system's file! I tried all these commands cpio -i --make-directories <... (2 Replies)
Discussion started by: nekkro-kvlt
2 Replies

8. Debian

CPIO with Ubuntu

Hi, i am new here, and i have a question about cpio. i have a scsi traban tape drive, and i will restore some files and directories. Did anybody knows the instructions with cpio? regards Harald (1 Reply)
Discussion started by: gernsemer
1 Replies

9. SCO

Questions about cpio

Should 'cpio' backup only unmounted filesystems? Should a 'cpio' backup file be restored to a mounted device? Can 'cpio' interact with /dev/root, /dev/u, /dev/stand directly? (1 Reply)
Discussion started by: grips03
1 Replies

10. UNIX for Advanced & Expert Users

Cpio - input files (from list) are stored in different order inside cpio archive - why?

Due to budget constraints I have to reinvent an Enterprise backup system in a SPARC (sun4v) Solaris estate (10 & 11). (yep - reinvent wheel, fun but time consuming. Is this wise?! :confused: ) For each filesystem of interest, to try to capture a 'catalog' at the front of each cpio archive (for... (1 Reply)
Discussion started by: am115998
1 Replies
CPIO(1L)																  CPIO(1L)

NAME
cpio - copy files to and from archives SYNOPSIS
cpio {-o|--create} [-0acvABLV] [-C bytes] [-H format] [-M message] [-O [[user@]host:]archive] [-F [[user@]host:]archive] [--file=[[user@]host:]archive] [--format=format] [--message=message] [--null] [--reset-access-time] [--verbose] [--dot] [--append] [--block-size=blocks] [--dereference] [--io-size=bytes] [--quiet] [--force-local] [--rsh-command=command] [--help] [--version] < name-list [> archive] cpio {-i|--extract} [-bcdfmnrtsuvBSV] [-C bytes] [-E file] [-H format] [-M message] [-R [user][:.][group]] [-I [[user@]host:]archive] [-F [[user@]host:]archive] [--file=[[user@]host:]archive] [--make-directories] [--nonmatching] [--preserve-modification-time] [--numeric-uid- gid] [--rename] [-t|--list] [--swap-bytes] [--swap] [--dot] [--unconditional] [--verbose] [--block-size=blocks] [--swap-halfwords] [--io- size=bytes] [--pattern-file=file] [--format=format] [--owner=[user][:.][group]] [--no-preserve-owner] [--message=message] [--force-local] [--no-absolute-filenames] [--sparse] [--only-verify-crc] [--to-stdout] [--quiet] [--rsh-command=command] [--help] [--version] [pattern...] [< archive] cpio {-p|--pass-through} [-0adlmuvLV] [-R [user][:.][group]] [--null] [--reset-access-time] [--make-directories] [--link] [--quiet] [--pre- serve-modification-time] [--unconditional] [--verbose] [--dot] [--dereference] [--owner=[user][:.][group]] [--no-preserve-owner] [--sparse] [--help] [--version] destination-directory < name-list DESCRIPTION
GNU cpio is fully documented in the texinfo documentation. To access the help from your command line, type info cpio The online copy of the documentation is available at the following address: http://www.gnu.org/software/cpio/manual CPIO(1L)
All times are GMT -4. The time now is 01:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy