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

Re: Replacing a new HD



On 20 Jun 2002 20:08:38 -0500
Ron Johnson <ron.l.johnson@cox.net> wrote:

> On Thu, 2002-06-20 at 17:21, csj wrote:
> > On 20 Jun 2002 04:56:41 -0500
> > Ron Johnson <ron.l.johnson@cox.net> wrote:
> > 
> > >  If I copy /boot to /new/boot on /dev/hdc1, and / to /new/treeroot
> > >  on /dev/hdc2, then symlinks like /vmlinuz which are now 
> > >  /new/treeroot/vmlinuz still point back to /dev/hda1 instead of
> > >  automagically pointing to /dev/hdb1.
> > 
> > Why should vmlinuz point back to hda1? It should point back to a file,
> > not a device.
> 
> But files don't exist out in the ether, they exist on devices.  I
> presumed you would understand the general thrust of the paragraph.
> Of course, I meant that it still points back to /boot, but /boot is
> /dev/hda1...  Sometimes being algorithmically specific clutters up 
> the meaning.

I believe I understood your original meaning. The example link vmlinuz
won't point to /boot, but to boot (no slash). /boot is absolute, boot
(without the slash) isn't.

> cp may break the link, but tar does not.

The link will break if the filesystem is not mounted properly as /. You
snipped out my example. For soft links cp -auv should yield the same
results as tar.

>From cp --help:
  -a, --archive                same as -dpR
  -d, --no-dereference         never follow symbolic links
  -p, --preserve               preserve file attributes if possible
  -R, --recursive              copy directories recursively

Add this special caveat:
  -r                           copy recursively, non-directories as files
                                 WARNING: use -R instead when you might copy
                                 special files like FIFOs or /dev/zero

>From the above I get the impression that cp -a can be used to copy
devices (/dev/zero).


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: