LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can't format my sandisk flash drive, says write protected. (https://www.linuxquestions.org/questions/linux-newbie-8/cant-format-my-sandisk-flash-drive-says-write-protected-4175504073/)

Bobbiej276 05-06-2014 08:38 AM

can't format my sandisk flash drive, says write protected.
 
I can't format my sandisk flash drive to reuse it. It says write protected. How do I remove write protection? Have linux mint and windows vista to use.

cin_ 05-06-2014 08:58 AM

terminal
 
how are you trying to format the drive? From the command line? Some file manager?

you could check to make sure the hardware lock, if your drive has one, on the drive is in the unlock position

you can mount the partition with full permissions using the mount command in a terminal

Code:

#mkdir /mnt/flashdrive
# sudo mount -o gid=YOUR_GROUP,uid=YOUR_USER_NAME,dmask=1000,fmask=1000 /dev/YOUR_DEVICE_HERE /mnt/flashdrive

then try to format it how you were trying earlier

if you are still having issues you can use this command to format the drive:
Code:

# sudo dd if=/dev/zero of=/dev/YOUR_DEVICE_HERE bs=1M
the sudo should ask you for a password that should overcome any write protections

Soadyheid 05-06-2014 09:02 AM

What sort of Sandisk flash drive do you have? They used to make ones with a built in launcher which allowed you to run portable versions of FireFox, Thunderbird, etc... But on a Windows system only. The Flash drive showed up as two partitions; a CD ROM containing the launcher and portable apps, and the storage area.

If you've one of these getting rid of the CD ROM bit needs a different approach, you can't format a CD rom so it would show as write protected!
If I remember correctly, if the launcher was booted on a Windows systems, (Plugging it in to a running Windows system should cause the Launcher to deploy)you could uncover an option to blow away the System area (the CD bit) and convert it to a storage device only.

After that? Maybe it could be formatted?

Oh! And Welcome to Linux Questions! :D

Play Bonny!

:hattip:

jefro 05-06-2014 03:02 PM

I agree that a small switch may be located on the flash. If not then I'd assume a faulty adapter/ bad flash.

frankbell 05-06-2014 07:22 PM

It's a stab in the dark, but the drive has to be unmounted to be formatted.

maples 05-06-2014 09:11 PM

Quote:

Originally Posted by frankbell (Post 5166008)
It's a stab in the dark, but, if the drive has to be unmounted to be formatted.

I think he's right...you can't format something if it's mounted.

To format it fat32, try
Code:

sudo mkfs.vfat /dev/sdXX
That should work, but I've been wrong before...

Doug G 05-07-2014 08:48 PM

If you do have a sandisk U3 flash drive, and if you have access to a windows machine, there is a utility program you can download from sandisk that will remove the U3 partitions and allow you to use and format the flash drive normally.

EDDY1 05-07-2014 08:54 PM

I have 3 with the U3 still in tact.
I would say that the OP is trying to format that portion.
When I plug mine in it shows a cd mount & usb1.
usb1 being writeable & can be reformatted.


All times are GMT -5. The time now is 05:52 AM.