Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-06-2014, 09:38 AM   #1
LQ Newbie
Registered: Mar 2008
Posts: 1

Rep: Reputation: 0
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.
Old 05-06-2014, 09:58 AM   #2
Registered: Dec 2010
Posts: 277

Rep: Reputation: 24

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

#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:
# 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

Last edited by cin_; 05-06-2014 at 09:58 AM. Reason: gramm`err
Old 05-06-2014, 10:02 AM   #3
Senior Member
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 17.3 and 18.2 at present.
Posts: 1,293

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
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!

Play Bonny!

Old 05-06-2014, 04:02 PM   #4
Registered: Mar 2008
Posts: 17,101

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

Last edited by jefro; 05-07-2014 at 05:11 PM.
Old 05-06-2014, 08:22 PM   #5
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,773
Blog Entries: 17

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

Last edited by frankbell; 05-07-2014 at 09:36 PM. Reason: Correct grammatical error
Old 05-06-2014, 10:11 PM   #6
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 813

Rep: Reputation: 264Reputation: 264Reputation: 264
Originally Posted by frankbell View Post
It's a stab in the dark, but, if the drive has to be unmounted to be formatted.
I think he's can't format something if it's mounted.

To format it fat32, try
sudo mkfs.vfat /dev/sdXX
That should work, but I've been wrong before...
Old 05-07-2014, 09:48 PM   #7
Doug G
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
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.
Old 05-07-2014, 09:54 PM   #8
LQ Addict
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine if USB flash drive is write protected richw42 Programming 2 07-02-2012 05:32 PM
USB flash write protected vijayabcdef Linux - Hardware 4 09-14-2011 12:00 PM
Can't format USB flash drive, write protection krisbitner Linux - Hardware 5 02-07-2007 04:18 PM
Make a bootable Flash drive with Sandisk loninappleton Linux - Hardware 2 02-06-2006 04:02 PM
Slackware 10.1 and SanDisk USB Flash Drive bleedingturnips Linux - Hardware 2 09-14-2005 12:20 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:04 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration