Solving a bad sector block problem on flashdisk
After I used flashdisk-creator on Ubuntu 16.04 LTS to create a live USB with one of my flashdisk, it wouldn’t want to be formatted anymore. gparted kept on displaying the following message:
Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
and partition creation stopped with a failed status. After a few searches, I discovered that the problem was caused by a well-known bug of flashdisk-creator that had actually damaged the driver descriptor. The command dd
was able to solve my issue:
sudo dd if=/dev/zero of=/dev/sdb bs=2048 count=32
where <code pointed to flashdisk. The option count=32
was used to limit the dd
command execution to the first 32 sectors, otherwise, the command was much too long to run.