Difference between revisions of "Clone Core With CloneZilla"

From LinuxMCE
Jump to: navigation, search
Line 1: Line 1:
*Backing up your CORE with Clonezilla from USB thumb drive (flash drive)
+
= Backing up your CORE with Clonezilla from USB thumb drive (flash drive) =
  
**Introduction
+
==Introduction==
  
 
This tutorial outlines a method for cloning your LinuxMCE core installation. Why would you want to do that? Well, quite simply, so when you break something you can restore back to a stable state. The method involves disk imaging using [url="http://clonezilla.org"]clonezilla[/url] to copy a snapshot of your current LinuxMCE core operating system drive.
 
This tutorial outlines a method for cloning your LinuxMCE core installation. Why would you want to do that? Well, quite simply, so when you break something you can restore back to a stable state. The method involves disk imaging using [url="http://clonezilla.org"]clonezilla[/url] to copy a snapshot of your current LinuxMCE core operating system drive.
Line 7: Line 7:
 
The tutorial assumes you have your media on a separate hard drive (or even machine) to the operating system and linuxMCE software. If that is not the case then you won't be able to avoid cloning your media as well. This is not a problem, it will just take more time and space. The idea here, though, is to clone the system, not backup the media. Media can be backed up by other methods and easily restored. The system, however, cannot be backed up by other methods but would rather require a fresh installation. Hence the need to image it.
 
The tutorial assumes you have your media on a separate hard drive (or even machine) to the operating system and linuxMCE software. If that is not the case then you won't be able to avoid cloning your media as well. This is not a problem, it will just take more time and space. The idea here, though, is to clone the system, not backup the media. Media can be backed up by other methods and easily restored. The system, however, cannot be backed up by other methods but would rather require a fresh installation. Hence the need to image it.
  
**When to image your system
+
==When to image your system==
  
 
This is up to you, but you should do this at least once you have a stable install with most of the media directors and devices you are going to add initially. Wait a week or two until you're happy with the way the system is running and then take an image. However other times to image would be  
 
This is up to you, but you should do this at least once you have a stable install with most of the media directors and devices you are going to add initially. Wait a week or two until you're happy with the way the system is running and then take an image. However other times to image would be  
  
*** Just after the basic (core/hybrid) install, prior to adding any devices / media directors. This option would allow you to fall back to a clean install should you make a mess of the device addition process
+
* Just after the basic (core/hybrid) install, prior to adding any devices / media directors. This option would allow you to fall back to a clean install should you make a mess of the device addition process
*** Just prior to major changes or attempts to create new devices / install new software. This option will allow you to fall back to a stable system should your efforts wreck your system.
+
* Just prior to major changes or attempts to create new devices / install new software. This option will allow you to fall back to a stable system should your efforts wreck your system.
  
**How to do it
+
==How to do it==
  
#Setup Clonezilla on USB thumb drive
+
===Setup Clonezilla on USB thumb drive===
  
 
This is fairly self explanatory based on the [url="http://clonezilla.org/liveusb.php"]documentation[/url] on the Clonezilla website.
 
This is fairly self explanatory based on the [url="http://clonezilla.org/liveusb.php"]documentation[/url] on the Clonezilla website.
Line 23: Line 23:
 
I then used the tuxboot executable to make the bootable thumb drive from the downloaded ISO image above.
 
I then used the tuxboot executable to make the bootable thumb drive from the downloaded ISO image above.
  
#Prepare SAMBA share to receive image on external network
+
===Prepare SAMBA share to receive image on external network===
 
+
 
Setup a SAMBA share on another machine on the external network. It must be on the external network as the internal network will not be available while the core is offline. I setup a share called [Img] on my desktop machine at external address 192.168.10.40.
 
Setup a SAMBA share on another machine on the external network. It must be on the external network as the internal network will not be available while the core is offline. I setup a share called [Img] on my desktop machine at external address 192.168.10.40.
  
#Boot CORE with thumb drive
+
===Boot CORE with thumb drive===
 
+
 
