Clone Core With CloneZilla
- 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)
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.
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!
- Splash screen - boot options
Choose the first - "Clonezilla live" with default settings
- Choose language and keymap
Just accept the defaults if English is fine
- Start Clonezilla
- Device - image
This creates an img file on a remote share *from* a drive (device). This is what I chose.
- 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.
- 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.
- 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.
- 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.
- SAMBA domain
I cancelled this as I have no domain, just the share.
- 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.
- 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
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.
Various progress indicators will go past
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!