How To Disk Clone Clonezilla Samba
How To Disk Clone Clonezilla Samba
Purpose of this document is to describe how to quickly prepare PC for Lab environment. There is an
excellent software which enable a single drive or even a single partition cloning, so we can use to
recover broken OS, hard drive, etc. Clonezilla is a freeware, so we don't need to purchase expensive
licenses. Clonezilla has GUI which make our work very simple. This document describes how to use
Clonezilla with Samba shares for storing drives/partitions images (as an image repository). To create
this howto I used Virtualbox machine to capture screenshots, but the process of creating images and
restoring is the same.
First of all you should create images repository on one PC (I've used AWT-DEBUG-SGW PC)
Clonezilla support various storage options:Local Device, SSH server, Samba server, NFS Server, but I
think the best choice for us is samba share, as it is simple to configure.
:~ # yast2
Second step is to edit configuration file /etc/samba/smb.conf, it should look like as follows:
#wins support = yes #if we want to smb server acts as WINS server.
#name resolve order = lmhosts host wins bcast
local master = yes
preferred master = yes
os level = 65
[Shares]
comment = Temporary files
path = /mnt/smb_shares
create mask = 0776
directory mask = 0774
browsable = yes
writable = yes
guest ok = no
valid users = emssim
Now we need to create user and set samba password, it should be done as follows:
:~ # /etc/init.d/smb restart
:~ # testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
Unknown parameter encountered: "quest"
Ignoring unknown parameter "quest"
Processing section "[Shares]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
netbios name = AWT-REPOSITORY
server string = AWT Samba server
smb passwd file = /etc/smbpass
log level = 3
log file = /var/log/samba-log.%m
max log size = 2048
load printers = No
printcap name = /dev/null
os level = 65
preferred master = Yes
printing = bsd
print command = lpr -r -P'%p' %s
lpq command = lpq -P'%p'
lprm command = lprm -P'%p' %j
[Shares]
comment = Temporary files
path = /mnt/smb_shares
valid users = emssim, awt
read only = No
create mask = 0776
directory mask = 0774
You can test it by mounting in Linux or Windows PC, then please create Image directory.
2. Clonezilla preparation.
You can download Clonezilla here: http://clonezilla.org/downloads.php . Make sure you downloaded
stable version of this tool. If you want to use Unetbootin as I suggested please visit
http://unetbootin.sourceforge.net/ site and download stable release. Once you have downloaded file(s)
you are ready to go.
You have to boot form the Clonezilla media which you have prepared already (live CD/DVD or
bootable pendrive). First screen will prompt you to select settings, so choose one and press Enter. Then
The debian boot sequence will appear.
You can choose between creating image or doing a direct device-to-device copy. In our case you should
choose create device-image.
You need to tell Clonezilla where image will be saved. Chose samba_server option as we want to store
our images on this repository.
In our case the IP address is 10.83.205.225, you should leave domain name blank.
you will be prompted to confirm, if all looks ok then please press Enter.
Next you will be asked to choose mode of operation, please leave it default
You have to boot form the Clonezilla media which you have prepared already (live CD/DVD or
bootable pendrive). First screen will prompt you to select settings, so choose one and press Enter. Then
The debian boot sequence will appear.
In the first phase the restoring process is very similar to Creating image process, follow the same steps
up to 3.11 point. Then you should see more options.
Press Enter, then you will be asked if you are sure and want to proceed (twice), type “y” twice then
restoration process stats.
When the restoration process is finished you will be promtped to press Enter and reboot.
That's all.
If you restored couple partitions, not full hard drive please make sure that correct partition has bootable
flag configured, if not PC will failed to boot with an error message.