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
LAPTOP_MODE(8)						      System Manager's Manual						    LAPTOP_MODE(8)

NAME
/usr/sbin/laptop_mode - apply laptop mode settings SYNOPSIS
/usr/sbin/laptop_mode [ cmd ] [ force ] DESCRIPTION
This manual page documents briefly the /usr/sbin/laptop_mode command. laptop_mode is a program that applies the settings given in the /etc/laptop-mode/laptop-mode.conf configuration file. The primary use is to control the laptop mode feature included in Linux kernels with versions 2.6.6 and higher, and 2.4.23 and higher. This feature increases battery life by letting your hard drive spin down. This is achieved by grouping disk write activity into "chunks" that are spaced at larger intervals than they normally would be. In addition to sup- porting the Linux kernel's laptop mode feature, /usr/sbin/laptop_mode also supports various power saving modules which are configured through configuration files in the /etc/laptop-mode/conf.d directory. It is not recommended to call /usr/sbin/laptop_mode directly to start or stop laptop mode, except in hardware event handlers. To apply new configuration settings from laptop-mode.conf, call the laptop-mode service init script with the reload parameter. COMMANDS
Specify force as the second parameter to force laptop_mode to re-apply a state even if the computer is already in that state. These are the values that are allowed for cmd : auto Enable or disable laptop mode based on the current power state. Note that this will not do anything if the laptop-mode service has not been started! status Display a status report about everything that laptop_mode affects. SEE ALSO
laptop-mode.conf(8). AUTHOR
This manual page was written by Bart Samwel (bart@samwel.tk) for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. LAPTOP_MODE(8)
All times are GMT -4. The time now is 01:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy