LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 10-04-2005, 04:27 PM   #1
rbonafied
Member
 
Registered: Nov 2003
Location: Delaware
Distribution: Mandriva 2007
Posts: 50

Rep: Reputation: 15
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!
 
Old 10-04-2005, 05:08 PM   #2
free_ouyo
Member
 
Registered: Mar 2004
Location: Belgium
Distribution: Ubuntu
Posts: 133

Rep: Reputation: 15
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
 
Old 10-04-2005, 07:34 PM   #3
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Boot off a PCLinuxOS or Knoppix livecd and use partimage, it has built in network support.
 
Old 10-04-2005, 09:51 PM   #4
rbonafied
Member
 
Registered: Nov 2003
Location: Delaware
Distribution: Mandriva 2007
Posts: 50

Original Poster
Rep: Reputation: 15
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?
 
Old 10-04-2005, 09:58 PM   #5
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
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.
 
Old 10-05-2005, 03:09 AM   #6
free_ouyo
Member
 
Registered: Mar 2004
Location: Belgium
Distribution: Ubuntu
Posts: 133

Rep: Reputation: 15
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
 
Old 10-05-2005, 04:09 PM   #7
free_ouyo
Member
 
Registered: Mar 2004
Location: Belgium
Distribution: Ubuntu
Posts: 133

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ldap replication master - slave jadid Linux - Software 2 10-18-2006 12:25 PM
openldap replication master/slave slapd.conf paul_mat Linux - Networking 1 11-30-2005 02:54 PM
system replication dudulz Linux - Networking 5 06-29-2005 09:57 AM
Webserver file replication (master and slave) demetri007 Linux - Software 1 08-21-2004 10:07 AM
mysql replication cheng Linux - Software 1 08-22-2002 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration