After I used dd
to make a USB drive from an Ubuntu ISO, I am unable to format it for normal use.
I ran:
sudo dd if="ubuntu-16.04-desktop-amd64.iso" of="/dev/sdb" bs=4M
In order to create a bootable USB drive.
However, after I was done with it, I wanted to format it as FAT32 and use it like a normal USB drive.
No problem, should be easy, right? WRONG.
I have tried:
- Using the included Disks application to format it. It threw an error about corrupt GPT tables and wouldn't give me an override option.
- Using Gparted the erase the current partition table and write a new MBR table [completed successfully]
- After that I created a FAT32 partition spanning the entire volume, and remounted. [Showed up in Files, good so far]
- Attempted to copy a file to it. It thre an error saying the medium was read-only.
- Erased the partition table again in Gparted and this time created an NTFS partition spanning the entire disk. [Same RO error when attempting to copy a file onto it]
- Repeated the procedure trying this time with EXT4 [Same RO error]
- Repeated procedure trying a GTP table instead of an MBR table. {Same error]
Finally, I tried running:
sudo hdparm -r0 /dev/sdb
And remounted. Still the same error. Keep in mind that I remounted it after formatting it each time.
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:
using fdisk can be good solution(Be careful not to use wrong drive)
Find your device/disk name:
unmount all of mounted partition
then you wand to select whole partition so
/dev/sdb
then use fdisk to create a partition and format to specific filesystem
Be careful here in selecting disk
then you can use m for help
create a partition table we use DOS partition so
o
then you can print partition table withp
then create new partition using
n
you can hit enter for default choice of one primary partion or choose according to given option
here your default partition is Linux you can change by typing
t
and selectc
for FAT32or you can use
L
to list all the type and select your choiceThen finally you can conform format and quit using
wq
Now you can remove unplug and plug again
You can see new drive try writing by making folder & file
Now it must work.