How can I wipe a "Read only" flash drive?
Moderator: Forum moderators
- bigpup
- Moderator
- Posts: 7195
- Joined: Tue Jul 14, 2020 11:19 pm
- Location: Earth, South Eastern U.S.
- Has thanked: 931 times
- Been thanked: 1575 times
Re: How can I wipe a "Read only" flash drive?
Have to ask this.
Have you tried plugging the USB stick into different USB ports?
Even on different computers?
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected
- bigpup
- Moderator
- Posts: 7195
- Joined: Tue Jul 14, 2020 11:19 pm
- Location: Earth, South Eastern U.S.
- Has thanked: 931 times
- Been thanked: 1575 times
Re: How can I wipe a "Read only" flash drive?
If you used Ventoy to install something on these drives.
By default, Ventoy select exFAT filesystem for the main partition to hold iso files.
Puppy Linux does not come with support for the exfat file system(format)
Did you ever try this?
Do this from a running newer Puppy version and running normal as root user.
So You are using a newer version of Gparted and have full root ability.
First make sure desktop drive icon for the USB is showing it is not mounted.
If it is mounted.
Unmount it.
Use Gparted to get back to normal setup.
Select the USB stick as device to work on.
Make a new partition table
GParted > Device > Create Partition Table > MS-DOS
This will wipe clean all partitions and data on disk.
End up with unallocated space.
Make a partition and format it fat32.
If does not work.
What error messages do you get?
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected
- peppyy
- Posts: 336
- Joined: Fri Jan 22, 2021 2:11 pm
- Location: VT USA
- Has thanked: 67 times
- Been thanked: 30 times
Re: How can I wipe a "Read only" flash drive?
Can't thank you enough for this post. Saved 2 of my usb 3.0 drives. Now I should be able to use one to put my working copy of fossa64 on it to tweak.
bigpup wrote: Mon Aug 21, 2023 6:31 am
If still no good, may have to first do this and then use Gparted.
In a terminal (console)
Be very careful to identify the USB stick in dev/sd part of command.
In this example it is sdb (desktop drive icons. Should be one for the USB giving it's label sdb, sdc, sdd, etc.......)Code: Select all
dd if=/dev/zero of=/dev/sdb bs=1M count=1
This basically deletes everything on the drive and writes all zeros on it.
Puppy Linux. It just works!
Foassapup 9.5 64-(Frugal) Mobo, M5A99FX PRO - CPU, AMD FX-6300 6 core - mem,32GB - Storage
ssd 128GB M4 - ssd-256GB APS - ssd-1TB PNY - GPU GeForce GTX 1060 GAMING X 6G. Yes it's a Mutt.
Re: How can I wipe a "Read only" flash drive?
Hello all,
i got one of this usb stick of 256gb https://www.amazon.co.uk/SanDisk-Ultra- ... 07857Y17V
and the command line didn't work any other solutions ? thxx in advance
Why astronauts use Linux
Because you can't open windows in space
- wizard
- Posts: 2023
- Joined: Sun Aug 09, 2020 7:50 pm
- Location: Oklahoma, USA
- Has thanked: 2739 times
- Been thanked: 706 times
Re: How can I wipe a "Read only" flash drive?
@AntonioPt
command line didn't work any other solutions
Have you tried the solutions in the other post?
wizard
Big pile of OLD computers
Re: How can I wipe a "Read only" flash drive?
I don't know if this is helpful, but I thought I'd drop it in...
One of my USB ports has become a bit wobbly, which has resulted in drives suddenly becoming disconnected while still in use. This freezes the session and I have no option but to power off and reboot - at which point they become connected again as read-only. I've established there's no point in trying to repair/overwrite them only for the same thing to happen again, so (when I remember!) I now only connect them to the other port which is still good.
I didn't want to lose the data already on them, but discovered that GParted could clear the "dirty bit" without destroying data. To try this: unmount the drive if it's already mounted, then open GParted and select the drive in question. Right-click it, choose 'Check' and click the green tick.
I reboot after this, but I don't know if that's necessary. Anyway, it might then give you the option of reformatting, repartitioning or whatever you want to do with it. In my own case, I can carry on using it as before.
Re: How can I wipe a "Read only" flash drive?
wizard wrote: Wed Jan 08, 2025 6:38 pm@AntonioPt
command line didn't work any other solutions
Have you tried the solutions in the other post?
wizard
yeah i have tried without no luck this is the 2 USB that i have this issue first USB i screw up then i found a tool in Windows to turn around but i don't wanna do the some to this one even tho i didn't lose nutting yet since im still able to copy all,... i even made a backup but have hope to restore it and thxx for the tips
Why astronauts use Linux
Because you can't open windows in space
- mikewalsh
- Moderator
- Posts: 6277
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 837 times
- Been thanked: 2030 times
Re: How can I wipe a "Read only" flash drive?
wizard wrote: Sun Aug 20, 2023 9:46 pm@mikewalsh
On the drives I was was working with Rosa's clear button worked when the dd command did not. Also, does it in a fraction of the time required by dd.
Thanks
wizard
@wizard :-
Y'know, upon re-scanning this thread, it occurred to me; with reference to your mention of RosaImageWriter's 'Clear' button - and your comment about how much quicker it was - I suspect the 'Clear' button is merely running the 'short' dd command that simply overwrites the first few sectors on a drive.....where the file allocation table & MBR reside. This is the same 'dd' command that @bigpup referenced further into the thread:-
Code: Select all
dd if=/dev/zero of=/dev/sdb bs=1M count=1
Still, I must agree with @Jafadmin's assessment, too. 'Dd' does NOT respect permissions OR ownership, since it's working at a very low level (and it's why you need to exercise such care over its use). Whatever you tell it to do, that's exactly what it does...
Naturally - as most of us here that do this stuff at all regularly will be aware - once that's been executed the drive will, to all intents & purposes, BE "blank" once more......because the controller will no longer be able to "see" any remaining data that's still on the drive. Thus, hardware failure can't be ruled out where everything fails to produce the desired result.
Would you say that's a fair assessment? Or have I got hold of the wrong end of the stick? (Wouldn't be the first time!)
Mike.
- wizard
- Posts: 2023
- Joined: Sun Aug 09, 2020 7:50 pm
- Location: Oklahoma, USA
- Has thanked: 2739 times
- Been thanked: 706 times
Re: How can I wipe a "Read only" flash drive?
@mikewalsh
your comment about how much quicker it was - I suspect the 'Clear' button is merely running the 'short' dd command that simply overwrites the first few sectors on a drive.....where the file allocation table & MBR reside. This is the same 'dd' command that @bigpup referenced further into the thread:-
Good thought, will run a test and compare the result.
On the subject of Rosa Image Writer, noticed the link http://wiki.rosalab.ru/en/index.php/ROSA_ImageWriter is dead and couldn't find any new working links. That link is Russian, so may be related to the turmoil there. Rosa is still a useful and valid tool for installing Puppy and don't know of a equivalent for it's job. Will ask @rockedge if it's possible to host a copy on the forum since it is a free, open source program.
Thanks
wizard
Big pile of OLD computers
- mikewalsh
- Moderator
- Posts: 6277
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 837 times
- Been thanked: 2030 times
Re: How can I wipe a "Read only" flash drive?
@wizard :-
Rosa is still a useful and valid tool for installing Puppy and don't know of a equivalent for it's job. Will ask @rockedge if it's possible to host a copy on the forum since it is a free, open source program.
Yup, I'll second you on that one. I've used it on odd occasions myself, when I remember it's there..............and it will produce a working, bootable Puppy without ANY fuss. Not too many non-Puppy installers seem capable of doing that.
I'd be more than happy to host 'em myself. Upload them to MediaFire - more easily accessible for many, it seems - and create a 'locked' thread in the HOW-TO -> Install subsection with a link. My links won't be going dead anytime soon, though actually ON the forum server would be better, of course.
See what Erik says first, then we'll take it from there. I have both arches available, so.....it's do-able.
Mike.
- rockedge
- Site Admin
- Posts: 6698
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 2896 times
- Been thanked: 2734 times
- Contact:
Re: How can I wipe a "Read only" flash drive?
I think we can offer it right from our Puppy Linux server!
I look into setting it up.
-
- Posts: 3979
- Joined: Fri Jul 24, 2020 10:59 pm
- Has thanked: 1668 times
- Been thanked: 539 times
Re: How can I wipe a "Read only" flash drive?
In the meantime, is this helpful link to Rosa Image Writer
- wizard
- Posts: 2023
- Joined: Sun Aug 09, 2020 7:50 pm
- Location: Oklahoma, USA
- Has thanked: 2739 times
- Been thanked: 706 times
Re: How can I wipe a "Read only" flash drive?
@rockedge
Thanks rock, let me know and will try to change any dead links in the forum. Have a 64bit copy if you need it.
@Clarity
Did see that, we may want to extract/convert and test for Puppy.
Thanks
wizard
Big pile of OLD computers
- mikewalsh
- Moderator
- Posts: 6277
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 837 times
- Been thanked: 2030 times
Re: How can I wipe a "Read only" flash drive?
rockedge wrote: Thu Jan 09, 2025 4:52 pmI think we can offer it right from our Puppy Linux server!
I look into setting it up.
@rockedge :-
Do bear in mind it's a bit bigger than the standard upload limit will allow for, Erik. Unpacked, each one is around 15 MB (with its associated language files).
I'll pack them up with XZ compression if ya like, but I'll need somewhere to upload 'em to. Or I'll upload 'em to MediaFire and I'll give you the link for 'em. Okay with you?
===============================
(Later) 'Kay, here's your link; both builds packed with XZ compression (around 5.2, 5.3 MB):-
https://www.mediafire.com/folder/5kvqm6 ... mageWriter
@wizard :-
These definitely work in every Puppy in MY "kennels".....all fairly mainstream Pups.
Mike.
- wizard
- Posts: 2023
- Joined: Sun Aug 09, 2020 7:50 pm
- Location: Oklahoma, USA
- Has thanked: 2739 times
- Been thanked: 706 times
Re: How can I wipe a "Read only" flash drive?
@mikewalsh
your comment about how much quicker it was - I suspect the 'Clear' button is merely running the 'short' dd command that simply overwrites the first few sectors on a drive.....where the file allocation table & MBR reside. This is the same 'dd' command that @bigpup referenced further into the thread:-
Tested Rosa and:
Code: Select all
dd if=/dev/zero of=/dev/sdb bs=1M count=1
(in terminal), they are both instant.
Both clear the ISO9660 (which is read-only) formating from the USB drive. Both also delete all of the USB drive contents.
After running, you MUST remove and re-insert the USB, then:
-open Gparted
-select the correct USB
-Device>Create Partition Table>msdos
When the partiton table is installed you can then create new partitions as usual.
Probably like Rosa better for most users since it is GUI, otherwise you have to be very careful to edit the dd command for the correct USB.
Thanks
wizard
Big pile of OLD computers
Re: How can I wipe a "Read only" flash drive?
@mikewalsh The "dd cmd" you listed does not work to clear"read only". I have about 8 (combined) chips
and flash drives that somehow got corrupted to read only, that I want to wipe clean, but so far, have not found any app or cmd
that can do it. Believe me, I've tried a lot.
- wizard
- Posts: 2023
- Joined: Sun Aug 09, 2020 7:50 pm
- Location: Oklahoma, USA
- Has thanked: 2739 times
- Been thanked: 706 times
Re: How can I wipe a "Read only" flash drive?
@tosim
Code: Select all
/dev/sdb2
is the wrong syntax, change to:
Code: Select all
/dev/sdb
then try it
wizard
Big pile of OLD computers
- wizard
- Posts: 2023
- Joined: Sun Aug 09, 2020 7:50 pm
- Location: Oklahoma, USA
- Has thanked: 2739 times
- Been thanked: 706 times
Re: How can I wipe a "Read only" flash drive?
@tosim
Out of ideas on that Are the drives recognized in Gparted?
Thanks
wizard
Big pile of OLD computers
- wizard
- Posts: 2023
- Joined: Sun Aug 09, 2020 7:50 pm
- Location: Oklahoma, USA
- Has thanked: 2739 times
- Been thanked: 706 times
Re: How can I wipe a "Read only" flash drive?
@tosim
Guessing the ones that are not recognized are dead, you might try Gparted>Device>Create Partition Table>msdos to see if it can rewrite the PT.
wizard
Big pile of OLD computers
Re: How can I wipe a "Read only" flash drive?
@wizard Have tried that-negative results. Also tried with several partition apps-all negative.
A couple of the flash drives are fairly new 64GB US made drives, and would hate to part with them. Somehow there's got
to be a cmd to do the job.
-
- Posts: 3979
- Joined: Fri Jul 24, 2020 10:59 pm
- Has thanked: 1668 times
- Been thanked: 539 times
Re: How can I wipe a "Read only" flash drive?
Yeah, @tosim your results are the same as I have had for about a decade. The couple USBs that I have gotten at business shows were readable for its contents, but, there was no path found to reformat/rewrite them. Last one I threw out seemingly was either a 1-2GB capacity or a 4GB USB ... cant remember.
Seems that some businesses have a method of creating some USBs where they cannot be reused.
Following this thread to see if some solution evolves that I can use, too, in the future.