Prexy
July 24, 2021, 6:08pm
#1
This should be easy but I can’t get it to work. I have a 2 GB usb drive with Linux Mint on it. I want to recover the drive for storing files. I first tried deleting files, just to make room. That didn’t work, even using shift+delete. Next I tried to format the drive via yast but that didn’t work. I don’t have the error copied to show, but I next tried to format via the terminal. That failed too. Here is the output:
**DESKTOP-3006QM4:/home/prexy #** umount /dev/sdc1
**DESKTOP-3006QM4:/home/prexy #** mkfs.vfat /dev/sdc1
mkfs.fat 4.2 (2021-01-31)
mkfs.vfat: unable to synchronize /dev/sdc1:Input/output error
Checking properties, this is listed as a read-only file system. I tried, via a dialog box, to change the properties to include write. I get no error message but I still cannot delete any files. I have not tried gparted because it is not installed and if yast and the cli didn’t work, I don’t think gparted will either.
use “dd” to clear the start of the usb stick - ensure you have the correct device as sd(X)
dd if=/dev/zero of=/dev/sd(X) bs=1024 count=1024
Then partition/format the stick as you want it.
Prexy
July 25, 2021, 6:22am
#3
tannington:
use “dd” to clear the start of the usb stick - ensure you have the correct device as sd(X)
dd if=/dev/zero of=/dev/sd(X) bs=1024 count=1024
Then partition/format the stick as you want it.
dd seemed to work but I still cannot delete files or partition the drive.
dd if=/dev/zero of=/dev/sdc1 bs=1024 count=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.196349 s, 5.3 MB/s
The mkfs command gave the same error as I showed previously. I tried to partition via yast and got an error that leads me to believe the drive is just defective.I tried to format as FAT and this message box popped up.
command '/usr/sbin/parted --script '/dev/sdc' mklabel gpt' failed:
stderr:
Error: Input/output error during write on /dev/sdc
exit code:
1
Knowing why this won’t work is more important to me than the little drive itself. Could the fact that it has an iso of Mint on it be the source of the problem? In any case, thanks for trying to help.
hcvv
July 25, 2021, 12:14pm
#4
What you did is not what was suggested. Suggested was (in this case I have filled in the c, because that seems to be the correct device, at least in your posts above):
dd if=/dev/zero of=/dev/sdc bs=1024 count=1024
What you did was:
dd if=/dev/zero of=/dev/sdc1 bs=1024 count=1024
So the suggestion was to erase over the partition table).
What you did was erasing the begin of partition 1, which has destroyed crucial information of the file system on it (when there was one on it).
Please try to understand the difference between a mass-storage device and the eventual partitions on them (defined in the partition table at the begin of the device).
Also it is not clear to me while you are trying to remove files from the file system on sdc1, when you want to create a new file system there. Creating a new file system on a container destroys all that was on it before.
I may understand you wrong, but I have the idea that what you want is:
forget (because you are not interested in) what is now on the device;
create a fresh file system (of a type to be decide upon by you) on the device, or
alternatively partition the device into one (or more) partitions and using at least one partition for a file system of your choice.
Prexy:
dd seemed to work but I still cannot delete files or partition the drive.
dd if=/dev/zero of=/dev/sdc1 bs=1024 count=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.196349 s, 5.3 MB/s
The mkfs command gave the same error as I showed previously. I tried to partition via yast and got an error that leads me to believe the drive is just defective.I tried to format as FAT and this message box popped up.
command '/usr/sbin/parted --script '/dev/sdc' mklabel gpt' failed:
stderr:
Error: Input/output error during write on /dev/sdc
exit code:
1
Knowing why this won’t work is more important to me than the little drive itself. Could the fact that it has an iso of Mint on it be the source of the problem? In any case, thanks for trying to help.
Hi
Blow away the partition table and start again, MAKE SURE YOU PICK THE RIGHT DISK !!!
wipefs -a /dev/sdc1
wipefs -a /dev/sdc
Use gdisk or fdisk to create a new partition.
Prexy
July 26, 2021, 5:04pm
#7
I have tried, in turn, all of these suggestions. All fail with the error that sdc is a read-only file system
dd if=/dev/zero of=/dev/sdc bs=1024 count=1024
dd: failed to open '/dev/sdc': Read-only file system
wipefs -a /dev/sdc
wipefs: error: /dev/sdc: probing initialization failed: Read-only file system
fdisk /dev/sdc
Welcome to fdisk (util-linux 2.36.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
fdisk: cannot open /dev/sdc: Read-only file system
I also tried yast again. I have been trying to make a FAT partition but the suggested choice is always XFS. I accepted that and got the identical error as FAT:
command '/sbin/mkfs.xfs -q -f '/dev/sdc'' failed:
stderr:
mkfs.xfs: cannot open /dev/sdc: Read-only file system
exit code:
1
I wonder if running it across a giant magnet would work. Once again, thanks to all.
hcvv
July 26, 2021, 5:27pm
#8
So, let us concentrate on the first error message and try to solve that instead of doing wilder and wilder actions.
To begin with, as is adsked many times in many threads, please copy/paste complete. Specially the line with the command. We now have the command and the output, but NOT the prompt. So we can not check WHO did those commands.
Please show
ls -l /dev/sdc*
And also
ls -l /dev/disk/* | grep sda*
and
mount | grep ro,
Additionally:
Probably worth looking at ‘dmesg’ to see if any relevant output shows up when the drive is plugged in, specifically relating to ‘write protect’.
Possibly the usb stick is failing and it’s internal controller has set the SWP bit.
Also worth checking, it (the usb stick) isn’t one of the very odd few that have a physical write protect switch. (I’ve only ever seen one of those and don’t recall what brand it was).
hcvv
July 26, 2021, 7:08pm
#10
I agree. It is worthwhile to check if it isn’t the whole stick that is read-only.
Prexy
July 26, 2021, 9:59pm
#11
I did check to see if the problem was a simple as a switch. No switch. But, I didn’t think to check right away!
**DESKTOP-3006QM4:/home/prexy #** ls -l /dev/sdc*
brw-rw---- 1 root disk 8, 32 Jul 26 15:44 **/dev/sdc**
**DESKTOP-3006QM4:/home/prexy #** ls -l /dev/disk/* | grep sda*
lrwxrwxrwx 1 root root 9 Jul 26 10:04 ata-SHGS31-500GS-2_ES0AN87701020B16T -> ../../**sd**b
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ata-SHGS31-500GS-2_ES0AN87701020B16T-part1 -> ../../**sd**b1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ata-SHGS31-500GS-2_ES0AN87701020B16T-part2 -> ../../**sd**b2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ata-SHGS31-500GS-2_ES0AN87701020B16T-part3 -> ../../**sd**b3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ata-SHGS31-500GS-2_ES0AN87701020B16T-part4 -> ../../**sd**b4
lrwxrwxrwx 1 root root 9 Jul 26 10:04 ata-TOSHIBA_DT01ACA100_475GV89MS -> ../../**sda**
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ata-TOSHIBA_DT01ACA100_475GV89MS-part1 -> ../../**sda**1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ata-TOSHIBA_DT01ACA100_475GV89MS-part2 -> ../../**sda**2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ata-TOSHIBA_DT01ACA100_475GV89MS-part3 -> ../../**sda**3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ata-TOSHIBA_DT01ACA100_475GV89MS-part4 -> ../../**sda**4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ata-TOSHIBA_DT01ACA100_475GV89MS-part5 -> ../../**sda**5
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ata-TOSHIBA_DT01ACA100_475GV89MS-part6 -> ../../**sda**6
lrwxrwxrwx 1 root root 9 Jul 26 10:04 scsi-0ATA_SHGS31-500GS-2_ES0AN87701020B16T -> ../../**sd**b
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-0ATA_SHGS31-500GS-2_ES0AN87701020B16T-part1 -> ../..
/**sd**b1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-0ATA_SHGS31-500GS-2_ES0AN87701020B16T-part2 -> ../..
/**sd**b2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-0ATA_SHGS31-500GS-2_ES0AN87701020B16T-part3 -> ../..
/**sd**b3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-0ATA_SHGS31-500GS-2_ES0AN87701020B16T-part4 -> ../..
/**sd**b4
lrwxrwxrwx 1 root root 9 Jul 26 10:04 scsi-0ATA_TOSHIBA_DT01ACA1_475GV89MS -> ../../**sda**
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-0ATA_TOSHIBA_DT01ACA1_475GV89MS-part1 -> ../../**sda**1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-0ATA_TOSHIBA_DT01ACA1_475GV89MS-part2 -> ../../**sda**2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-0ATA_TOSHIBA_DT01ACA1_475GV89MS-part3 -> ../../**sda**3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-0ATA_TOSHIBA_DT01ACA1_475GV89MS-part4 -> ../../**sda**4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-0ATA_TOSHIBA_DT01ACA1_475GV89MS-part5 -> ../../**sda**5
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-0ATA_TOSHIBA_DT01ACA1_475GV89MS-part6 -> ../../**sda**6
lrwxrwxrwx 1 root root 9 Jul 26 10:04 scsi-1ATA_SHGS31-500GS-2_ES0AN87701020B16T -> ../../**sd**b
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-1ATA_SHGS31-500GS-2_ES0AN87701020B16T-part1 -> ../..
/**sd**b1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-1ATA_SHGS31-500GS-2_ES0AN87701020B16T-part2 -> ../..
/**sd**b2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-1ATA_SHGS31-500GS-2_ES0AN87701020B16T-part3 -> ../..
/**sd**b3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-1ATA_SHGS31-500GS-2_ES0AN87701020B16T-part4 -> ../..
/**sd**b4
lrwxrwxrwx 1 root root 9 Jul 26 10:04 scsi-1ATA_TOSHIBA_DT01ACA100_475GV89MS -> ../../**sda**
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-1ATA_TOSHIBA_DT01ACA100_475GV89MS-part1 -> ../../**sda**
1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-1ATA_TOSHIBA_DT01ACA100_475GV89MS-part2 -> ../../**sda**
2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-1ATA_TOSHIBA_DT01ACA100_475GV89MS-part3 -> ../../**sda**
3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-1ATA_TOSHIBA_DT01ACA100_475GV89MS-part4 -> ../../**sda**
4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-1ATA_TOSHIBA_DT01ACA100_475GV89MS-part5 -> ../../**sda**
5
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-1ATA_TOSHIBA_DT01ACA100_475GV89MS-part6 -> ../../**sda**
6
lrwxrwxrwx 1 root root 9 Jul 26 10:04 scsi-35000039fefd4d74e -> ../../**sda**
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-35000039fefd4d74e-part1 -> ../../**sda**1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-35000039fefd4d74e-part2 -> ../../**sda**2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-35000039fefd4d74e-part3 -> ../../**sda**3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-35000039fefd4d74e-part4 -> ../../**sda**4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-35000039fefd4d74e-part5 -> ../../**sda**5
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-35000039fefd4d74e-part6 -> ../../**sda**6
lrwxrwxrwx 1 root root 9 Jul 26 10:04 scsi-SATA_SHGS31-500GS-2_ES0AN87701020B16T -> ../../**sd**b
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-SATA_SHGS31-500GS-2_ES0AN87701020B16T-part1 -> ../..
/**sd**b1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-SATA_SHGS31-500GS-2_ES0AN87701020B16T-part2 -> ../..
/**sd**b2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-SATA_SHGS31-500GS-2_ES0AN87701020B16T-part3 -> ../..
/**sd**b3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-SATA_SHGS31-500GS-2_ES0AN87701020B16T-part4 -> ../..
/**sd**b4
lrwxrwxrwx 1 root root 9 Jul 26 10:04 scsi-SATA_TOSHIBA_DT01ACA1_475GV89MS -> ../../**sda**
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-SATA_TOSHIBA_DT01ACA1_475GV89MS-part1 -> ../../**sda**1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-SATA_TOSHIBA_DT01ACA1_475GV89MS-part2 -> ../../**sda**2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-SATA_TOSHIBA_DT01ACA1_475GV89MS-part3 -> ../../**sda**3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-SATA_TOSHIBA_DT01ACA1_475GV89MS-part4 -> ../../**sda**4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-SATA_TOSHIBA_DT01ACA1_475GV89MS-part5 -> ../../**sda**5
lrwxrwxrwx 1 root root 10 Jul 26 10:04 scsi-SATA_TOSHIBA_DT01ACA1_475GV89MS-part6 -> ../../**sda**6
lrwxrwxrwx 1 root root 9 Jul 26 15:44 usb-Generic_Flash_Disk_B29DABE5-0:0 -> ../../**sd**c
lrwxrwxrwx 1 root root 9 Jul 26 10:04 wwn-0x5000039fefd4d74e -> ../../**sda**
lrwxrwxrwx 1 root root 10 Jul 26 10:04 wwn-0x5000039fefd4d74e-part1 -> ../../**sda**1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 wwn-0x5000039fefd4d74e-part2 -> ../../**sda**2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 wwn-0x5000039fefd4d74e-part3 -> ../../**sda**3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 wwn-0x5000039fefd4d74e-part4 -> ../../**sda**4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 wwn-0x5000039fefd4d74e-part5 -> ../../**sda**5
lrwxrwxrwx 1 root root 10 Jul 26 10:04 wwn-0x5000039fefd4d74e-part6 -> ../../**sda**6
lrwxrwxrwx 1 root root 9 Jul 26 10:04 wwn-0x5ace42e4200000e3 -> ../../**sd**b
lrwxrwxrwx 1 root root 10 Jul 26 10:04 wwn-0x5ace42e4200000e3-part1 -> ../../**sd**b1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 wwn-0x5ace42e4200000e3-part2 -> ../../**sd**b2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 wwn-0x5ace42e4200000e3-part3 -> ../../**sd**b3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 wwn-0x5ace42e4200000e3-part4 -> ../../**sd**b4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 DELLSUPPORT -> ../../**sda**6
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ESP -> ../../**sda**1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 Image -> ../../**sda**5
lrwxrwxrwx 1 root root 10 Jul 26 10:04 OS -> ../../**sda**3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 Basic\x20data\x20partition -> ../../**sda**3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 EFI\x20system\x20partition -> ../../**sda**1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 Microsoft\x20reserved\x20partition -> ../../**sda**2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 547a6c69-ed3b-4361-9262-480ad0c4c3d8 -> ../../**sd**b4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 78ee8a2d-3173-49b4-827b-ad046ead6cd8 -> ../../**sda**3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 865fe3a7-7b91-4af4-a63e-88c0704a7096 -> ../../**sda**2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 97a7b674-ff01-47f6-8e4b-328410431695 -> ../../**sd**b1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 a79931a0-865a-4007-92a6-ff472d0cf763 -> ../../**sd**b2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 c510440f-69ba-4d21-ab32-3142959e0dff -> ../../**sda**6
lrwxrwxrwx 1 root root 10 Jul 26 10:04 c93d6267-27a6-46a1-ae44-b563f0277785 -> ../../**sda**1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 cddce50a-abac-4631-9687-a3a1f5af9e33 -> ../../**sda**5
lrwxrwxrwx 1 root root 10 Jul 26 10:04 d99bd0e2-29b0-42ed-b963-f4a6912e3f6e -> ../../**sd**b3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 dbe65e84-6521-4485-a66a-2dd9ae607a0e -> ../../**sda**4
lrwxrwxrwx 1 root root 9 Jul 26 15:44 pci-0000:00:14.0-usb-0:2:1.0-scsi-0:0:0:0 -> ../../**sd**c
Prexy
July 26, 2021, 10:06pm
#12
The output was too long. I had to cut it in parts to get it to post. This is the SECOND part.
Also, I substituted sdc* in this command where you typed sda*. That gave no output at all. Similarly, the mount | grep command gave no output at all.
For clarification: sda is a Windows 10 install; sdb is Tumbleweed.
lrwxrwxrwx 1 root root 9 Jul 26 10:04 pci-0000:00:17.0-ata-1 -> ../../**sda**
lrwxrwxrwx 1 root root 9 Jul 26 10:04 pci-0000:00:17.0-ata-1.0 -> ../../**sda**
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1.0-part1 -> ../../**sda**1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1.0-part2 -> ../../**sda**2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1.0-part3 -> ../../**sda**3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1.0-part4 -> ../../**sda**4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1.0-part5 -> ../../**sda**5
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1.0-part6 -> ../../**sda**6
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1-part1 -> ../../**sda**1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1-part2 -> ../../**sda**2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1-part3 -> ../../**sda**3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1-part4 -> ../../**sda**4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1-part5 -> ../../**sda**5
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-1-part6 -> ../../**sda**6
lrwxrwxrwx 1 root root 9 Jul 26 10:04 pci-0000:00:17.0-ata-4 -> ../../**sd**b
lrwxrwxrwx 1 root root 9 Jul 26 10:04 pci-0000:00:17.0-ata-4.0 -> ../../**sd**b
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-4.0-part1 -> ../../**sd**b1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-4.0-part2 -> ../../**sd**b2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-4.0-part3 -> ../../**sd**b3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-4.0-part4 -> ../../**sd**b4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-4-part1 -> ../../**sd**b1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-4-part2 -> ../../**sd**b2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-4-part3 -> ../../**sd**b3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 pci-0000:00:17.0-ata-4-part4 -> ../../**sd**b4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 39c87ff3-0a96-4440-86e6-914129e48bd8 -> ../../**sd**b3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 58F6315DF6313D16 -> ../../**sda**4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 9AE08C7BE08C5EFF -> ../../**sda**3
lrwxrwxrwx 1 root root 10 Jul 26 10:04 AA75-7061 -> ../../**sda**1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 ACF267BAF2678782 -> ../../**sda**6
lrwxrwxrwx 1 root root 10 Jul 26 10:04 C5F6-CDCF -> ../../**sd**b1
lrwxrwxrwx 1 root root 10 Jul 26 10:04 db95054f-3b15-413c-953f-2fb08df71be1 -> ../../**sd**b2
lrwxrwxrwx 1 root root 10 Jul 26 10:04 e8ef7f47-08df-478c-b093-1d4969682c3a -> ../../**sd**b4
lrwxrwxrwx 1 root root 10 Jul 26 10:04 EE5CFDC55CFD891B -> ../../**sda**5
If you have a windows installation use Imageusb from passmark software
https://www.osforensics.com/tools/write-usb-images.html
It will recover it
But the other directions I gave you also should
Prexy
July 27, 2021, 5:31am
#15
I ran dmesg | less and got over 1,000 lines of output. Near the bottom, it stated sdc had write protect ON. I unplugged the drive and re-plugged to get the latest dmesg and, once again near the bottom, dmesg said write protect was OFF.
I immediately ran the partitioner in yast and got this error message:
command '/sbin/mkfs.xfs -q -f '/dev/sdc'' failed:
stderr:
mkfs.xfs: pwrite failed: Remote I/O error
libxfs_bwrite: write failed on (unknown) bno 0x3d3f00/0x100, err=121
mkfs.xfs: Releasing dirty buffer to free list!
found dirty buffer (bulk) on free list!
mkfs.xfs: pwrite failed: Remote I/O error
libxfs_bwrite: write failed on (unknown) bno 0x0/0x100, err=121
mkfs.xfs: Releasing dirty buffer to free list!
found dirty buffer (bulk) on free list!
mkfs.xfs: pwrite failed: Remote I/O error
libxfs_bwrite: write failed on xfs_sb bno 0x0/0x1, err=121
mkfs.xfs: Releasing dirty buffer to free list!
mkfs.xfs: libxfs_device_zero write failed: Remote I/O error
exit code:
1
That was a new message. Then I ran dmesg | less again and got this:
23798.979114] sd 4:0:0:0: Attached scsi generic sg3 type 0
[23798.980042] sd 4:0:0:0: [sdc] 4014080 512-byte logical blocks: (2.06 GB/1.91 GiB)
[23798.980686] sd 4:0:0:0: [sdc] Write Protect is off
[23798.980690] sd 4:0:0:0: [sdc] Mode Sense: 23 00 00 00
[23798.982939] sd 4:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[23799.043007] sd 4:0:0:0: [sdc] Attached SCSI removable disk
[23963.926819] st: Version 20160209, fixed bufsize 32768, s/g segs 256
[23983.386994] sd 4:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[23983.387004] sd 4:0:0:0: [sdc] tag#0 Sense Key : Data Protect [current]
[23983.387007] sd 4:0:0:0: [sdc] tag#0 Add. Sense: Write protected
[23983.387011] sd 4:0:0:0: [sdc] tag#0 CDB: Write(10) 2a 00 00 3d 3f 00 00 00 f0 00
[23983.387012] blk_update_request: critical target error, dev sdc, sector 4013824 op 0x1:(WRITE) flags 0xc800 phys_seg 29 prio class 0
[23983.387593] sd 4:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[23983.387597] sd 4:0:0:0: [sdc] tag#0 Sense Key : Data Protect [current]
[23983.387598] sd 4:0:0:0: [sdc] tag#0 Add. Sense: Write protected
[23983.387599] sd 4:0:0:0: [sdc] tag#0 CDB: Write(10) 2a 00 00 3d 3f f0 00 00 08 00
[23983.387600] blk_update_request: critical target error, dev sdc, sector 4014064 op 0x1:(WRITE) flags 0x8800 phys_seg 3 prio class 0
[23983.388188] sd 4:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[23983.388191] sd 4:0:0:0: [sdc] tag#0 Sense Key : Data Protect [current]
[23983.388192] sd 4:0:0:0: [sdc] tag#0 Add. Sense: Write protected
[23983.388194] sd 4:0:0:0: [sdc] tag#0 CDB: Write(10) 2a 00 00 00 00 00 00 00 f0 00
[23983.388195] blk_update_request: critical target error, dev sdc, sector 0 op 0x1:(WRITE) flags 0xc800 phys_seg 29 prio class 0
[23983.388686] sd 4:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[23983.388691] sd 4:0:0:0: [sdc] tag#0 Sense Key : Data Protect [current]
[23983.388692] sd 4:0:0:0: [sdc] tag#0 Add. Sense: Write protected
You see it starts with write protect off and then shows it as write protected. There are dozens more lines showing the same errors and it finishes with this:
[23983.392208] blk_update_request: critical target error, dev sdc, sector 2008048 op 0x1:(WRITE)
flags 0x4000 phys_seg 30 prio class 0
[23983.437998] sd 4:0:0:0: [sdc] Write Protect is on
[23983.438002] sd 4:0:0:0: [sdc] Mode Sense: 23 00 80 00
I am going to review the steps again and then try Imageusb.
I am guessing here.
I’m suspecting that you have a faulty device. It starts with write protect off. But then it gets an I/O error, so the system marks it as read-only to avoid further problems.
Users may check the journal for problems:
**erlangen:~ #** journalctl -b -q _KERNEL_SUBSYSTEM=scsi
Jul 27 04:13:00 erlangen kernel: scsi host0: ahci
Jul 27 04:13:00 erlangen kernel: scsi host1: ahci
Jul 27 04:13:00 erlangen kernel: scsi host2: ahci
Jul 27 04:13:00 erlangen kernel: scsi host3: ahci
Jul 27 04:13:00 erlangen kernel: scsi host4: ahci
Jul 27 04:13:00 erlangen kernel: scsi host5: ahci
Jul 27 04:13:00 erlangen kernel: **scsi 2:0:0:0: Direct-Access ATA CT2000BX500SSD1 030 PQ: 0 ANSI: 5**
Jul 27 04:13:00 erlangen kernel: **sd 2:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)**
Jul 27 04:13:00 erlangen kernel: **sd 2:0:0:0: [sda] Write Protect is off**
Jul 27 04:13:00 erlangen kernel: sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
Jul 27 04:13:00 erlangen kernel: **sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA**
Jul 27 04:13:00 erlangen kernel: **scsi 3:0:0:0: Direct-Access ATA WDC WD40EZRX-22S 0A80 PQ: 0 ANSI: 5**
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: [sdb] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)**
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: [sdb] 4096-byte physical blocks**
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: [sdb] Write Protect is off**
Jul 27 04:13:00 erlangen kernel: sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA**
Jul 27 04:13:00 erlangen kernel: **scsi 4:0:0:0: Direct-Access ATA Samsung SSD 850 3B6Q PQ: 0 ANSI: 5**
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/466 GiB)**
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: [sdc] Write Protect is off**
Jul 27 04:13:00 erlangen kernel: sd 4:0:0:0: [sdc] Mode Sense: 00 3a 00 00
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA**
Jul 27 04:13:00 erlangen kernel: **scsi 5:0:0:0: CD-ROM PIONEER DVD-RW DVR-221 1.00 PQ: 0 ANSI: 5**
Jul 27 04:13:00 erlangen kernel: **sd 2:0:0:0: [sda] Attached SCSI disk**
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: [sdc] supports TCG Opal**
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: [sdc] Attached SCSI disk**
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: [sdb] Attached SCSI disk**
Jul 27 04:13:00 erlangen kernel: **sd 2:0:0:0: Attached scsi generic sg0 type 0**
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: Attached scsi generic sg1 type 0**
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: Attached scsi generic sg2 type 0**
Jul 27 04:13:00 erlangen kernel: **scsi 5:0:0:0: Attached scsi generic sg3 type 5**
Jul 27 04:13:01 erlangen kernel: sr 5:0:0:0: [sr0] scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray
Jul 27 04:13:01 erlangen kernel: sr 5:0:0:0: Attached scsi CD-ROM sr0
Jul 27 06:38:19 erlangen kernel: scsi host6: usb-storage 1-5:1.0
Jul 27 06:38:20 erlangen kernel: **scsi 6:0:0:0: Direct-Access Intenso Premium 0.00 PQ: 0 ANSI: 2**
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: Attached scsi generic sg4 type 0**
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: [sdd] 7897088 512-byte logical blocks: (4.04 GB/3.77 GiB)**
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: [sdd] Write Protect is off**
Jul 27 06:38:20 erlangen kernel: sd 6:0:0:0: [sdd] Mode Sense: 00 00 00 00
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: [sdd] Asking for cache data failed**
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: [sdd] Assuming drive cache: write through**
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: [sdd] Attached SCSI removable disk**
**erlangen:~ #**
hcvv
July 27, 2021, 9:16am
#18
Sorry, that is my fault. It should of course have benn sdc* not sda*.
But That is all overdue now as the logging shows that the device itself is made ro under certain circumstances.
Prexy
July 27, 2021, 3:16pm
#19
karlmistelberger:
Users may check the journal for problems:
**erlangen:~ #** journalctl -b -q _KERNEL_SUBSYSTEM=scsi
Jul 27 04:13:00 erlangen kernel: scsi host0: ahci
Jul 27 04:13:00 erlangen kernel: scsi host1: ahci
Jul 27 04:13:00 erlangen kernel: scsi host2: ahci
Jul 27 04:13:00 erlangen kernel: scsi host3: ahci
Jul 27 04:13:00 erlangen kernel: scsi host4: ahci
Jul 27 04:13:00 erlangen kernel: scsi host5: ahci
Jul 27 04:13:00 erlangen kernel: **scsi 2:0:0:0: Direct-Access ATA CT2000BX500SSD1 030 PQ: 0 ANSI: 5**
Jul 27 04:13:00 erlangen kernel: **sd 2:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)**
Jul 27 04:13:00 erlangen kernel: **sd 2:0:0:0: [sda] Write Protect is off**
Jul 27 04:13:00 erlangen kernel: sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
Jul 27 04:13:00 erlangen kernel: **sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA**
Jul 27 04:13:00 erlangen kernel: **scsi 3:0:0:0: Direct-Access ATA WDC WD40EZRX-22S 0A80 PQ: 0 ANSI: 5**
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: [sdb] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)**
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: [sdb] 4096-byte physical blocks**
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: [sdb] Write Protect is off**
Jul 27 04:13:00 erlangen kernel: sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA**
Jul 27 04:13:00 erlangen kernel: **scsi 4:0:0:0: Direct-Access ATA Samsung SSD 850 3B6Q PQ: 0 ANSI: 5**
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/466 GiB)**
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: [sdc] Write Protect is off**
Jul 27 04:13:00 erlangen kernel: sd 4:0:0:0: [sdc] Mode Sense: 00 3a 00 00
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA**
Jul 27 04:13:00 erlangen kernel: **scsi 5:0:0:0: CD-ROM PIONEER DVD-RW DVR-221 1.00 PQ: 0 ANSI: 5**
Jul 27 04:13:00 erlangen kernel: **sd 2:0:0:0: [sda] Attached SCSI disk**
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: [sdc] supports TCG Opal**
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: [sdc] Attached SCSI disk**
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: [sdb] Attached SCSI disk**
Jul 27 04:13:00 erlangen kernel: **sd 2:0:0:0: Attached scsi generic sg0 type 0**
Jul 27 04:13:00 erlangen kernel: **sd 3:0:0:0: Attached scsi generic sg1 type 0**
Jul 27 04:13:00 erlangen kernel: **sd 4:0:0:0: Attached scsi generic sg2 type 0**
Jul 27 04:13:00 erlangen kernel: **scsi 5:0:0:0: Attached scsi generic sg3 type 5**
Jul 27 04:13:01 erlangen kernel: sr 5:0:0:0: [sr0] scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray
Jul 27 04:13:01 erlangen kernel: sr 5:0:0:0: Attached scsi CD-ROM sr0
Jul 27 06:38:19 erlangen kernel: scsi host6: usb-storage 1-5:1.0
Jul 27 06:38:20 erlangen kernel: **scsi 6:0:0:0: Direct-Access Intenso Premium 0.00 PQ: 0 ANSI: 2**
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: Attached scsi generic sg4 type 0**
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: [sdd] 7897088 512-byte logical blocks: (4.04 GB/3.77 GiB)**
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: [sdd] Write Protect is off**
Jul 27 06:38:20 erlangen kernel: sd 6:0:0:0: [sdd] Mode Sense: 00 00 00 00
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: [sdd] Asking for cache data failed**
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: [sdd] Assuming drive cache: write through**
Jul 27 06:38:20 erlangen kernel: **sd 6:0:0:0: [sdd] Attached SCSI removable disk**
**erlangen:~ #**
Is the bold and red an edit you have done or the result of the switches you have used?
Prexy
July 27, 2021, 3:20pm
#20
I am now hoping this is a faulty device. I tried to recover this AFTER I installed a newer version of Mint on a larger usb drive. I just wanted to show a neighbor how easy linux is and how it can look like Windows. I also wanted to eliminate Windows as a source of a shutdown problem. No good deed goes unpunished. I hope the newer install will be recoverable!