Thursday, April 30, 2015

Repair USB sticks

The next command wipes the entire disk, not only the partition table. (tested)
 sudo dd if=/dev/zero of=/dev/sdb bs=1M

( to see what path is your stick use the command `lsblk`)

To only wipe the partition table and Master Boot Record do

sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1

to see the progress of this, open a separate terminal window and
watch -n5 'sudo kill -USR1 `pgrep ^dd`'
You will need to use gparted to create a new partition table and format.

No comments:

Post a Comment