cpio v2.5 won't copy links or devices

Using applications, configuring, problems
Post Reply
Message
Author
iscove
Posts: 17
Joined: Fri 30 Dec 2005, 02:49

cpio v2.5 won't copy links or devices

#1 Post by iscove »

In Puppy 3.01 (frugal install on vfat fs), trying to extract initrd.gz to a directory:

# gunzip initrd.gz
# cd tempdir
# cpio -di < ../initrd

The above works, places folders and files in tempdir (vfat fs)
but with lots of error messages e.g. "cpio: bin/wc: Operation not permitted"
on all links to dirs (e.g. -> busybox) and on all /dev items

Anyone have any luck getting this to work?

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

It works fine for me. I use 'cat', as per this page:
http://www.puppylinux.com/download/release-3.01.htm
...but I don't know why that would make any difference.

iscove
Posts: 17
Joined: Fri 30 Dec 2005, 02:49

cpio v2.5 won't copy links or devices

#3 Post by iscove »

No luck with

# cat ../initrd | cpio -d -i

Same result, directory and subdirs created, but cpio returns
a long list of "not permitted" errors for links and devs.

I have not tried this on an ext2 partition, only on vfat.
I am assuming this can not possibly be related to privilege,
I should be root by default, and I get the same result when
explicitly logging on as root.

User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#4 Post by Pizzasgood »

It's the fat partition that's causing your problem. They can't store the permissions and symlink data that Linux filesystems use.

If you put it in your save_file rather than out on the drive itself, it should work. I usually use /tmp.

This is one of the things I see as a big benefit of CPIO archives vs. the filesystem-image: There aren't any issues with using them inside your save-file, since you never mount them.

By the way, you can use zcat ../initrd.gz | cpio -i -d to skip the gunzip initrd.gz step.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]

iscove
Posts: 17
Joined: Fri 30 Dec 2005, 02:49

cpio v2.5 won't copy links or devices

#5 Post by iscove »

thanks, that was it, /tmp works fine

Post Reply