On Wednesday 21 November 2007 10:21, Neelesh Gurjar wrote:
jtd wrote:
connect two drives in a linux machine dd if=<your master drive> of=<your slave drive>. next put the newly cloned slave as master in another machine aand add yet another slave drive.
I think same problem will come in this also. It will take much time for block by block copy.
It will take time. Raw block copy is slooo
Because of this, I thought that it will be better if I can put kernel direclty into installation CD/DVD by following way:
- Making an ISO of installation DVD.
- Mount that ISO on one directory. by using "mount -o loop..."
- Replace the kernel image which will be in for of RPM.
- I think then I may need to change some xml files or something
like that. 5. And reburn that ISO on DVD.
But here I dont know how to replace that kernel and which files need to change so that while installing Yast or in Fedora Anaconda will use new kernel RPM.
If you are doing a fresh install, my second script suggestion is very very fast as it skips empty blocks. In fact a full debian install takes about 10 minutes on ata66 ide (about 1.6gb). Way faster than a full install. also lets you customiz any thing you want. You can also use dd with the count and skip options to copy only the written portions. I use plain old dd cause even if it takes all night i dont care.
Here is what u could do
make a small script like below bzip all dirs of your master use --exclude to exclude the bz2 file you are creating and make one file per partition. sfdisk /dev/hda -O hdd-partition-sectors.save # your master partitio table sfdisk /dev/hdc -I hdd-partition-sectors.save # your slave with master partiton table pasted dd if=/dev/hda of=~/mbr-of-master.bin count=1 # mbr of master dd if=~/mbr-of-master.bin of=/dev/hdc # mbr of master now plastered on slave mkfs.jfs /dev/hdc? #create fs on partitions mkfs.jfs /dev/hdc? #create some more fs on more partitions etc mkdir /hdslave # create partitions to mount the slaves mount /dev/hdc1 /hdcslave cd /hdc1 tar -jxvf yourfile-say-/ # all files that were on hda1 umount /hdslave mount /dev/hdc2 /hdcslave tar -jxvf yourfile-say-/opt # all files that were on hda2 repeat for all partitions
etc. Will take an hr or 2 initially but will serve your purpose well.
If you dont have a network, script or dd are workable options. You can create a livecd of a debian install and use that too.
Merely putting your kernel on the cd then manually installing 50 machines is most certainly not the right way. Too much time, prone to errors and worst waste YOUR time.