Difference between revisions of "Clone Core With CloneZilla"

From LinuxMCE
Jump to: navigation, search
(Create Image (Running CloneZilla))
 
(4 intermediate revisions by the same user not shown)
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 [http://clonezilla.org clonezilla] 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.
 
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 [http://clonezilla.org/liveusb.php documentation] 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 used the [http://tuxboot.org tuxboot] 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 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.
 
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).
  
 
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
 
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]
+
<pre>can't load module" ext4</pre>
 
to
 
to
[code]initramfs can't access tty job control turned off[/code]
+
<pre>initramfs can't access tty job control turned off</pre>
 
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<br>Choose the first - "Clonezilla live" with default settings
Choose the first - "Clonezilla live" with default settings
+
# Choose language and keymap<br>Just accept the defaults if English is fine
## Choose language and keymap
+
# Start Clonezilla<br>Obvious choice
Just accept the defaults if English is fine
+
# Device - image<br>This creates an img file on a remote share *from* a drive (device). This is what I chose.
## Start Clonezilla
+
# Where to put it<br>I chose SAMBA server here to put the image on a network drive. The one I created up above on my desktop.
Obvious choice
+
# Choose NIC<br>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.
## Device - image
+
# NIC setup mode<br>This will depend on how your external network works. Mine has a DHCP server (adsl modem router) so I chose this option.
This creates an img file on a remote share *from* a drive (device). This is what I chose.
+
# IP address of SAMBA server<br>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.
## Where to put it
+
# SAMBA domain<br>I cancelled this as I have no domain, just the share.
I chose SAMBA server here to put the image on a network drive. The one I created up above on my desktop.
+
# SAMBA account<br>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.
## Choose NIC
+
# SAMBA share<br>I created a share called [Img] on my SAMBA server specifically for these image files.
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.
+
# SAMBA security mode<br>The first works for me
## NIC setup mode
+
# Beginner / Expert mode<br>I chose beginner mode. I assume Expert mode allows you to enter the complete command directly
This will depend on how your external network works. Mine has a DHCP server (adsl modem router) so I chose this option.
+
# Savedisk<br>This is what we're trying to do - save a disk as an image
## IP address of SAMBA server
+
# Name image on share<br>Choose a meaningful name. I like to have the date as well as the LMCE version.
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.
+
# Local disk to clone<br>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.
## SAMBA domain
+
# Filesystem check<br>Why not... it would be a shame to clone the thing and then realise it was useless<br>Likewise with check image.
I cancelled this as I have no domain, just the share.
+
# Process<br>Various progress indicators will go past
## SAMBA account
+
# Done<br>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!
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
+
I created a share called [Img] on my SAMBA server specifically for these image files.
+
## SAMBA security mode
+
The first works for me
+
## Beginner / Expert mode
+
I chose beginner mode. I assume Expert mode allows you to enter the complete command directly
+
## Savedisk
+
This is what we're trying to do - save a disk as an image
+
## Name image on share
+
Choose a meaningful name. I like to have the date as well as the LMCE version.
+
## 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.
+
## Filesystem check
+
Why not... it would be a shame to clone the thing and then realise it was useless
+
Likewise with check image.
+
## Process
+
Various progress indicators will go past
+
## 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!
+

Latest revision as of 11:57, 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 clonezilla 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 documentation on the Clonezilla website. I used the tuxboot 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

can't load module" ext4

to

initramfs can't access tty job control turned off

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
  2. Choose language and keymap
    Just accept the defaults if English is fine
  3. Start Clonezilla
    Obvious choice
  4. Device - image
    This creates an img file on a remote share *from* a drive (device). This is what I chose.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. SAMBA domain
    I cancelled this as I have no domain, just the share.
  10. 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.
  11. SAMBA share
    I created a share called [Img] on my SAMBA server specifically for these image files.
  12. SAMBA security mode
    The first works for me
  13. Beginner / Expert mode
    I chose beginner mode. I assume Expert mode allows you to enter the complete command directly
  14. Savedisk
    This is what we're trying to do - save a disk as an image
  15. Name image on share
    Choose a meaningful name. I like to have the date as well as the LMCE version.
  16. 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.
  17. Filesystem check
    Why not... it would be a shame to clone the thing and then realise it was useless
    Likewise with check image.
  18. Process
    Various progress indicators will go past
  19. 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!