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

Re: Using dd to copy a disk.



On Tue, 2003-07-29 at 02:26, Ron Johnson wrote:
--snip--
> So you have 
> /dev/hda1  /
> /dev/hda2  /usr
> /dev/hda3  /var
> 
> that you want to clone to /dev/hdc1, /dev/hdc2, /dev/hdc3.
> 
> You must mount, the hdc partitions, as, for example:
> /backup/hdc/1
> /backup/hdc/2
> /backup/hdc/3
> 
> Thus, when you copy files from hda to hdc, any absolute symlinks,
> or symlinks which have relative references that go "up and then
> down", will remain pointed back to their original files on hda.
> 
> Symlinks that have multiple redirections (with mixtures of relative
> and absolute to make things even messier) also must be considered.

Taking the above scenario and using my previous gcc example with gcc
being a symlink, and gcc-3.2 being the actual file:

/dev/hda1 /usr/bin/gcc -> gcc-3.2
/dev/hdc1 /backup/hdc/1/usr/bin/gcc -> gcc-3.2 - this one is ok

/dev/hda1 /usr/bin/gcc -> /usr/bin/gcc-3.2
/dev/hdc1 /backup/hdc/1/usr/bin/gcc -> /usr/bin/gcc-3.2 - this one isn't

Shut down the machine, swap drives, or just move the drive to the new
machine (as I believe the OP intended to do) and mount /dev/hdc1 as /.

/dev/hdc1 /usr/bin/gcc -> /usr/bin/gcc-3.2 - Now we're ok again.

Unless the idea is to keep /dev/hdc1 mounted as a backup drive (e.g.
/backup/hdc/1) in which case the symlink considerations come in handy.
:)

-- 
Alex Malinovich
Support Free Software, delete your Windows partition TODAY!
Encrypted mail preferred. You can get my public key from any of the
pgp.net keyservers. Key ID: A6D24837

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: