Quantcast
Viewing all articles
Browse latest Browse all 2

Adventures with a Raspberry Pi – Part 4

If you’ve read the previous parts of this article you’ll find I have set up my Raspberry Pi by formatting the SD card and installing the Raspbian OS, setting it up on my home network and assigning it a static IP address , and most recently configuring the PI with VNC so that it could be operated remotely and headlessly.

Thinking about the effort that has gone into the setup and the time that it has taken, I was starting to get concerned about the chance that the SD card, which contains the Raspian OS and all the Pi’s data might, at some point go phut!  Or what might happen if I was to try adding another package and screw thins up.

So I decided to back-up my SD card. There are two ways to do this: from within Raspian – using Linux commands, or to do it in Windows.  Being very rusty with Unix / Linux I took what I considered the safe way out and did it in Windows. And it worked like a dream.

I followed the instructions on this blog and used Win32diskimager ( which you might recall I used before in my initial set-up)  this time to read the SD card (which I’d taken out of the Pi and put in Windows’ SD card reader). It then creates an image file where you want it. I stuck mine on my Windows hard drive. The key thing, as the blog there says, is to remember that you use Win32diskimager to READ the image.

I then used Win32diskimager again but this time to WRITE the image from my Windows hard drive back to a spare SD card. I then put that card back in my Pi, booted from it and everything was there, working perfectly. Because this second SD card was larger I then used the following command to launch the set up menu:

sudo raspi-config

I then chose the second menu option to expand the root partition to fill the SD card.

So I now have two SD cards with copies of my set up, and a separate image on my hard drive that I can burn at any time to get back to where I was with the Pi yesterday.

 


Viewing all articles
Browse latest Browse all 2

Trending Articles