To make a full hard disk image in linux we will use several small programs and a livecd.
Next to this we need a place to store the image (external hard disk?). Which livecd you use is not that important. Just make sure that you access the place where you want to store the image and that you have access to gzip, dd and swapoff (if there is a swap partition).
So let us see the steps to take:
- Boot into the livecd
- Make sure you can access the place where you want to store the image
- (1) Disable the swap partition on the hard disk you want to image
- (2) Start the image-making process
- Check if the image is stored on the requested locations without errors
So let us see which commands we have to use to perform actions (1) and (2):
(1)# sudo swapoff -a (2)# sudo dd if=/dev/hd_ | gzip > /mnt/hd__/image_name.dd.gz
Restoring the image is as easy as making it. Let us see these steps as well
- Boot into the livecd
- Make sure you can access the place where your image is stored
- (3) Disable the swap partition on the hard disk you want to image
- (4) Start the image-restoring process
- Check if the image is restored on the requested location without errors
So let us see which commands we have to use to perform actions (3) and (4):
(3)# sudo swapoff -a (4)# sudo gzip -dc /mnt/hd__/image_name.dd.gz | dd of=/dev/hd_
That is it. I hope it is/was helpful.
No hay comentarios:
Publicar un comentario