abarbarian Posted August 16, 2022 Posted August 16, 2022 Here is a right knotty problem for you all to help me with. I have a usb stick and it shows up when I "lsusb" Put brain in gear before pressing enter12:12:10-->Tue Aug 16-->~ -->lsusb Bus 002 Device 002: ID 045b:0210 Hitachi, Ltd Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 28de:1142 Valve Software Wireless Steam Controller Bus 001 Device 008: ID 13fe:5200 Kingston Technology Company Inc. DataTraveler R3.0 Bus 001 Device 004: ID 1532:0083 Razer USA, Ltd RC30-0315, Gaming Mouse [Basilisk X HyperSpeed] Bus 001 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse Bus 001 Device 002: ID 045b:0209 Hitachi, Ltd Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub "fdisk" shows that the usb stick is recognised by the computer, Put brain in gear before pressing enter12:12:19-->Tue Aug 16-->~ -->sudo fdisk -l Disk /dev/sda: 14.44 GiB, 15504900096 bytes, 30283008 sectors Disk model: Patriot Memory Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes However I can not mount it to see what is on the stick or use it. Using "e2fsck" I always get a warning telling me that the usb is read only, Put brain in gear before pressing enter12:24:13-->Tue Aug 16-->~ -->sudo e2fsck -pv /dev/sda e2fsck: Read-only file system while trying to open /dev/sda Disk write-protected; use the -n option to do a read-only check of the device. Using "e2fsck -n" the read only check tells me that the stick has errors, whoope I already knew that, Put brain in gear before pressing enter12:24:35-->Tue Aug 16-->~ -->sudo e2fsck -n /dev/sda e2fsck 1.46.5 (30-Dec-2021) Superblock has an invalid journal (inode 8). Clear? no Journal superblock is corrupt. Fix? no e2fsck: The journal superblock is corrupt while checking journal for /dev/sda e2fsck: Cannot proceed with file system check /dev/sda: ********** WARNING: Filesystem still has errors ********** Using "hdparm" to try and change the read only to write simply gets me this and no changes are made. Put brain in gear before pressing enter12:21:27-->Tue Aug 16-->~ -->sudo hdparm -r0 /dev/sda /dev/sda: setting readonly to 0 (off) readonly = 1 (on) Any thing I try with "gparted" always tells me that the usb is read only. There are no hardware switches on this usb and it has always worked before. So far after extensive searching on the net the only way I have found to access this usb is to make a folder "/mnt/usb" and run this, Put brain in gear before pressing enter12:31:52-->Tue Aug 16-->~ -->sudo mount -o ro,noload /dev/sda /mnt/usb This allows me access the usb via a folder in /mnt and I can create a folder there. Whilst this may be of use to access any data on the usb it is not a workable full time solution. I tried "hdparm" to "Reset device configuration back to factory defaults" with quite hilarious results, Put brain in gear before pressing enter12:46:47-->Tue Aug 16-->~ -->sudo hdparm --dco-restore /dev/sda /dev/sda: Use of --dco-restore is VERY DANGEROUS. You are trying to deliberately reset your drive configuration back to the factory defaults. This may change the apparent capacity and feature set of the drive, making all data on it inaccessible. You could lose *everything*. Please supply the --yes-i-know-what-i-am-doing flag if you really want this. Program aborted. I could not find the " --yes-i-know-what-i-am-doing flag" and reconed that the message was a joke. So the answer I need is to this question. HOW DO I MAKE THE USB GO BACK TO NORMAL ie: so I am able to write to it ????????????????? Quote
sunrat Posted August 16, 2022 Posted August 16, 2022 I would guess it's dead. I've had USB flash drives do that. You could try reformatting: mkfs.vfat -I /dev/sdX replace X with actual drive letter. Or last resort, overwrite the whole thing first: dd if=/dev/zero of= /dev/sdX ; sync What command are you using to try to mount it? And you are using e2fsck whereas USB sticks are usually FAT32 although I would have thought it should say if you are trying to use it on the wrong filesystem. Weird lsusb says it's Kingston but fdisk says it's Patriot. I had a Kingston DataTraveler - possibly the worst usb stick I ever owned. Strange as I have Kingston memory in my current system and it seems very reliable. 1 1 1 Quote
raymac46 Posted August 16, 2022 Posted August 16, 2022 I think I would try an overwrite then maybe use Gparted to set the drive up again with a new partition table and format. I certainly would not use this drive for any mission critical stuff - not with the price of thumbdrives these days. 1 Quote
raymac46 Posted August 16, 2022 Posted August 16, 2022 https://askubuntu.com/questions/957468/how-to-format-readonly-file-system-usb 1 Quote
abarbarian Posted August 16, 2022 Author Posted August 16, 2022 16 minutes ago, sunrat said: Weird lsusb says it's Kingston but fdisk says it's Patriot. Ha I posted the wrong output, it is a Patriot. Some results from your suggestions, -->sudo mkfs.vfat -I /dev/sda mkfs.fat 4.2 (2021-01-31) mkfs.vfat: failed whilst writing FAT -->sudo mkfs.ext4 -I /dev/sda mkfs.ext4: invalid inode size - /dev/sda -->sudo mkfs.ntfs -I /dev/sda Could not open /dev/sda: Read-only file system -->sudo dd if=/dev/zero of=/dev/sda ; sync dd: failed to open '/dev/sda': Read-only file system 20 minutes ago, sunrat said: What command are you using to try to mount it? External drives usually mount automatically on my Arch through PCManFM with udisks I think. I can mount the usb with, Put brain in gear before pressing enter12:31:52-->Tue Aug 16-->~ -->sudo mount -o ro,noload /dev/sda /mnt/usb and this allows me to read and write to the usb. However it does not let me do a new format to the usb as it persistently tells me it is read only. Gparted as stated is of no help as it too keeps telling me that the usb is read only too. Quote
abarbarian Posted August 16, 2022 Author Posted August 16, 2022 30 minutes ago, raymac46 said: https://askubuntu.com/questions/957468/how-to-format-readonly-file-system-usb Yeah well I followed the breadcrumbs and still have a read only usb stick. -->sudo -H mkusb wipe-whole-device /dev/sda partitioning... sfdisk: cannot open /dev/sda: Read-only file system Thanks but all roads seem to lead to a read only usb so far. Quote
raymac46 Posted August 16, 2022 Posted August 16, 2022 You could try Hiren's boot CD which gives a version of Windows (assuming you can't run in Windows natively) and try the USB formatting tools in there. If you can't format in both Windows and Linux, it looks like your thumbdrive is borked. https://www.hirensbootcd.org/ You did try a format on another thumbdrive? If that works then you know it isn't a software problem. Quote
abarbarian Posted August 16, 2022 Author Posted August 16, 2022 1 minute ago, raymac46 said: You could try Hiren's boot CD which gives a version of Windows (assuming you can't run in Windows natively) and try the USB formatting tools in there. If you can't format in both Windows and Linux, it looks like your thumbdrive is borked. https://www.hirensbootcd.org/ You did try a format on another thumbdrive? If that works then you know it isn't a software problem. I have a creaky old W7 pc I can try to use. Thanks I'll give it a try. Quote
raymac46 Posted August 16, 2022 Posted August 16, 2022 BTW I downloaded Hiren's BootCD and it is a pain to get the USB drive working in Linux. I burned it to a DVD and it works fine. I was able to boot up and then format a functioning USB stick in FAT32 with no problem. Quote
V.T. Eric Layton Posted August 16, 2022 Posted August 16, 2022 6 hours ago, abarbarian said: HOW DO I MAKE THE USB GO BACK TO NORMAL ie: so I am able to write to it ????????????????? Simple... The primary issue with the device is stated in your first post above: 6 hours ago, abarbarian said: -->sudo e2fsck -n /dev/sda e2fsck 1.46.5 (30-Dec-2021) Superblock has an invalid journal (inode 8). Clear? no Journal superblock is corrupt. Fix? no e2fsck: The journal superblock is corrupt while checking journal for /dev/sda e2fsck: Cannot proceed with file system check Since the device has a journal error and also a corrupt superblock, you're not going to be able to do much with it until you allow the repairs above where you've answered "no" to attempt to correct the corruption. Rerun the above and "no" to Clear, "yes" to Fix. See of e2fsck can fix it for you. If it's successful, you should be able to mount and read at that point. If it cannot fix the superblock, you may have to Clear it. to make the drive usable, but I believe you'll lose whatever data is on it when you clear the superblock. Quote
V.T. Eric Layton Posted August 16, 2022 Posted August 16, 2022 5 hours ago, abarbarian said: Thanks but all roads seem to lead to a read only usb so far. Again, this is because of the journal error and the corrupted superblock. Allow e2fsck to attempt to Fix the superblock. Quote
goretsky Posted August 17, 2022 Posted August 17, 2022 Hello, A common NAND FLASH failure is when a cell loses the ability to distinguish whether or not it contains a bit (i.e., either a "0" or a "1"). When the on-die controller sees this occurring, it typically (and transparently) maps out the block containing the failed cell(s) with spare blocks. When it runs out of spares, it will typically switch to read-only to preserve the data so that it may be recovered. You might want to try using Christophe Grenier's TestDisk package to see if it can recovery any usable data from the USB flash drive. When that is completed, I would suggest recycling the drive (or perhaps RMAing it if it is still under warranty). Regards, Aryeh Goretsky Quote
wa4chq Posted August 17, 2022 Posted August 17, 2022 I won't be making any suggestions as this is way above my head, but I am curious to see the outcome. Good luck with finding a solution. Quote
abarbarian Posted August 17, 2022 Author Posted August 17, 2022 16 hours ago, V.T. Eric Layton said: Again, this is because of the journal error and the corrupted superblock. Allow e2fsck to attempt to Fix the superblock. See answer below Eric. 23 hours ago, abarbarian said: Put brain in gear before pressing enter12:24:13-->Tue Aug 16-->~ -->sudo e2fsck -pv /dev/sda e2fsck: Read-only file system while trying to open /dev/sda Disk write-protected; use the -n option to do a read-only check of the device. 4 hours ago, goretsky said: You might want to try using Christophe Grenier's TestDisk package to see if it can recovery any usable data from the USB flash drive. Thanks, I can access the usb and put/take data of it, see below, 22 hours ago, abarbarian said: I can mount the usb with, Put brain in gear before pressing enter12:31:52-->Tue Aug 16-->~ -->sudo mount -o ro,noload /dev/sda /mnt/usb and this allows me to read and write to the usb. However it does not let me do a new format to the usb as it persistently tells me it is read only. 20 hours ago, raymac46 said: BTW I downloaded Hiren's BootCD and it is a pain to get the USB drive working in Linux. I burned it to a DVD and it works fine. I was able to boot up and then format a functioning USB stick in FAT32 with no problem. Thanks I will try that as it is probably easier than firing up the W7 pc. Quote
raymac46 Posted August 17, 2022 Posted August 17, 2022 I did get Hiren's BootCD working off a thumbdrive by putting the ISO on a Ventoy drive. Then it worked fine. Quote
V.T. Eric Layton Posted August 17, 2022 Posted August 17, 2022 6 hours ago, abarbarian said: See answer below Eric. Quote
securitybreach Posted August 17, 2022 Posted August 17, 2022 Sorry I missed this post but I always low level format it with dd. If that fails, the drive is usually toast. 1 Quote
abarbarian Posted August 18, 2022 Author Posted August 18, 2022 21 hours ago, V.T. Eric Layton said: On 8/17/2022 at 2:07 PM, raymac46 said: I did get Hiren's BootCD working off a thumbdrive by putting the ISO on a Ventoy drive. Then it worked fine. I was thinking along the same lines and was going to give it a go. Nice to know it will work. 16 hours ago, sunrat said: I bet a dollar it's FUBAR. Yer on. What is a dollar worth ?? 1 Quote
V.T. Eric Layton Posted August 18, 2022 Posted August 18, 2022 1 hour ago, abarbarian said: What is a dollar worth ?? Not much. 1 Quote
sunrat Posted August 18, 2022 Posted August 18, 2022 7 hours ago, abarbarian said: Yer on. What is a dollar worth ?? 16209.71VND https://coinmill.com/AUD_calculator.html#AUD=1 aka 0.57 Pound Sterling (GBP) Or have you converted to Latinum over there since Brexit. 1 Quote
abarbarian Posted August 19, 2022 Author Posted August 19, 2022 17 hours ago, V.T. Eric Layton said: Not much. It is worth more than when travelled in the USA in 1975. Back then I converted 1£ to $2.33, I have been waiting for the conversion rate to rise back to those heady days before I travel to the USA again. 12 hours ago, sunrat said: Or have you converted to Latinum over there since Brexit. Not quite. Here in Wales we are looking at doing away with money altogether and trading with leeks. Blimey you Australians sure do travel a lot that conversion chart covers just about every currency ever heard of. Quote
sunrat Posted August 19, 2022 Posted August 19, 2022 53 minutes ago, abarbarian said: It is worth more than when travelled in the USA in 1975. Back then I converted 1£ to $2.33, I have been waiting for the conversion rate to rise back to those heady days before I travel to the USA again. Back about 12 years ago $AU1 = $US1 and even got higher for a bit. Now it's ~$US0.69 Quote Blimey you Australians sure do travel a lot that conversion chart covers just about every currency ever heard of. It even shows Unobtainium! It's not an AU specific converter. Can convert any currency to any other. Quote
abarbarian Posted August 20, 2022 Author Posted August 20, 2022 On 8/19/2022 at 12:54 PM, sunrat said: Unobtainium! Thought that was a term for all money Quote
zlim Posted August 20, 2022 Posted August 20, 2022 If you want to see the rate climb, I'll pay a visit to Oz! When I was there in '71 - '72, I'd cash in $100US travelers checks (younguns' haven't a clue what those were) and get back $85 or less in AU$. Plus I had to pay something for stamps to cash them in. Canberra didn't charge for the stamps so I'd wait to cash in when I went there and save a little money. I think I did the same in 1980, again when I was there for 7 months. 3 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.