This step will be BIOS dependent but in some way you need to indicate to your BIOS that you wish to boot from your USB thumb drive (which you've obviously inserted to a USB port on the core prior to powering on).
 
This step will be BIOS dependent but in some way you need to indicate to your BIOS that you wish to boot from your USB thumb drive (which you've obviously inserted to a USB port on the core prior to powering on).
  
Line 37: Line 35:
 
I spent a good deal of time creating new versions of the thumb drive on varying filesystem and partition types and with varying versions of clonezilla live and tuxboot before I discovered that the UEFI choice was the wrong one.
 
I spent a good deal of time creating new versions of the thumb drive on varying filesystem and partition types and with varying versions of clonezilla live and tuxboot before I discovered that the UEFI choice was the wrong one.
  
#Create Image (Running CloneZilla)
+
===Create Image (Running CloneZilla)===
  
 
Here is the meat of it - the options to choose for imaging your core!
 
Here is the meat of it - the options to choose for imaging your core!
## Splash screen - boot options
+
# Splash screen - boot options
 
Choose the first - "Clonezilla live" with default settings
 
Choose the first - "Clonezilla live" with default settings
## Choose language and keymap
+
# Choose language and keymap
 
Just accept the defaults if English is fine
 
Just accept the defaults if English is fine
## Start Clonezilla
+
# Start Clonezilla
 
Obvious choice
 
Obvious choice
## Device - image
+
# Device - image
 
This creates an img file on a remote share *from* a drive (device). This is what I chose.
 
This creates an img file on a remote share *from* a drive (device). This is what I chose.
## Where to put it
+
# Where to put it
 
I chose SAMBA server here to put the image on a network drive. The one I created up above on my desktop.
 
I chose SAMBA server here to put the image on a network drive. The one I created up above on my desktop.
## Choose NIC
+
# Choose NIC
 
Of course you need to choose the NIC connected to your external network here because the internal network is not going to work as it's controlled by your core. I think the default in LinuxMCE is eth0. It was with mine.
 
Of course you need to choose the NIC connected to your external network here because the internal network is not going to work as it's controlled by your core. I think the default in LinuxMCE is eth0. It was with mine.
## NIC setup mode
+
# NIC setup mode
 
This will depend on how your external network works. Mine has a DHCP server (adsl modem router) so I chose this option.
 
This will depend on how your external network works. Mine has a DHCP server (adsl modem router) so I chose this option.
## IP address of SAMBA server
+
# IP address of SAMBA server
 
My desktop has a reserved IP of 192.168.10.40 on my external home network. You would need to choose the IP of the appropriate device in yours.
 
My desktop has a reserved IP of 192.168.10.40 on my external home network. You would need to choose the IP of the appropriate device in yours.
## SAMBA domain
+
# SAMBA domain
 
I cancelled this as I have no domain, just the share.
 
I cancelled this as I have no domain, just the share.
## SAMBA account
+
# SAMBA account
 
This needs to be a username of a username/password pair that can connect to the SAMBA share where you want to put your image. This will be specific to your SAMBA setup.
 
This needs to be a username of a username/password pair that can connect to the SAMBA share where you want to put your image. This will be specific to your SAMBA setup.
## SAMBA share
+
# SAMBA share
 
I created a share called [Img] on my SAMBA server specifically for these image files.
 
I created a share called [Img] on my SAMBA server specifically for these image files.
## SAMBA security mode
+
# SAMBA security mode
 
The first works for me
 
The first works for me
## Beginner / Expert mode
+
# Beginner / Expert mode
 
I chose beginner mode. I assume Expert mode allows you to enter the complete command directly
 
I chose beginner mode. I assume Expert mode allows you to enter the complete command directly
## Savedisk
+
# Savedisk
 
This is what we're trying to do - save a disk as an image
 
This is what we're trying to do - save a disk as an image
## Name image on share
+
# Name image on share
 
Choose a meaningful name. I like to have the date as well as the LMCE version.
 
Choose a meaningful name. I like to have the date as well as the LMCE version.
## Local disk to clone
+
# Local disk to clone
 
This is important. Make sure you know which of your drives has your operating system on it and clone that one! I made the mistake of cloning my media drive first time and thought I was safe.
 
This is important. Make sure you know which of your drives has your operating system on it and clone that one! I made the mistake of cloning my media drive first time and thought I was safe.
## Filesystem check
+
# Filesystem check
 
Why not... it would be a shame to clone the thing and then realise it was useless
 
Why not... it would be a shame to clone the thing and then realise it was useless
 
Likewise with check image.
 
Likewise with check image.
## Process
+
# Process
 
Various progress indicators will go past
 
Various progress indicators will go past
## Done
+
# Done
 
Remember to change the BIOS boot order back if you changed it to boot from the flash drive. Remove the flash drive and feel safe!
 
Remember to change the BIOS boot order back if you changed it to boot from the flash drive. Remove the flash drive and feel safe!

Revision as of 10:48, 16 August 2014

Backing up your CORE with Clonezilla from USB thumb drive (flash drive)

Introduction

This tutorial outlines a method for cloning your LinuxMCE core installation. Why would you want to do that? Well, quite simply, so when you break something you can restore back to a stable state. The method involves disk imaging using [url="http://clonezilla.org"]clonezilla[/url] to copy a snapshot of your current LinuxMCE core operating system drive.

The tutorial assumes you have your media on a separate hard drive (or even machine) to the operating system and linuxMCE software. If that is not the case then you won't be able to avoid cloning your media as well. This is not a problem, it will just take more time and space. The idea here, though, is to clone the system, not backup the media. Media can be backed up by other methods and easily restored. The system, however, cannot be backed up by other methods but would rather require a fresh installation. Hence the need to image it.

When to image your system

This is up to you, but you should do this at least once you have a stable install with most of the media directors and devices you are going to add initially. Wait a week or two until you're happy with the way the system is running and then take an image. However other times to image would be

  • Just after the basic (core/hybrid) install, prior to adding any devices / media directors. This option would allow you to fall back to a clean install should you make a mess of the device addition process
  • Just prior to major changes or attempts to create new devices / install new software. This option will allow you to fall back to a stable system should your efforts wreck your system.

How to do it

Setup Clonezilla on USB thumb drive

This is fairly self explanatory based on the [url="http://clonezilla.org/liveusb.php"]documentation[/url] on the Clonezilla website. I used the [url=""]tuxboot[/url] option to download a tuxboot executable for my system (Fedora 17). I also downloaded the ubuntu stable version of clonezilla live (clonezilla-live-20140630-trusty-i386.iso at the time of writing). I formatted the USB thumb drive to FAT32 using Disk utilities on Fedora and gparted and mkfs.vfat to make the partion and FAT32 filesystem. I then used the tuxboot executable to make the bootable thumb drive from the downloaded ISO image above.

Prepare SAMBA share to receive image on external network

Setup a SAMBA share on another machine on the external network. It must be on the external network as the internal network will not be available while the core is offline. I setup a share called [Img] on my desktop machine at external address 192.168.10.40.

Boot CORE with thumb drive

This step will be BIOS dependent but in some way you need to indicate to your BIOS that you wish to boot from your USB thumb drive (which you've obviously inserted to a USB port on the core prior to powering on).

In my case the particular version of American Megatrends BIOS required me to choose between a "UEFI" thumb drive and just the drive itself (see screenshots). This had me stumped as the UEFI choice (which was the first and, I thought only choice) would start Clonezilla live fine but after you'd chosen the screen resolution, it failed with errrors ranging from [code]can't load module" ext4[/code] to [code]initramfs can't access tty job control turned off[/code] I spent a good deal of time creating new versions of the thumb drive on varying filesystem and partition types and with varying versions of clonezilla live and tuxboot before I discovered that the UEFI choice was the wrong one.

Create Image (Running CloneZilla)

Here is the meat of it - the options to choose for imaging your core!

  1. Splash screen - boot options

Choose the first - "Clonezilla live" with default settings

  1. Choose language and keymap

Just accept the defaults if English is fine

  1. Start Clonezilla

Obvious choice

  1. Device - image

This creates an img file on a remote share *from* a drive (device). This is what I chose.

  1. Where to put it

I chose SAMBA server here to put the image on a network drive. The one I created up above on my desktop.

  1. Choose NIC

Of course you need to choose the NIC connected to your external network here because the internal network is not going to work as it's controlled by your core. I think the default in LinuxMCE is eth0. It was with mine.

  1. NIC setup mode

This will depend on how your external network works. Mine has a DHCP server (adsl modem router) so I chose this option.

  1. IP address of SAMBA server

My desktop has a reserved IP of 192.168.10.40 on my external home network. You would need to choose the IP of the appropriate device in yours.

  1. SAMBA domain

I cancelled this as I have no domain, just the share.

  1. SAMBA account

This needs to be a username of a username/password pair that can connect to the SAMBA share where you want to put your image. This will be specific to your SAMBA setup.

  1. SAMBA share

I created a share called [Img] on my SAMBA server specifically for these image files.

  1. SAMBA security mode

The first works for me

  1. Beginner / Expert mode

I chose beginner mode. I assume Expert mode allows you to enter the complete command directly

  1. Savedisk

This is what we're trying to do - save a disk as an image

  1. Name image on share

Choose a meaningful name. I like to have the date as well as the LMCE version.

  1. Local disk to clone

This is important. Make sure you know which of your drives has your operating system on it and clone that one! I made the mistake of cloning my media drive first time and thought I was safe.

  1. Filesystem check

Why not... it would be a shame to clone the thing and then realise it was useless Likewise with check image.

  1. Process

Various progress indicators will go past

  1. Done

Remember to change the BIOS boot order back if you changed it to boot from the flash drive. Remove the flash drive and feel safe!