USB flash drive stuck in RO after DDing ISO
I can't really be sure which of the things I did fixed it, but it turns out that something must not have been synced.
Simply rebooting the computer fixed the issue. However I did try plugging it into a different Ubuntu system and it didn't work there either. So it was definitely something I did that fixed it.
For anyone else facing this issue, I would recommend running these commands to make sure it is usable again:
sudo dd if="/dev/zero" of="/dev/sdX" bs=1M count=10 #Replace "X" with your USB's letter
sudo reboot
using fdisk can be good solution(Be careful not to use wrong drive)
Find your device/disk name:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 1 15.2G 0 disk
├─sdb1 8:17 1 564M 0 part /media/user/pendrive
└─sdb2 8:18 1 31M 0 part
unmount all of mounted partition
then you wand to select whole partition so /dev/sdb
$ sudo umount /dev/sdb1
then use fdisk to create a partition and format to specific filesystem
Be careful here in selecting disk
$ sudo fdisk /dev/sdb
then you can use m for help
create a partition table we use DOS partition so o
then you can print partition table with p
Command (m for help):o
Created a new DOS disklabel with disk identifier 0xd745b93f.
Command (m for help):p
Disk /dev/sdb1: 564 MiB, 591396864 bytes, 1155072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xd745b93f
then create new partition using n
you can hit enter for default choice of one primary partion or choose according to given option
Command (m for help):n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (1-4, default 1):
First sector (2048-1155071, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-1155071, default 1155071):
Created a new partition 1 of type 'Linux' and of size 563 MiB.
here your default partition is Linux you can change by typing t
and select c
for FAT32
Command (m for help): t
Selected partition 1
Partition type (type L to list all types):c
Changed type of partition 'Linux' to 'W95 FAT32 (LBA)'.
or you can use L
to list all the type and select your choice
Then finally you can conform format and quit using wq
Command (m for help): wq
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Now you can remove unplug and plug again
You can see new drive try writing by making folder & file
Now it must work.