Add new comment

Submitted by Anonymous (not registered) on Sun, 2005-11-13 21:42.

in case it's useful, a simpler way to duplicate the partitions from /dev/hda to /dev/hdc is the following:

sfdisk -d /dev/hda | sfdisk /dev/hdc

or in two steps:

sfdisk -d /dev/hda >hda.txt

sfdisk /dev/hdc <hda.txt

as for copying, i like to mount both the source and dest fs's in subdirectories of /mnt - avoids having to worry about not copying stuff like /proc - and then use rsync. something like this:

cd /mnt

mkdir sys1 sys2

mount /dev/hda1 sys1

mount /dev/hda5 sys1/usr

mount /dev/hda6 sys1/var

mount /dev/hda9 sys1/home

mount /dev/hdc1 sys2

mkdir sys2/usr sys2/var sys2/home

mount /dev/hdc5 sys2/usr

mount /dev/hdc6 sys2/var

mount /dev/hdc9 sys2/home

rsync -avuSHl --delete sys1/ sys2

the "/" after "sys1/" in the above matters. you can add a "-n" to the above and pipe it into less if you want to preview what it'll do.

ya gotta love 'nix - so many ways to get stuff done.

regards,

al

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.