Jason Staloff on Wed, 5 Jul 2000 14:50:20 -0400 (EDT)


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

Re: [PLUG] copying a complete system to new HD


Thanks for all the help. 

Getting a recursive copy without mangled permissions isn't the problem per se. For ordinary directories, cp -pdr (or cp -a) works fine. But /dev can't be handled that way:

   [root@bug jason]# cp -pdr /dev testdev/
   cp: /dev/adb: Input/output error
   cp: /dev/adbmouse: Resource temporarily unavailable
   cp: /dev/atibm: No such device
   etc...

When I copy everything but /dev to the new drive and try to boot, it starts to boot off the drive but it's unable to initialize a console. (I'm starting the boot with a boot floppy I created using mkbootdisk, as the new HD doesn't have LILO on it yet.)

Tar seems to work: I just tried it on my notebook and I got an archive with my /dev in it. I'll try it on the new drive when I get home.

Point taken about umask, too... thanks. I hadn't thought of that.

Jason


On 5 Jul 2000, Kevin Falcone wrote:

> >>>>> "LB" == Luis Baars <luisbaars@hotmail.com> writes:
> 
>   LB> On Wed, 5 Jul 2000 04:13:11 -0400 (EDT), Bill wrote:
> 
>   >> # cp -a /dirname /mnt/dirname
> 
>   LB> Wouldn't it be better to use tar?  When you use cp, file perms,
>   LB> owners, and groups get all screwed up....don't they?  I would
>   LB> probably use the following command:
> 
> Actually, the -a param to GNU cp causes the following (from man cp)
> 
>        -a, --archive
>               same as -dpR
> 
>        -d, --no-dereference
>               preserve links
> 
>        -p, --preserve
>               preserve file attributes if possible
> 
>        -R, --recursive
>               copy directories recursively
> 
> To me, that looks like it should take care of maintaining
> permissions.  And, as he said in the snipped part, you could unset
> your UMASK, which should prevent permission mangling.
> 
>   LB> # tar cf - /dirname | (cd /mnt/dirname; tar xvf -)
> 
> Which is similar to what I would use.  I think you want a -p in there
> so that you preserve permissions.
> 
> -kevin
> 
> -- 
> Kevin Falcone <kevinfal@seas.upenn.edu>
> 
> "TIMTOWTDI, but did you have to pick the ugliest way you could find?"
>                           -- Michael Carman in comp.lang.perl.misc
> 
> ______________________________________________________________________
> Philadelphia Linux Users Group       -       http://plug.nothinbut.net
> Announcements - http://lists.nothinbut.net/mail/listinfo/plug-announce
> General Discussion   -   http://lists.nothinbut.net/mail/listinfo/plug
> 



______________________________________________________________________
Philadelphia Linux Users Group       -       http://plug.nothinbut.net
Announcements - http://lists.nothinbut.net/mail/listinfo/plug-announce
General Discussion   -   http://lists.nothinbut.net/mail/listinfo/plug