0

I recently got a Sandisk Cruzer USB to install a new operating system on my Kubuntu Linux computer. Fearing that the drive had malware on it, I wrote zeroes to the drive:

dd bs=1G if=/dev/zero of=/dev/sdb1

Now when I plug in the USB, Plasma doesn't notify me, and the node that is created is /dev/sdc instead of /dev/sdb.

How do I fix this without getting a new USB?

1 Answers1

4

Now when I plug in the USB, Plasma doesn't notify me

This is normal. After zeroing /dev/sdb1 there is no superblock of any filesystem there. Plasma is not triggered by this partition anymore. If there are no filesystems in other partitions then Plasma won't be triggered by the device at all.

If you zeroed /dev/sdb then there would be neither a partition table nor a superblock of any filesystem on the entire device and Plasma wouldn't be triggered either.

and the node that is created is /dev/sdc instead of /dev/sdb.

Also normal. There is no guarantee a name like sdb is reused, even if you plug the same device in, even if it contains already seen IDs (whatever IDs).


How do I fix this without getting a new USB?

Few possibilities (depending on what you want):

  • Use fdisk /dev/sdc or gdisk /dev/sdc or similar software to modify/create partition(s) from the command line. Then use mkfs.whatever with proper options to create a filesystem on /dev/sdc1 (/dev/sdc2 etc.).
  • Use mkfs.whatever to create a filesystem on the entire device (/dev/sdc). Not recommended.
  • Use gparted or similar GUI software to modify/create partition(s) and filesystem(s).
  • Write (dd or even cat) an image (e.g. Debian installer or a backup image of some pendrive) directly to /dev/sdc if this is what you want. You may need to invoke partprobe afterwards to see the result.

Most likely any of the above will require root access (sudo).