Difference between revisions of "Install Over Net HowTo"


From Knoppix Documentation Wiki
Jump to: navigation, search
m
 
m (Optimizing:)
Line 40: Line 40:
 
This solution has the following pros compared to the one above:
 
This solution has the following pros compared to the one above:
  
*More efficient due to using "buffer"
+
*More efficient due to using "buffer". (You can experiment using gzip or nc or both).
* Durch den Einsatz von "buffer" höherer Durchsatz. (Man kann auch
+
*Normally "gzip -9 is used due to high compression.
: damit experimentieren, den "buffer" zwischen gzip und nc einzusetzen, oder
+
*With "-w 10" on the server the data is constructed. It is not necessary to use xload: or similar for checking.
: beides.)
+
* Normalerweise wird "gzip -9" zum Engpass.  Diese hohe Komprimierung
+
: ist übertrieben.
+
* Durch das "-w 10" auf dem Server baut sich die Sache auf beiden Seiten
+
: ab, wenn alle Daten übertragen sind. Es ist nicht nötig, hier mit xload
+
: oder ähnlichem zu beobachten.
+
  
 +
*With 3 targetcomputers 192.168.0.18 to 192.168.0.20, I would start by using the same commands on each targetcomputer, then do on the server:
 +
**cd /tmp
 +
**mknod pipe1 p; nc -v -v -w 10 192.168.0.18 5030 < pipe1 ~&
 +
**mknod pipe2 p; nc -v -v -w 10 192.168.0.19 5030 < pipe2 ~&
 +
**buffer -m 1m < /dev/hda | gzip -2 | buffer -m 1m ~|
 +
**tee pipe1 | tee pipe2 | nc -v -v -w 10 192.168.0.20 5030
  
Hätte ich drei Zielrechner 192.168.0.18 bis 192.168.0.20, so würde ich auf jedem Zielrechner dasselbe machen wie oben, danach aber auf dem  Server folgendes tun:
+
The trick here is that by the "named pipes" the hard disk on the server is read only onceThis procedure also works with more than 3 target computers.
 
+
cd /tmp
+
 
+
mknod pipe1 p; nc -v -v -w 10 192.168.0.18 5030 < pipe1 ~&
+
 
+
mknod pipe2 p; nc -v -v -w 10 192.168.0.19 5030 < pipe2 ~&
+
 
+
buffer -m 1m < /dev/hda | gzip -2 | buffer -m 1m ~|
+
 
+
tee pipe1 | tee pipe2 | nc -v -v -w 10 192.168.0.20 5030
+
 
+
Der Trick hier ist, dass durch die "named pipes" die Festplatte auf dem Server nur ein mal gelesen werden mussDieses Verfahren stößt nicht schon bei drei
+
Zielrechnern an seine Grenzen.
+

Revision as of 19:48, 28 December 2004

Cloning a Hard disk install (any OS) over a network:

Because of the simplicity of it and the netboot option, we are able to use Knoppix to clone computers without having to purchase a Norton Ghost license for each system. Here is how I use Knoppix on a daily basis.

We have several computers that are configured identically for the product that we sell. So I start one "set" up. One acts as the knoppix boot server and the others net boot off of it. Then I connect a long ethernet cable to a "fresh" set that has not had the OS or our special software loaded yet and net boot them off of the knoppix server.

Then one by one I execute a command like this to clone them.

  • On the machine I want to copy from:
    • Open 2 root windows
    • start xload on one of them
    • cat /dev/hda | gzip -9 | nc -l -p 5030
  • On the machine I copy to:
    • nc 192.168.0.1 5030 | gunzip > /dev/hda (192.168.0.1 is the ip of whatever machine I am cloning)

When the xload drops down to zero, then I know it is done. I can typically start about 2 or 3 clients to copy them.

For Windows 9x systems. I do a format c: /s from dos and then untar a tarred backup that I made using knoppix.

Since Knoppix auto configures the hardware, I don't have to mess with making boot floppies or keeping track of them.

Optimizing:

I often do such things although the above also works. The following is faster though:

  • First find out the IP of the targetcomputer:
    • ifconfig -a
  • Then
    • echo Data is being transferred | nc -v -v -l -p 5030 | gunzip ~| buffer -m 1m > /dev/hda
  • While it's waiting, on the Server:
    • buffer -m 1m < /dev/hda | gzip -2 | nc -v -v -w 10 192.168.0.17 5030

(Where 192.168.0.17 is the IP of the targetcomputer.)


This solution has the following pros compared to the one above:

  • More efficient due to using "buffer". (You can experiment using gzip or nc or both).
  • Normally "gzip -9 is used due to high compression.
  • With "-w 10" on the server the data is constructed. It is not necessary to use xload: or similar for checking.
  • With 3 targetcomputers 192.168.0.18 to 192.168.0.20, I would start by using the same commands on each targetcomputer, then do on the server:
    • cd /tmp
    • mknod pipe1 p; nc -v -v -w 10 192.168.0.18 5030 < pipe1 ~&
    • mknod pipe2 p; nc -v -v -w 10 192.168.0.19 5030 < pipe2 ~&
    • buffer -m 1m < /dev/hda | gzip -2 | buffer -m 1m ~|
    • tee pipe1 | tee pipe2 | nc -v -v -w 10 192.168.0.20 5030

The trick here is that by the "named pipes" the hard disk on the server is read only once. This procedure also works with more than 3 target computers.