USB drive won't mount, but still works( I think! ).

Yes of course, you must target the correct device, which from your fdisk output is
/dev/sdb. My example was just an example from my notes, not meant as an instruction.
anything else I should know? "dd if=/dev/zero of=/dev/sbd1 bs=4M status=progress"...
what does the dev/zero mean?
 


anything else I should know? "dd if=/dev/zero of=/dev/sbd1 bs=4M status=progress"...
what does the dev/zero mean?
The /dev/zero is a device that writes zeros, so when dd invokes it, the device will write zeros over the whole output which is the variable assigned to "of", in this case the device /dev/sdb. You can see the zero device in the dev directory:
Code:
ls /dev
<snip>
zero
 
Hmm... I find it odd that if you have ownership of the files but can't delete them.

Did you do something odd with the permissions, removing the read/write access? (I've only skimmed the thread.)
 
Hmm... I find it odd that if you have ownership of the files but can't delete them.

Did you do something odd with the permissions, removing the read/write access? (I've only skimmed the thread.)
it worked perfectly fine till i told
kde’s backup thingy in settings to use my
usb drive as a backup of my
system (timeshift worked fine on linux mint, it didnt break my usb drive, so i thought it would be similar) the KDE backup gave no warnings, and also didn’t work properly, it never made the backup. but after trying to set up the backup to use my usb drive, is when it stopped working.
 
KDE backup gave no warnings, and also didn’t work properly,

I wonder if it just broke at that time.

USB thumb drives break - and usually break when something is happening to them, like reading or writing of data. People often end up blaming the software that was being used even though it's just a matter of probabilities. It's probably going to break when asked to work.

We see that here from time to time. "Such and suck broke my thumb drive!" When, really, it was going to break no matter what and it just happened when that action was being taken.

Make sense?

In this case, it could have run out of error sectors (they include extra sectors to make up for when sectors go bad) and have put itself in read-only mode to protect itself and ensure the user can at least retain the data long enough to make a(nother) backup.
 
I wonder if it just broke at that time.

USB thumb drives break - and usually break when something is happening to them, like reading or writing of data. People often end up blaming the software that was being used even though it's just a matter of probabilities. It's probably going to break when asked to work.

We see that here from time to time. "Such and suck broke my thumb drive!" When, really, it was going to break no matter what and it just happened when that action was being taken.

Make sense?

In this case, it could have run out of error sectors (they include extra sectors to make up for when sectors go bad) and have put itself in read-only mode to protect itself and ensure the user can at least retain the data long enough to make a(nother) backup.
could have been, however it was a brand new hardly used kingston usb, i have only been using it 6 months, other drives I have used and put files and backups on and reformatted and used for years, (all sandisk brand) so maybe kingston is just a bad brand-
 
The /dev/zero is a device that writes zeros, so when dd invokes it, the device will write zeros over the whole output which is the variable assigned to "of", in this case the device /dev/sdb. You can see the zero device in the dev directory:
Code:
ls /dev
<snip>
zero
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 242155519 242153472 115.5G 83 Linux
username@debian12:~$ dd if=/dev/zero of=/dev/sda1 bs=4M status=progress
dd: failed to open '/dev/sda1': Permission denied
username@debian12:~$ sudo dd if=/dev/zero of=/dev/sda1 bs=4M status=progress
dd: failed to open '/dev/sda1': Read-only file system
username@debian12:~$

well, i accept it, its dead. last time I buy a kingston! LOL
 
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 242155519 242153472 115.5G 83 Linux
username@debian12:~$ dd if=/dev/zero of=/dev/sda1 bs=4M status=progress
dd: failed to open '/dev/sda1': Permission denied
username@debian12:~$ sudo dd if=/dev/zero of=/dev/sda1 bs=4M status=progress
dd: failed to open '/dev/sda1': Read-only file system
username@debian12:~$

well, i accept it, its dead. last time I buy a kingston! LOL
The command needs to be run as root since it's only root that has permission to deal with hardware in this way. Sorry about that not being clear.

If, after running the command as root, there's an "input/output" error, that would be the sign that there's likely a physical problem with the usb.
 
The command needs to be run as root since it's only root that has permission to deal with hardware in this way. Sorry about that not being clear.

If, after running the command as root, there's an "input/output" error, that would be the sign that there's likely a physical problem with the usb.
I tried to run as root, and it gave the same error. Does it have to be mounted (as you showed me before) before I can use the dd dev/zero command?

root@debian12:/home/username# sudo dd if=/dev/zero of=/dev/sda1 bs=4M status=progress
dd: failed to open '/dev/sda1': Read-only file system
 
Last edited:
I tried to run as root, and it gave the same error. Does it have to be mounted (as you showed me before) before I can use the dd dev/zero command?

root@debian12:/home/username# sudo dd if=/dev/zero of=/dev/sda1 bs=4M status=progress
dd: failed to open '/dev/sda1': Read-only file system
No, it doesn't have to be mounted. One runs dd on unmounted drives since it's only partitions that one mounts, but here in this situation it's the whole drive that is being acted upon.

If root cannot run the command, it's looking a bit grim :-(
 
If root cannot run the command, it's looking a bit grim :-(

Maybe you checked this, but make sure it's not already mounted somewhere.

Code:
df -h
 
Maybe you checked this, but make sure it's not already mounted somewhere.

Code:
df -h
yeah, the drive is just toast, thanks for the helpful command though ! I didn't realize df -h would the mounted drives, thats pretty cool.
 
No, it doesn't have to be mounted. One runs dd on unmounted drives since it's only partitions that one mounts, but here in this situation it's the whole drive that is being acted upon.

If root cannot run the command, it's looking a bit grim :-(
yeah the drive is dead :( but thats okay, at least i was able to get everything off it.
 
The drive is read-only: I do not mean that there is a read-only file system, but that the drive is readable but not writable (like a CDROM or DVD). This might be caused by some help system or competing system, so it is worthwhile to try according to this list,


  • On some pendrives and on many memory cards there is a small mechanical switch for write protection, that can toggle between read/write and read-only. You might have set it read-only without intention.
  • Reboot the computer and try again to restore or wipe the first megabyte with mkusb.
  • Disconnect other USB devices. Sometimes USB devices can disturb the function for each other.
  • Try other USB ports, and/or other card adapters.
  • Try another computer.
  • Try another operating system (Windows, MacOS) in another computer.
  • If you still cannot wipe the first megabyte of the drive, and the drive is read-only, it is probably 'gridlocked', and the next stage is that it will be completely 'bricked'. There is a limit, when you have to accept that the pendrive is damaged.
Yes, Windows cannot read the Linux file system. Insert USB Flash Drive into a working Linux computer and reformat it with FAT then everything should be fine.
 
Yes, Windows cannot read the Linux file system. Insert USB Flash Drive into a working Linux computer and reformat it with FAT then everything should be fine.
we already went trying all we could, the drive is simply dead.
 


Top