tarifa Posted July 16, 2019 Share Posted July 16, 2019 background: i have a mx-linux in a notebook - running as a live-dvd - before installation i want to zero out the root@mx1: /home/demo# dd if=/dev/zero of=/dev/sda bs=4096 count=4096 i get back: dd: failed to open '/def/zero/' : No such file or directory why do i get this error? Well i allways thougth that this will zero out the first 16 MiB of the drive. 16 MiB is probably more than enough to nuke any "start of disk" structures while being small enough that it won't take very long. dd if=/dev/zero of=/dev/sda bs=512 count=4096 seek=$(expr blockdev --getsz /dev/sda - 4096) well - dear friends my question is hete the following; : What does this exactly? whi does it happen? see the following comand blockdev --getsz gets the size of the block device in "512 byte sectors". So this command looks like it was intended to zero out the last 2 MiB of the drive. Unfortunately this command is broken syntax wise. I expect the command was originally intended to be and see this-, dd if=/dev/zero of=/dev/sda bs=512 count=4096 seek=$(expr `blockdev --getsz /dev/sda` - 4096) and the backticks got lost somewhere along the line of people copy/pasting it between different environments. love to hear from you + Link to comment Share on other sites More sharing options...
Recommended Posts