Complexity rating | |
---|---|
Level of experience required, to follow this how-to. | Image may be NSFW. Clik here to view. ![]() Clik here to view. ![]() Clik here to view. ![]() Clik here to view. ![]() Clik here to view. ![]() |
This is wizard-driven. Very simple. You’ll need to be able to burn a CD, nothing more taxing than that. |
Contents
- Part 1: Getting started with the Raspberry Pi
- Part 2: Creating/restoring an image of the Pi’s SD card
- Coming up – Part 3: Using the Raspbery Pi to host multiple web sites and as a file server
- Coming up – Part 4: Creating a Dropbox replacement from a Raspberry Pi
- Coming up – Part 5: Using a Raspberry Pi as a thin (or remote desktop) client
In my last Raspberry Pi tutorial (the first in this series), I mentioned that we can take a snapshot of the Raspberry Pi’s SD card at any time. This will give us a “restore point”, so we can skip a few installation steps if we want to wipe the Pi and start again. Quite a few Raspberry Pi projects will require that we start with a working installation of Raspbian so that’s the snapshot I’m going to take. You can of course take a snapshot whenever you like. If you’ve honed and polished your Rasbmc box, it would make sense to take a snapshot in case it becomes horribly corrupted at some point or melts.
There are many different ways of skinning this cat (or squashing this ‘berry), but my preferred method is the tried and tested customised Linux distribution, Clonezilla. I’ve been using CloneZilla personally and professionally for years and persuaded many colleagues of its merits (besides the obvious, that it’s free). It can be a bit intimidating with all the options it presents. If this is your first experience of CloneZilla, following this tutorial will also give you a gentle introduction to this powerful toolkit.
What you’ll need
- A copy of Clonezilla, burned to disc.
- A computer (desktop or laptop) configured to boot from CD.
- An external hard driveImage may be NSFW.
Clik here to view., with enough space to store the image (you’ll only need a few gigabytes spare).
- A USB reader for your SD card. You can buy one hereImage may be NSFW.
Clik here to view..
Image may be NSFW.
Clik here to view.
Take a snapshot
- Power down your Pi, with the command
halt
,shutdown
orpoweroff
. - Boot your PC from the Clonezilla disc. You will arrive at a simple menu/boot screen. It will boot automatically within 30 seconds – you can hit enter at any time, to proceed.
Image may be NSFW.
Clik here to view. - You’ll be treated to rows and rows of gibberish while Clonezilla boots up.
Image may be NSFW.
Clik here to view. - Choose your language and keyboard setting.
Image may be NSFW.
Clik here to view. - Hit enter to start Clonezilla (yeah, you thought it had already started, didn’t you).
Image may be NSFW.
Clik here to view. - Insert your Raspberry Pi’s card, in its reader.
Image may be NSFW.
Clik here to view. - Choose “local_dev”.
Image may be NSFW.
Clik here to view. - A screen prompt will tell you to insert your external hard drive.
Image may be NSFW.
Clik here to view. - Insert the external drive and then wait for 5 seconds or so.
Image may be NSFW.
Clik here to view. - A few lines will indicate that Clonezilla has registered the presence of the drive.
Image may be NSFW.
Clik here to view. - Hit enter and Clonezilla will mount the various partitions now available to it.
Image may be NSFW.
Clik here to view. - Select the external hard drive as the drive to which we’re copying the snapshot (in my case, the largest partition on the list).
Image may be NSFW.
Clik here to view. - Hit enter. If the drive wasn’t cleanly dismounted before (oopsie), Clonezilla will check and fix as required.
Image may be NSFW.
Clik here to view. - Choose a directory to store the SD card image and hit enter.
Image may be NSFW.
Clik here to view. - Clonezilla will spit some more gibberish at you. Ignore it and hit enter.
Image may be NSFW.
Clik here to view. - Though it makes me feel a little silly, choose Beginner mode.
Image may be NSFW.
Clik here to view. - Choose “savedisk”.
Image may be NSFW.
Clik here to view. - Give your disk image a meaningful name.
Image may be NSFW.
Clik here to view. - Select the SD card, to save the image. You use cursor keys and the space bar here.
Image may be NSFW.
Clik here to view. - Select Ok to continue.
Image may be NSFW.
Clik here to view. - If you’re confident your SD card is in good shape, you can skip checking it.
Image may be NSFW.
Clik here to view. - I’d recommend checking the saved image though. It doesn’t take long and gives you peace of mind that you should be able to restore from this image.
Image may be NSFW.
Clik here to view. - Clonezilla will helpfully point out that you can do all this from the command line (yeah, right).
Image may be NSFW.
Clik here to view. - Press Y and enter to continue.
Image may be NSFW.
Clik here to view. - Shouldn’t take too long.
Image may be NSFW.
Clik here to view. - When it’s all done, it’ll report progress. Press enter.
Image may be NSFW.
Clik here to view. - Enter 0 to power off (or whatever you prefer) followed by enter.
Image may be NSFW.
Clik here to view. - Clonezilla will eject the disc. Hit enter to carry on.
Image may be NSFW.
Clik here to view.
You should now have an image (consisting of several files) on your external hard drive, which you can later use for restoration. Job done.
Restore a snapshot
In this scenario, we’re starting with everything powered off, ready to begin.
- Boot your PC from the Clonezilla disc. You will arrive at a simple menu/boot screen. It will boot automatically within 30 seconds – you can hit enter at any time, to proceed.
Image may be NSFW.
Clik here to view. - I’ve got to say, this screen full of strange foreign characters is pretty unnerving. But don’t worry. It’ll pass.
Image may be NSFW.
Clik here to view. - Choose your language.
Image may be NSFW.
Clik here to view. - I’ve never found I’ve had keyboard problems, even though I use a UK keyboard…
Image may be NSFW.
Clik here to view. - Hit enter to begin.
Image may be NSFW.
Clik here to view. - Insert the SD card/reader. Some nonsense will appear on screen. Don’t worry – just hit enter.
Image may be NSFW.
Clik here to view. - Select “local_dev” and hit enter.
Image may be NSFW.
Clik here to view. - Insert your external hard drive and wait 5 seconds or so for it to be recognised.
Image may be NSFW.
Clik here to view. - It’ll detect the drive – hit enter.
Image may be NSFW.
Clik here to view. - Next, it will mount your various partitions.
Image may be NSFW.
Clik here to view. - You may have a few…
Image may be NSFW.
Clik here to view. - Choose the external drive from the list then hit enter.
Image may be NSFW.
Clik here to view. - Clonezilla will check the drive.
Image may be NSFW.
Clik here to view. - Choose the directory where your saved image is stored and hit enter.
Image may be NSFW.
Clik here to view. - Clonezilla will give you an overview of its file systems. You will be thrilled. Hit enter.
Image may be NSFW.
Clik here to view. - Choose “Beginner”, no matter how patronised you may feel.
Image may be NSFW.
Clik here to view. - Choose “restoredisk”.
Image may be NSFW.
Clik here to view. - Select the previously saved image.
Image may be NSFW.
Clik here to view. - Choose the SD card. Hit enter.
Image may be NSFW.
Clik here to view. - Clonezilla reckons you really want to do this at the command line. Hit enter.
Image may be NSFW.
Clik here to view. - This is a destructive operation and will wipe your SD card. Press Y then enter.
Image may be NSFW.
Clik here to view. - Clonezilla doesn’t trust your judgment. Hit Y and enter again.
Image may be NSFW.
Clik here to view. - There are two partitions to restore to this card. You’ll get a progress report for each restoration.
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view. - Clonezilla will let you know once it’s done.
Image may be NSFW.
Clik here to view. - Press enter to continue.
Image may be NSFW.
Clik here to view. - Choose 1 to reboot (or whatever you prefer) then hit enter.
Image may be NSFW.
Clik here to view. - Once the CD is ejected, you can also disconnect the SD card and hard drive. Hit enter.
Image may be NSFW.
Clik here to view. - Witness the majesty of the Linux death rattle.
Image may be NSFW.
Clik here to view.
If all went well, you can now install this SD card back in your Pi, boot up and continue.