Use A Linux Bootable CDROM to Image Your Hard Drive
Purpose: The purpose of this document is to instruct the user in several ways you can use a livecd distribution of Linux to create a perfect image of your hard drive. I used the wonderful Knoppixlivecd but these instructions should work for any livecd distribution, or even a floppy distribution if it had drivers for your network card and the software used in the process.
- Image hard drive to remote ssh server:Requirements:
- Access to remote ssh server
- Enough space to store the image
Process: Make changes where necessary to match your system setup.
- Boot from the live cdrom distribution.
- Switch to root
- Make sure NO partitions are mounted from the source hard drive.
- Execute the following command, making necessary changes for your system:
dd if=/dev/hda | ssh user@remotehost /bin/dd of=/tmp/mypc_hda.img
- Restore hard drive from remote ssh server:Requirements:
- Access to remote ssh server
- Hard drive with equal or greater capacity than the hard drive image.
Process: Make changes where necessary to match your system setup.
- Boot from the live cdrom distribution.
- Switch to root
- Make sure NO partitions are mounted from the source hard drive.
- Execute the following command, making necessary changes for your system:
ssh user@remotehost cat /tmp/mypc_hda.img | dd of=/dev/hda
- Image hard drive to Windows/Samba share:Requirements:
- Access to shared Windows/Samba directory
- Enough space to store the image
Process: Make changes where necessary to match your system setup.
- Boot from the live cdrom distribution.
- Switch to root
- Make a mount point directory. Example:
mkdir /mnt/remote_share
- Mount the Windows/Samba shared directory. Example:
smbmount //192.168.1.100/shared /mnt/remote_share -o username=jsmith,password=changeme
- Make sure NO partitions are mounted from the source hard drive.
- Execute the following command, making necessary changes for your system:
dd if=/dev/hda of=/mnt/remote_share/mypc_hda.img
- Restore hard drive from Windows/Samba share:Requirements:
- Access to shared Windows/Samba directory
- Hard drive with equal or greater capacity than the hard drive image.
Process: Make changes where necessary to match your system setup.
- Boot from the live cdrom distribution.
- Switch to root
- Make a mount point directory. Example:
mkdir /mnt/remote_share
- Mount the Windows/Samba shared directory. Example:
smbmount //192.168.1.100/shared /mnt/remote_share -o username=jsmith,password=changeme
- Make sure NO partitions are mounted from the source hard drive.
- Execute the following command, making necessary changes for your system:
dd if=/mnt/remote_share/mypc_hda.img of=/dev/hda
- Clone a hard drive onto another hard drive:Requirements:
- Destination drive equal or greater than the source drive.
Process: Make changes where necessary to match your system setup. In my example here, /dev/hda is the source, /dev/hdb is the destination.
- Boot from the live cdrom distribution.
- Switch to root
- Make sure NO partitions are mounted from either drive.
- Execute the following command, making necessary changes for your system:
dd if=/dev/hda of=/dev/hdb
Copyright (c) OSSIE J H MOORE <linux@okmoore.com>.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included here