Page 1 of 1
Several flash drives suddenly became read-only. What to do?
Posted: Wed Apr 27, 2022 5:23 pm
by tosim
A few flash drives have suddenly become "read-only". I've tried out many times the 3 commands shown in attachment, to no avail. Have read, and re-read lots of cmd info, but have
gotten nowhere. BTW-Drives are NOT in locked status. I'm pretty sure I've gotten something(s) missing in the writing of my commands. Any assistance will be gratefully accepted.
Thanks a lot.
- cmds.jpg (15.79 KiB) Viewed 3614 times
Re: Proper Command(s)
Posted: Wed Apr 27, 2022 8:55 pm
by williams2
Are you running Puppy? or some other OS?
If you are running Puppy, as user root
, then you don't need sudo
If you are running as user spot
spot can not use sudo
If you are not running Puppy, you probably do need sudo.
chown -R 777 /dev/sdb
is wrong. It should be something like
chown -R root:disk /dev/sdb1
But, chmod
and chown
should not be needed. {they work on files and directories that are in a file system.)
/devsdb, /dev/sdb1. /dev/sdb2 etc. etc. are block devices. They are not file systems.
Block devices are not file systems, but they can contain file systems that can be mounted on a mount point.
What does this show ls -l /dev/sdb*
?
fdisk -l /dev/sdb
might give you more information, like is the partition table dos or gpt?
Or is there any partition table?
Re: Several flash drives suddenly became read-only. What to do?
Posted: Thu Apr 28, 2022 2:04 pm
by bigpup
A few flash drives have suddenly become "read-only".
Anything specific, you did to them, before they started having this issue?
There are a few formats that are read only.
What does Gparted show as the format on them?
Most modern USB drives.
When they start having physical read write problems.
The internal controller will lock into read only.
This will allow you to still read the drive.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Thu Apr 28, 2022 3:02 pm
by tosim
@williams2 @bigpup Thank you both for the replies. Flash drives are msdos, and partitioned mostly ext4. I was attempting these commands
while using Mint. Nothing specifically, was done to cause this. Would still, PLEASE, show proper command(s) to run. Please see attachments.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Thu Apr 28, 2022 6:37 pm
by Flash
I don't think Linux can read exFAT file systems without help.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Fri Apr 29, 2022 6:43 am
by bigpup
I was attempting these commands while using Mint
This is a Puppy Linux forum and talking about how Puppy Linux works.
You need to ask about this in a Mint forum.
If you are using a Puppy Linux version, maybe we can figure it out.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Fri Apr 29, 2022 2:07 pm
by tosim
@bigpup You are correct;I apologize.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Sat Apr 30, 2022 12:04 am
by mikeslr
Actually, tosim, before contacting Linux Mint, it might be useful to see if reformatting some flash-drives using Puppys' gparted also creates the problem; or Linux Mint's gparted to format a Linux Ext3 partition. Puppys' gparted can not create a 64-bit Linux Ext4 partition. But testing alternatives may serve to identify whether this is a gparted problem, or a LinuxMint implementation of gparted problem and, if so, under what circumstance.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Sat Apr 30, 2022 12:49 am
by williams2
Puppys' gparted can not create a 64-bit Linux Ext4 partition.
That might not be true.
You can create a file system with 64 bit addresses like this:
mkfs.ext4 -n -b 4096 -O 64bit /dev/sdX
You can create a file system with 32 bit addresses like this:
mkfs.ext4 -n -b 4096 -O ^64bit /dev/sdX
The config file is /etc/mke2fs.conf
where you can set whether the default is 64bit or ^64bit (not 64 bit).
If gparted uses the configuration file /etc/mke2fs.conf
then maybe you can configure it to use 64 bit addresses or not
as opposed to 32 bit addresses (not 64 bit)
Like this: features = 64bit,has_journal,extent,huge_file, ...
Re: Several flash drives suddenly became read-only. What to do?
Posted: Sat Apr 30, 2022 1:02 pm
by mikewalsh
@tosim :-
tosim wrote: ↑Fri Apr 29, 2022 2:07 pm
@bigpup You are correct;I apologize.
Don't take it too much to heart. While bigpup is undoubtedly right, he's on an "efficiency" kick ATM; the rest of us will just have to suffer while he works it out of his system....
@bigpup :-
We luv ya really, mate!
Mike.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Sat Apr 30, 2022 2:09 pm
by tosim
@mikeslr @mikewalsh @williams2 Thanks to the three of you. Actually, I had planned on trying out the chmod and chown commands
later today when I will be using FossaPup64, or possibly one of my other pups. I will update as necessary, and THANKS to y'all again.
UPDATE: Using (and writing this from) JammyPup32. Using gParted, I tried wiping out the 2 partitions on the flash drive, to no avail. Got the same "Read only" message. Also, tried using
the chmod and chown commands to no avail. I cleared the terminal and ran "that dd command) from one of the Mike's postings. Please see attachment. Thank all of you again.
- Screenshot.png (51.5 KiB) Viewed 3927 times
Re: Several flash drives suddenly became read-only. What to do?
Posted: Sun May 01, 2022 8:33 am
by fredx181
Hi tosim, there's one typo in the dd command line, needs to be /dev/sdc (slash at front), so:
dd if=/dev/zero of=/dev/sdc bs=512 count=1 conv=notrunc
If then it still says "read only", perhaps you can try with Gparted "create partition table" to wipe the sdc flash-disk.
EDIT: Make sure first that sdc1 and sdc2 are not mounted.
- 2022-05-01_10-30-17.png (16.34 KiB) Viewed 3909 times
Re: Several flash drives suddenly became read-only. What to do?
Posted: Sun May 01, 2022 1:53 pm
by tosim
- fred.png (8.23 KiB) Viewed 3887 times
@fredx181 Thanks for the correction, and suggestion. However, after running the command, I got a denial due to read-only; same denial when using "Create Partition Table" in gParted.
I'm really at a loss now. I hate to just throw away this not very old 64GB flash drive. Here's a crazy thought: I still have(and use to magnetize), a magnet that used to be on a magnetron tube from a very
high powered air search radar. Do you think I could try rubbing the flash drive against it might work? (Again, maybe just a crazy thought.)
Re: Several flash drives suddenly became read-only. What to do?
Posted: Sun May 01, 2022 2:33 pm
by rcrsn51
Run: hdparm -r /dev/sdb
Does it show the flash drive as read-only?
If so, run: hdparm -r0 /dev/sdb
If it continues to be read-only, run: dmesg
Look for error messages when the drive is plugged in.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Sun May 01, 2022 5:12 pm
by tosim
@rcrsn51 Thanks for your suggestion.
However, still getting same error messages. Also, the dmesg showed read only for the drive.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Sun May 01, 2022 5:56 pm
by williwaw
try this search term for info from the Ubuntu site (not all engines accept this particular syntax)
Code: Select all
usb read only failed to open file system site:https://askubuntu.com/questions
if you chase a few links at the site you will find numerous possibilities for your problem
Re: Several flash drives suddenly became read-only. What to do?
Posted: Mon May 02, 2022 9:06 am
by bigpup
In Fossapup64 booting the computer.
Plug the USB drive in, but do not mount it.
Run Gparted program with the USB drive selected as device to work on.
Post an image of what Gparted is showing.
Fossapup64 has the program Take a Shot that can make the image.
Need to see exactly what is on the USB drive.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Mon May 02, 2022 3:38 pm
by fredx181
@tosim
williwaw wrote: ↑Sun May 01, 2022 5:56 pm
try this search term for info from the Ubuntu site (not all engines accept this particular syntax)
Code: Select all
usb read only failed to open file system site:https://askubuntu.com/questions
if you chase a few links at the site you will find numerous possibilities for your problem
Or search for posts at ubuntu forum, e.g. usb read only /dev/sdb site:ubuntuforums.org
For example, this post looks very similar to your problem: https://ubuntuforums.org/showthread.php?t=2030703
One suggestion there is to use the "HP USB Disk Storage Format Tool" (and/or other) on Windows, worth trying perhaps (if you have Windows).
Re: Several flash drives suddenly became read-only. What to do?
Posted: Mon May 02, 2022 4:32 pm
by tosim
@bigpup Attached are 3 ss'.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Mon May 02, 2022 6:00 pm
by tosim
@fredx181@williwaw Well, I did as you suggested, went to:
For example, this post looks very similar to your problem: https://ubuntuforums.org/showthread.php?t=2030703, and tried every cmd(some several times), on those 3 pages. All to no avail.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Mon May 02, 2022 9:54 pm
by Clarity
I use Ventoys, a lot, along with booting SG2D ISOs that are located in /BOOTISOS on the exFAT partition where ALL of my ISOs are kept for good housekeeping reasons.
I have too many machines and too many variations of booting Ventoys (ie MSDOS, GPT, non-Secureboot, Secureboot)for 4 different combinations of Ventoys.
I have been meaning to make a spreadsheet to layout what works on each of which BIOS/UEFI PCs I have. But the combinations became too many to post...not to mentions that depending on which Ventoy I use, the booting behaviors were also "inconsistently confusing" to understand and explain NOT TO MENTION would have to be machine by machine as their firmwares are different.
@tosim
which VERSION of Ventoy are you using?
Is it in /BOOTISOS folder or plopped into root?
Is the UEFI in normal mode with secureboot off or on?
Is the UEFI in legacy mode ?
Is your booting Ventoy a USB stick or a USB drive?
And are you using a KVM switching the USB-Video-keyboard-mouse between multiple PCs?
For me, my config is several combinations of these that I test. On one set of test-bench, I am using Ventoy v54 refusing to upgrade it (today's version is v74).
I have not experience your 'ro' experiences. Lastly, I ask, does this problem exist on just the Ventoy drive or does all of your system drives list as 'ro' after reaching desktop? Issue the mount command on a pristine boot to check...looking for disks that you mount showing up as 'ro' or as 'rw'...when mounted.
BTW: exFAT is NOT a native format that many PUPs understand. Even though exFAT is standardized and has been around for years, PUPPY is SLOW to both recognize and do something about it in the builds found on the forum. Thus, if you try to mount in on a PUP that doesn't have the means, if will NOT mount!
Re: Several flash drives suddenly became read-only. What to do?
Posted: Tue May 03, 2022 4:55 pm
by bigpup
Try this.
Boot Fossapup64 9.5
Plug the USB into computer.
Do not mount it.
See what it is identified as by the drive icon on the lower left of the desktop. (could be sdb, sdc, sdd, etc.....)
Should be a drive icon for each partition on the USB.
Example sdb with two partitions will have sdb1 and sdb2 drive icons are on desktop.
In a console or terminal.
For 1st partition.
Do the same for the 2nd partition.
If you get errors and corrections.
Run command again to make sure the corrections no longer needed.
Should just give some information nothing about errors.
Now see if you are still getting read only errors.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Wed May 04, 2022 5:52 am
by bigpup
Not if the USB drives are actually physically damaged.
Something is drastically broken in some of the memory modules. Bad blocks.
The internal controller will lock them to read only.
Booting Fossapup64 9.5 to run the computer, using Linux commands in it.
Run the commands in a terminal. console.
USB drive not mounted.
You could check for bad memory blocks on the USB.
Warning: This will destroy any previously stored data on your USB pen/stick. Make sure you choose correct USB device name under Linux.
Example: if the USB is identified as sdb
run the following command to search a device for bad blocks:
Code: Select all
badblocks -w -s -o error.log /dev/sdb
Where options are as follows:
-w : Use write-mode test to scans for bad blocks by writing some patterns on every block of the device, reading every block and comparing the contents.
-s : Show the progress of the scan.
-o error.log : Write the list of bad blocks to the error.log file in the current working directory.
Use the cat command to view error.log:
If it does find some bad blocks.
If they are not too many.
Next thing is to make them not seen, so they will not be tried to use.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Thu May 05, 2022 5:46 pm
by tosim
@bigpup Did as you suggested above. Thank you.
- flash.png (33.3 KiB) Viewed 4181 times
- flash2.png (30.09 KiB) Viewed 4181 times
Re: Several flash drives suddenly became read-only. What to do?
Posted: Thu May 05, 2022 5:54 pm
by rcrsn51
Because the kernel reported a problem with the device in dmesg, I suspect that nothing you try in user space will fix it.
You said "several flash drives". It seems unusual that several drives would fail together. I wonder if you are plugging them into a defective USB port that is damaging them.
Re: Several flash drives suddenly became read-only. What to do?
Posted: Thu May 05, 2022 6:20 pm
by tosim
@rcrsn51 Thanks for the reply. No, all of my usb slots are, and have been, working correctly. I think it might just be time
to "bite the bullet", and throw it out. Thanks to all of you who answered my "call for help".