Security Consulting
  Unix Administration     Firewall     Intrusion Detection     Network Security     Hacking     MORE     HOME    

Clone Systems

The 2 HDD in one System Approach

  • master disk: /dev/hda
  • clone disk: /dev/hdc
      fdisk  /dev/hdc
  • copy directories to /dev/hdc
      mount /dev/hdc1 /mnt/hdc1
      cd / ; tar cf - boot root bin sbin etc dev lib var usr \
      | ( cd /mnt/hdc1 ; tar xvfp - )
      
  • change specific parameters on the clone (IP, ...)
  • run lilo to make the clone bootable ( i just use a boot floppy to boot the clone )

    The Over the Network Approach

    On the receiver:
      nc -p 6666 -l > file
    or:
      nc -p 6666 -l -v -w 60 < /dev/null | gzip -dc | dd of=/dev/hda bs=512


    On the sender:
      cat data | gzip -c | nc -v -w 120 -p 6666 -l IP
    or:
      dd if=/dev/hda1 bs=512 | gzip -c | nc -v -w 60 IP -p 2020
      

      On a Windows sender:
        dd.exe if:\\.\C: bs=512 | nc.exe a.b.c.d port



      CopyLeft (l) 2003 by Raffael Marty