LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   Master image replication? (https://www.linuxquestions.org/questions/mandriva-30/master-image-replication-369765/)

rbonafied 10-04-2005 03:27 PM

Master image replication?
 
Hi,

I'm not sure what to search for...so...I'll just post my question in the hopes it triggers useful links and such.


I have a need to place a mandriva image on about 25 laptops. Some of the laptops have a 12Gig disk and others have around 24Gig. Some are compaq m700's and others are different.


Is it possible to create 1 master image and lay this down on all 25 laptops? What's the best way to do this? (dd?, tar?, something else?)

I was thinking of picking the laptop with the smallest disk, place all the packages I need on there and tar'ing/untar'ing to the destination laptops. Then boot up each laptop and adjust the mbr if necessary. (I'm grasping here :) )


thanks!

free_ouyo 10-04-2005 04:08 PM

Master image replication?
 
Hello,

You can use DD image of a installed HD and restore it on the others computers but you may have some problems with hardware changes.
I recommand 1 master image for each computer type => 2 or 3 master images to restore on the differents computer.
This can be done with a boot cd.

image creation
dd if=/dev/hda conv=noerror,sync | pv >> /mnt/destination/my_master_compaq.dd
dd if=/dev/hda conv=noerror,sync | pv >> /mnt/destination/my_master_acer.dd

image restore
dd if=/mnt/source/my_master_compaq.dd conv=noerror,sync | pv > /dev/hda
dd if=/mnt/source/my_master_acer.dd conv=noerror,sync | pv > /dev/hda
--
free_ouyo

tkedwards 10-04-2005 06:34 PM

Boot off a PCLinuxOS or Knoppix livecd and use partimage, it has built in network support.

rbonafied 10-04-2005 08:51 PM

Thanks!

Just to be clear...in either option suggested so far I need either network connectivity, some external hard drive to write to, or some way to burn the image to a cd/dvd? Is that right?


So if PC1 is the master image, I would boot PC2 using knoppix or something and read the image on PC1 over the network

or

Write the image from PC1 to an external hard drive and then mount that hard drive to PC2 using knoppix.


If I wanted to do the DVD option (and assuming I can fit the image there), is there a way to make a bootable dvd that writes the image to PC2?

@free_ouyo, what is the 'pv' command?

tkedwards 10-04-2005 08:58 PM

Quote:

So if PC1 is the master image, I would boot PC2 using knoppix or something and read the image on PC1 over the network
Yes. You would actually also need to run partimage on the PC1 to act as the server for PC2 to connect to.

Quote:

Write the image from PC1 to an external hard drive and then mount that hard drive to PC2 using knoppix.
Yes that would also work.

Quote:

If I wanted to do the DVD option (and assuming I can fit the image there), is there a way to make a bootable dvd that writes the image to PC2?
Hmm, I don't know how you'd do that. You'd first need to find a highly-customisable LiveCD that lets you control the boot process, ie. you'd have to effectively make your own LiveCD distro.

free_ouyo 10-05-2005 02:09 AM

Master image replication?
 
Hello,

>Just to be clear...in either option suggested so far I need either network connectivity, some external hard drive to write to, or some way to burn the image to a cd/dvd? Is that right?
The solution are :
- HD PC1 -> network -> HD PC2
- HD PC1 -> dd image external HD -> HD PC2
- HD PC1 -> dd.gz on boot DVD -> HD PC2

I recommend the second, so you have a backup of the master image.
You can use the network solution in combinaison with second.

>So if PC1 is the master image, I would boot PC2 using knoppix or something and read the image on PC1 over the network
Yes, you can do it with 'netcat' listening on destination computer

>Write the image from PC1 to an external hard drive and then mount that hard drive to PC2 using knoppix.
Yes, it's a other solution

>If I wanted to do the DVD option (and assuming I can fit the image there), is there a way to make a bootable dvd that writes the image to PC2?
You can take a little boot cd iso (knoppix is good) and use growisofs to add the HD image (dd.gz : compressed to reduce space) to the iso.
With Knoppix you can use a little file 'knoppix.sh' to run automaticly on boot.
It's a good solution I used but here it's a very short introduction. I will try to post a longer description of the methode to night.

>@free_ouyo, what is the 'pv' command?
pv is for "monitor the progress of data through a pipe"
--
free_ouyo

free_ouyo 10-05-2005 03:09 PM

Master image replication?
 
Here some explanations about the suggestions.

I assume we are using a live boot cd like knoppix 3.9 or 'fccu boot cd' (www.d-fence.be)

1. Network install
On the destination computer (IP 192.168.0.2) :
netcat -l -p 2020 | gunzip | pv > /dev/hda
The system is listening on prot 2020, gunzip the received data and write to /dev/hda

On the master PC Master PC (IP 192.168.0.1) :
dd if=/dev/hda conv=noerror,sync | pv | gzip --fast | netcat -w 5 192.168.0.2 2020
We read from the HD (/dev/hda), compress the datas to speed up connection and send to IP on port 2020.

2. Boot CD
First, create a dd.gz image of the master HD on external HD or other HD.
dd if=/dev/hda conv=noerror,sync | pv | gzip --fast >> /mnt/destination/my_master.dd.gz

Now, it's possible to restore from the external HD to other computer with :
dd if=/mnt/source/my_master.dd.gz | gunzip | pv > /dev/hda

If you have the iso image of a boot cd, a dvd writer and a small dd.gz image (max 3.5Gb) then, it's possible try to make a boot cd with aut
omatic restore. This should work with a Knoppix based boot cd :
growisofs -M my_boot_cd.iso -R -J /my_master.dd.gz (add 'my_master.dd.gz' to iso image)

After cd boot, the image is accesible in "/cdrom/my_master.dd.gz"
It's also possible to create a little knoppix.sh script to automatically restore to hda but it's a other way to do it.

I hope this can help, if you need more infos, you can mail me.
--
free_ouyo


All times are GMT -5. The time now is 01:02 AM.