Score:0

Zeroing to achieve compact dd image of NTFS flash drive

cn flag

I have a partly filled USB flash drive containing a small FAT16 and a large exFAT partition. I would like to make a compressed backup image of its contents. A failed restore of an image created with AOMEI Backupper reinforces my impression that dd is a reliable tool for this purpose.

If the USB drive were formatted as ext4, I think I could achieve a compact image by running zerofree and then sudo dd if=/dev/sdb bs=16M conv=sync,noerror | pv | sudo pigz -c > /media/TargetDrive/USBDriveImage.dd.gz.

I am not sure why zerofree is supposed to help pigz in that context. I would think that writing free space with zeros would produce content that a dd backup image would capture. I guess zeros must be more or less compressible to nothingness.

Since zerofree (like Microsoft's SDelete) is unsuitable for exFAT, is there some other zeroing tool that will optimally prepare the drive for compressed imaging using dd?

muru avatar
us flag
I don't know how zerofree operates exactly, but you should be able to get a similar effect by creating a file filled with zeros that fills up the available space, and then delete it. `cat > /exfat-mount-point/zeros < /dev/zero ; sync ; rm /exfat-mount-point/zeros`
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.