0

Long story short, I've had issues with my Pi in the past where I've had to do a fresh install on several occasions, which is rather annoying because it's long enough between crashes where I forget what I need to do and have to run the same Google search to get the instructions for mounting drives etc.

It happened to me yesterday and I've finally got things back up and running with it logged into the wifi and with Plex installed and my SSD mounted.

I'm wondering if it's possible to create an image of the SD card now, such that rather than going through the pain of doing installations from scratch in the future, I can simply re-image the SD card with its current state?

I've done cursory Google searches but I'm not sure if I'm either not finding what I'm after, or not understanding correctly what is being shown.

physicsboy
  • 133
  • 4

1 Answers1

1

In general, the approach you should be following is in two steps:

  1. make a raw image file backup of your RPi using image-utils
  2. mount and modify the raw image file as required

image-utils is available in (at least) two places: the author's RPi forum page, and from this GitHub repo (if you prefer updating via git).

A couple of notes may help:

  1. image-utils includes a script called image-backup that is called to create a new backup in raw image file format. image backup runs on a live system, and does not employ dd. Another answer here details a brief overview of use and lists some features.

  2. mounting the raw image file is straightforward using losetup; there is an excellent article by Hiks Gerganov that details the procedure. After the mount, modification of the raw image file can done from any system that supports FAT32 and ext4 filesystems (another Raspberry Pi - for example).

Seamus
  • 23,558
  • 5
  • 42
  • 83