Imaging a Linux workstation or Server
MWahl | September 17, 2010 | 9:36 amThis seems simply enough right…? I spent a day or so looking for a way to image an linux workstation and to add to the complexity I didnt have a large enough external hard drive so i had to do this over the network to a server share. Below are the steps I used.
1. Download a ubuntu live cd http://www.ubuntu.com/desktop/get-ubuntu/download
2. Next boot the workstation you wish to image using the ubuntu live cd, dont install ubuntu, just choose to try it out.
3. Fire up a terminal window (Applications > Accessories > Terminal)
In the command window we will create a mount to a server share to dump the image to.
Type sudo apt-get install smbfs
Type sudo mkdir /media/windows_share
Type sudo mount -t smbfs //192.168.1.250/shared_folder/
/media/windows_share -o username=NamesGoesHere,password=PasswordHere
4. All mounted drives should be in /media,
so we’ll type cd /media/windows_share
5. Now to take the image
type sudo dd if=/dev/sda of=./computer.img
6. You can restore the image by following steps 2 through 4 above on the computer you wish to have the image pushed onto.
Replace step 5 with the command
sudo dd if=./computer.img of=/dev/sda
I should also point out that it would be good practice to wipe the destination hard drive before pushing the image on it. This can be done from the terminal window using the command
sudo dd if=/dev/urandom of=/dev/sda
Also please note in my case the hard drive being imaged was sda, your drive might be different and you can check by issuing the command
fdisk -l
from a terminal window and then looking for the correct hard drive to be imaged.


lopsa




