How can I wipe a "Read only" flash drive?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

esos
Posts: 201
Joined: Thu Feb 18, 2021 4:33 am
Been thanked: 20 times

Re: How can I wipe a "Read only" flash drive?

Post by esos »

User avatar
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?

Post by bigpup »

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

tosim
Posts: 489
Joined: Thu Jul 23, 2020 1:13 pm
Has thanked: 933 times
Been thanked: 66 times

Re: How can I wipe a "Read only" flash drive?

Post by tosim »

@bigpup Yes-with same results-Nada. Thanks for asking though.

User avatar
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?

Post by bigpup »

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

User avatar
peppyy
Posts: 335
Joined: Fri Jan 22, 2021 2:11 pm
Location: VT USA
Has thanked: 66 times
Been thanked: 28 times

Re: How can I wipe a "Read only" flash drive?

Post by peppyy »

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.

User avatar
AntonioPt
Posts: 252
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 107 times
Been thanked: 44 times

Re: How can I wipe a "Read only" flash drive?

Post by AntonioPt »

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

User avatar
wizard
Posts: 2014
Joined: Sun Aug 09, 2020 7:50 pm
Location: Oklahoma, USA
Has thanked: 2734 times
Been thanked: 702 times

Re: How can I wipe a "Read only" flash drive?

Post by wizard »

@AntonioPt

command line didn't work any other solutions

Have you tried the solutions in the other post?

wizard

Big pile of OLD computers

redquine
Posts: 43
Joined: Sat Jun 13, 2020 12:38 pm
Has thanked: 126 times
Been thanked: 14 times

Re: How can I wipe a "Read only" flash drive?

Post by redquine »

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.

User avatar
AntonioPt
Posts: 252
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 107 times
Been thanked: 44 times

Re: How can I wipe a "Read only" flash drive?

Post by AntonioPt »

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

User avatar
mikewalsh
Moderator
Posts: 6276
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 837 times
Been thanked: 2027 times

Re: How can I wipe a "Read only" flash drive?

Post by mikewalsh »

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!) :lol:

Mike. ;)

User avatar
wizard
Posts: 2014
Joined: Sun Aug 09, 2020 7:50 pm
Location: Oklahoma, USA
Has thanked: 2734 times
Been thanked: 702 times

Re: How can I wipe a "Read only" flash drive?

Post by wizard »

@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

User avatar
mikewalsh
Moderator
Posts: 6276
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 837 times
Been thanked: 2027 times

Re: How can I wipe a "Read only" flash drive?

Post by mikewalsh »

@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. ;)

Post Reply

Return to “Users”