0

I installed Ubuntu (ubuntu-13.04-desktop-amd64) on a 8 gb pendrive. Because it worked pretty slow, I wanted to change it back to a normal pendrive. But this is what happened.

Windows7 can't open the usb drive, can't view files or anything, can't access attributes. When I select to format, it says it can't format it because it is write-protected. Tried the same running from an Ubuntu, and trying from a booted GParted thing. When I view the partitions, they can't be deleted either.

What should I do to get it formatted?

weiszam
  • 11
  • 1
  • 2
  • More information on whats preventing you from it working in GParted is required. Not being able to format a Linux partition on a drive is normal Windows does not support them. – Ramhound Jun 27 '13 at 22:24
  • It also says the drive is write-protected. Can't modifie anything with it really. – weiszam Jun 27 '13 at 22:27
  • There are ways to ignore the write protection. There are lots of tutorials on the subject. – Ramhound Jun 27 '13 at 22:32
  • Could you send me some links? I've searched a lot for ways, tried a lot of things.. – weiszam Jun 27 '13 at 22:37
  • I found this by doing a single search, it was the very first result, funny how that works. http://askubuntu.com/questions/217571/cant-format-delete-locked-partition-from-gparted was the solution and here is the Google search https://www.google.com/#q=how+to+format+a+locked+partition&spell=1&sa=X&ei=f9PMUY32Kona8ASdooCYBA&ved=0CCsQvwUoAA&bav=on.2,or.r_qf.&bvm=bv.48572450,d.eWU&fp=d72bea2a92d28e5d&biw=1920&bih=952 – Ramhound Jun 28 '13 at 00:08
  • 2
    Possible duplicate of [What can I do if my USB flash drive is write-protected or read-only?](http://superuser.com/questions/1125282/what-can-i-do-if-my-usb-flash-drive-is-write-protected-or-read-only) – bwDraco Sep 17 '16 at 05:13

1 Answers1

1

Optionally if gparted can't delete the partitions, you could use dd to clear the device.

Type sudo bash in the terminal of gparted.

Type in dd if=/dev/zero of=/dev/sda bs=4k conv=notrunc

And replace sda with whatever the gparted software shows it as being, sdb, sdf, sdz, etc.

user88311
  • 1,664
  • 2
  • 17
  • 29
  • Okay formatting a lot of times and stuff got me there that I can now use it, but it's still read-only. Can't delete files, but can create new ones. The response tp this dd command you gave me is **dd: 'dev/sdd': Read-only something**. What to do now? – weiszam Jun 28 '13 at 09:37
  • 1
    Try this command. sudo umount /dev/sdb And then sudo fsck.vfat -f -v /dev/sdb Of course replacing sdb with whatever gparted displays. – user88311 Jun 28 '13 at 16:24
  • Here's the console text in: _sudo umount /dev/sdc_ out: _/dev/sdc: not mounted_ in: _fsck.vfat -f -v /dev/sdc_ out: _dosfsck 3.0.16 (01 Mar 2013)_ _dosfsck 3.0.16 01 Mar 2013, FAT32, LFN_ _Currently, only 1 or 2 Fats are supported, not 251._ What do do now? – weiszam Jun 28 '13 at 21:14