Rony wrote:
Vivek's suggestion for disk cloning should work for you since all your systems are identical. the time taken too will reduce drastically.
Curently I am using one imaging software for this. But it takes long time to copy block by block.
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.
Because of this, I thought that it will be better if I can put kernel direclty into installation CD/DVD by following way: 1. Making an ISO of installation DVD. 2. Mount that ISO on one directory. by using "mount -o loop..." 3. Replace the kernel image which will be in for of RPM. 4. 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.
Please help Neelesh
I'm on Redhat based systems
There are 2 issues here are you trying to replace the boot kernel.... If yes then the kernel is squashfs filesystem which you may have to edit by putting the necessary librarys.
If all you want to do is replace the kernel that is currently being loaded then you can add in the
%post section of your install /usr/src/kernel/linux-2.6.x files (incase u want to tinker with the kernel later this is not recq) /lib/modules/2.6.x (this is what is recq) /boot/initrd-2.6.x.img (this is to boot) /boot/vmlinuz-2.6.23 (this is to boot) /boot/System.map-2.6.x (this is to boot)
Run a sed -i against /mnt/sysimage/boot/grub/grub.conf to insert your new kernel ie this has to be inserted as the first boot kernel.
title Fedora Core (2.6.x) root (hd0,0) # verify what this is on one system kernel /vmlinuz-2.6.x ro root=LABEL=/ rhgb quiet initrd /initrd-2.6.x.img
. and your done. do all this on a http install and start your systems with a pxeboot .... dd to about 10 systems will take a hell of a lot of time and thats the reason a ks file can be used and created.
Derwyn
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.
On Nov 21, 2007 10:21 AM, Neelesh Gurjar neel.hjs@gmail.com wrote:
Rony wrote:
Vivek's suggestion for disk cloning should work for you since all your systems are identical. the time taken too will reduce drastically.
Curently I am using one imaging software for this. But it takes long time to copy block by block.
G4L is not slow, i have used it to install a batch of 50 pcs in one go. Works very well.
regards VK