Yes, and you can probably get better performance with different block sizes. This is just what I used to fix drives as it was fast enough and I couldn’t be arsed to do any real testing to find the right speed. Also, my stash of drives was no where near homogeneous, so the right size for one type of drive may not have worked for a different type of drive. I also used the 4MB block size when imaging drives to have an ok-ish speed while not losing too much data if there were read errors.
For a physical machine:
for f in $(lsblk | grep disk | cut -d ' ' -f 1); do sudo dd if=/dev/zero of=/dev/$f bs=4MB status=progress; doneThat will remove all your current software problems. You’ll have new ones, but the old ones will be gone.
There aren’t any software problems if you don’t have any software
Nice that you added “status=progress” so I can closely follow what is happening.
Gotta have that progress bar, otherwise you might be tempted to <Ctrl>-C and you will be left with some of your software problems.
This is helpful but can I use a larger block size? Any performance implications, security risks, etc?
Yes, and you can probably get better performance with different block sizes. This is just what I used to fix drives as it was fast enough and I couldn’t be arsed to do any real testing to find the right speed. Also, my stash of drives was no where near homogeneous, so the right size for one type of drive may not have worked for a different type of drive. I also used the 4MB block size when imaging drives to have an ok-ish speed while not losing too much data if there were read errors.