0

Following https://www.tomshardware.com/how-to/back-up-raspberry-pi-as-disk-image, I copied an image of Raspian OS lite (64-bit) from a 256 GB SSD to an external drive. After that I tried to shrink that image with pishrink and nohup. I think that did not work, because after several hours the 256GB file was still there.

Before running pishrink I displayed current processes with $$, because I was worried about the dd process maybe still running in the background (also started with nohup). $$ gave a process number and somethingalong the lines of "no command name found". Maybe I killed some important system process there? When I typed pidof dd it did not print anything. When I ran pishrink it printed something like [1] [process number] [command name].

1 Answers1

1

It's impossible (for me anyway) to tell what you've done, and without that it's difficult to determine where you "went wrong".

I generally follow this advice when contemplating the use of dd: "If you're lucky, the filesystem corruption will be detected as soon as you try to mount the copy. If you're unlucky, it won't be detected until later". Therefore, my advice is to make a real backup of your system by creating an image file, and then write the image file to your bootable media.

How do I do that? You should use the image-backup utility that is part of image-utils. There is another Q&A here that explains the detailed steps - it's quite simple really.

Seamus
  • 23,558
  • 5
  • 42
  • 83