Table of Contents

dd (disk destroyer)

copy ISO to disk with pv instead of dd

pv < linux-image.iso > /dev/sdx

secure delete disks

dd if=/dev/urandom status=progress conv=notrunc bs=4M oflag=dsync of=/dev/disk/by-id/

applications

# gzip dd output
dd if=/dev/hdx | gzip -c | pv >/backup/hdx.img.gz
# dd gzipped image
gunzip -c /backup/hdx.img.gz | pv | dd of=/dev/hdx

mount image with multiple partitions

# losetup --partscan --find --show sd.img
/dev/loop0
# lsblk | grep loop
loop0                          7:0    0   7,4G  0 loop  
├─loop0p1                    259:0    0    56M  0 loop  
└─loop0p2                    259:1    0     3G  0 loop
# mount -t ext4 /dev/loop0p2 sd/
# losetup -d /dev/loop0