Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating a bootable usb as a cloned partition and am running into problems copying /proc to the usb.

I know /proc contains a lot of virtual files, but I'm not sure how to copy them over. It seems that if I use cp it doesn't treat them as virtual files. So with large virtual files like kcore it uses all the usbs disk space right away. However if I try and boot with just the folders created, it fails.

What would be the best way to copy them over and still keep them as virtual files? Or, what are the minimal files I can copy to the usb to allow it to boot?

The distro is fedora 12.

I should mention the process I'm using:

  1. create partitions on usb to match the installation you want to clone
  2. copy the files from the installation to the usb partitions
  3. install bootloader on the boot partition (grub)

Everything has gone fine so far except for copying /proc. I've done this before and haven't had this problem until now.

share|improve this question
up vote 4 down vote accepted

You cannot and must not copy files in /proc, or /sys. Generally speaking, you need to arrange to copy only the disk-backed files.

The files under /proc and /sys are generated by the kernel on the fly when you read them. Their contents provides information about the running system. For example, /proc/1234 is a directory where you can read information about the process with PID 1234 (if there is a running process with this PID). There is no data to copy to a disk here. For more information, read What happens when I open and read from /proc? and perhaps also deleting a 'file' under /proc or /dev.

To copy a whole filesystem under Linux, use cp -x.

share|improve this answer
You also want to leave out /dev for the same reason. – psusi Jan 17 '12 at 18:48

You can't just copy an installed operating system to a usb and expect it to boot. Check out this page, which describes how to create and use Live USB.

The /proc directory contains files about system information and running processes, which you don't have to copy. They are generated by the kernel at boot time and during operation. Type "man 5 proc" into the command line to get more info.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.