[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: moving the root partition (esp. /dev)



Ok, thanks to you guys I got it working. If you're interested, here's what happened (I
think). The first time I tried to copy all of the root partition using -axR. This was
working until it got to one of the bttv (brooktree tv card) dev files. I think that
because the card was in use (but it could be my own incompetence), it started copying
data from the card. After I noticed this file at hundreds of megabytes, I cntrl-c'd
the copy.  I guess in subsequent tries, I left out the -a. So Pete, you were right and
"cp is smart about device files".

Thanks again,

John Paul

Pete Harlan wrote:

> > -r was a typo. I meant -R for recursive. It still won't copy the devices in /dev.
>
> Well then I'm not much help, am I?  :)
>
> I use cp -a all the time to copy /dev directories.  Do you do anything
> 'funny' (e.g., use devfs for your device files)?  I've never had a
> problem with 'cp -a' since I stoped using '-r' myself...
>
> Are you sure you didn't make the same typo when you ran the command?
> Are you sure you're not running out of disk space?  (I'm not trying to
> insult you, I just have this deep-rooted conviction that cp is smart
> about device files.)
>
> If you're in a time crunch and don't feel like figuring this out so
> much as you do copying a directory, you ought to be able to use tar to
> do it
>
>   ( cd /dev; tar cpf - ) | ( cd /mnt/dev; tar xpf - )
>
> ought to work, though it's clumsier than using cp.
>
> --
> Pete Harlan
> harlan@pointofchoice.com


Reply to: