[raspberry-vi] Re: Battle With Stormux

  • From: Mewtamer <mewtamer@xxxxxxxxx>
  • To: raspberry-vi@xxxxxxxxxxxxx
  • Date: Sun, 22 Mar 2020 14:45:23 +0000

Unfortunately, whether using dd or something more sophisticated,
creating an image of a mounted filesystem, especially one that's
hosting an operating system is a bad idea. Any files changing during
the copy process can render the image unusable, and files change all
the time on a running operating system.

Furthermore, for making whole disc images, you want every file system
on the disc(in this case, the microSD card) unmounted.

That said, if the Pi is the only Linux system you have, and you have
at least two SD cards and a USB card reader, you could always boot
from one card to run dd to write an image to or create an image from
the second SD card. Though, if you go this route, be sure to only
experiment on one card at a time to avoid ending up in a situation
where you don't have a working card to fall back on.

On a related note, on my desktop, I use partimage to create backup
images of my root partition every so often because doing a clean
install often means a few days work to get everything just the way I
like it... and I don't do it nearly as often as I probably should
since I have to reboot my machine into a LiveDVD to either create a
new backup or restore a backup when needed.

And to anyone wondering why I use partimage for backing up my root
partition and dd for backing up SD cards:
dd copies the entire disc byte for byte, including the partition table
and the empty space. As I understand it, this is needed for
successfully restoring a whole-disc backup or copying the image to a
new drive, but it also makes the process quite slow for large discs,
produces a file the size of the source drive, and the image has to be
uncompressed to write.

PartImage just copies the contents of a specific partition and can
both compress and image as it's created and uncompress it as it's
being restored. This makes it faster and the image file smaller, but
I'm pretty sure the image can only be restored to the partition it was
created from or one of the same size and filesystem type.
=========================================================== 
The raspberry-vi mailing list 
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of the 
Foundation.

Mike Ray, list creator, January 2013

Other related posts: