How to fix read-only usb drive?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
3
down vote

favorite












I have read-only usb drive and could not fix it. I have read some articles about it and tried to fix but I couldn't.



I unmounted drive and used dosfsck to check and repair MS-DOS filesystems, because it is FAT filesystem and run:



dosfsck -a /dev/sdb1


it gave the output:




fsck.fat 4.1 (2017-01-24) open: Read-only file system




So what can I do with it? Can I repair or it's time to throw it in a trash?










share|improve this question























  • 1. where did the USB come from: some USBs -are- read only. Often when those are commercial those USB are hardware locked. 2. Some USB have a hardware lock on the outside.
    – Rinzwind
    Feb 10 at 12:31










  • this usb was worked normally and once it became read-only. I think during monting or unmounting
    – godot
    Feb 10 at 12:41










  • Can you add the output of dmesg when you insert the USB?
    – Katu
    Feb 16 at 13:59










  • what is dmesg??
    – godot
    Feb 16 at 14:51










  • Maybe the tips in the following link will help, askubuntu.com/questions/144852/…
    – sudodus
    Feb 16 at 15:12














up vote
3
down vote

favorite












I have read-only usb drive and could not fix it. I have read some articles about it and tried to fix but I couldn't.



I unmounted drive and used dosfsck to check and repair MS-DOS filesystems, because it is FAT filesystem and run:



dosfsck -a /dev/sdb1


it gave the output:




fsck.fat 4.1 (2017-01-24) open: Read-only file system




So what can I do with it? Can I repair or it's time to throw it in a trash?










share|improve this question























  • 1. where did the USB come from: some USBs -are- read only. Often when those are commercial those USB are hardware locked. 2. Some USB have a hardware lock on the outside.
    – Rinzwind
    Feb 10 at 12:31










  • this usb was worked normally and once it became read-only. I think during monting or unmounting
    – godot
    Feb 10 at 12:41










  • Can you add the output of dmesg when you insert the USB?
    – Katu
    Feb 16 at 13:59










  • what is dmesg??
    – godot
    Feb 16 at 14:51










  • Maybe the tips in the following link will help, askubuntu.com/questions/144852/…
    – sudodus
    Feb 16 at 15:12












up vote
3
down vote

favorite









up vote
3
down vote

favorite











I have read-only usb drive and could not fix it. I have read some articles about it and tried to fix but I couldn't.



I unmounted drive and used dosfsck to check and repair MS-DOS filesystems, because it is FAT filesystem and run:



dosfsck -a /dev/sdb1


it gave the output:




fsck.fat 4.1 (2017-01-24) open: Read-only file system




So what can I do with it? Can I repair or it's time to throw it in a trash?










share|improve this question















I have read-only usb drive and could not fix it. I have read some articles about it and tried to fix but I couldn't.



I unmounted drive and used dosfsck to check and repair MS-DOS filesystems, because it is FAT filesystem and run:



dosfsck -a /dev/sdb1


it gave the output:




fsck.fat 4.1 (2017-01-24) open: Read-only file system




So what can I do with it? Can I repair or it's time to throw it in a trash?







usb usb-drive read-only






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 10 at 11:54

























asked Feb 10 at 11:07









godot

70210




70210











  • 1. where did the USB come from: some USBs -are- read only. Often when those are commercial those USB are hardware locked. 2. Some USB have a hardware lock on the outside.
    – Rinzwind
    Feb 10 at 12:31










  • this usb was worked normally and once it became read-only. I think during monting or unmounting
    – godot
    Feb 10 at 12:41










  • Can you add the output of dmesg when you insert the USB?
    – Katu
    Feb 16 at 13:59










  • what is dmesg??
    – godot
    Feb 16 at 14:51










  • Maybe the tips in the following link will help, askubuntu.com/questions/144852/…
    – sudodus
    Feb 16 at 15:12
















  • 1. where did the USB come from: some USBs -are- read only. Often when those are commercial those USB are hardware locked. 2. Some USB have a hardware lock on the outside.
    – Rinzwind
    Feb 10 at 12:31










  • this usb was worked normally and once it became read-only. I think during monting or unmounting
    – godot
    Feb 10 at 12:41










  • Can you add the output of dmesg when you insert the USB?
    – Katu
    Feb 16 at 13:59










  • what is dmesg??
    – godot
    Feb 16 at 14:51










  • Maybe the tips in the following link will help, askubuntu.com/questions/144852/…
    – sudodus
    Feb 16 at 15:12















1. where did the USB come from: some USBs -are- read only. Often when those are commercial those USB are hardware locked. 2. Some USB have a hardware lock on the outside.
– Rinzwind
Feb 10 at 12:31




1. where did the USB come from: some USBs -are- read only. Often when those are commercial those USB are hardware locked. 2. Some USB have a hardware lock on the outside.
– Rinzwind
Feb 10 at 12:31












this usb was worked normally and once it became read-only. I think during monting or unmounting
– godot
Feb 10 at 12:41




this usb was worked normally and once it became read-only. I think during monting or unmounting
– godot
Feb 10 at 12:41












Can you add the output of dmesg when you insert the USB?
– Katu
Feb 16 at 13:59




Can you add the output of dmesg when you insert the USB?
– Katu
Feb 16 at 13:59












what is dmesg??
– godot
Feb 16 at 14:51




what is dmesg??
– godot
Feb 16 at 14:51












Maybe the tips in the following link will help, askubuntu.com/questions/144852/…
– sudodus
Feb 16 at 15:12




Maybe the tips in the following link will help, askubuntu.com/questions/144852/…
– sudodus
Feb 16 at 15:12










1 Answer
1






active

oldest

votes

















up vote
6
down vote



accepted
+50










If the USB was once writable and is now no longer, this suggests 3 things in my mind:




  1. A hardware switch on the device has been toggled.



    If this is the case, the simple fix would be to find that hardware switch (they can be really subtle), and toggle it.




  2. An "unclean" unmount occurred, such as pulling the USB out of the slot before the OS finished writing data to it



    To save the life of devices, and to improve performance, writes to most storage mediums are buffered -- including USB drives. In essence, this means then unless you tell the operating system to eject/unmount the USB drive, you have no guarantee that all data has been written. Further, most filesystems have flags to indicate when they've been mounted and unmounted: always tell the OS you're going to remove the drive ("eject", "unmount", "turn off") before you pull it out of the slot.



    Consequently, if simply checking and fixing the filesystem does not work, then you could try the ham-fisted approach of copying your data temporarily somewhere else, reformatting your USB drive, and then copying your data back. By reformatting, you're completely overwriting what was there, so the OS/filesystem will have no recollection the USB drive/filesystem was readonly before the format.



    One detail on repairing the filesystem. Make sure it's not mounted first. Your set of commands implies it's mounted. So:



    sudo umount /dev/sdb1



    sudo dosfsck -a /dev/sdb1




  3. The USB disk itself is dying, and the embedded firmware is protecting you from losing any data.



    If the USB uses flash-based storage, it's possible that you have written to the device enough times that it is now unable to write anymore. Writing to flash-based is a destructive process, and each sector can only take so many rewrites. Many drives will "hide" this fact, by internally having much larger storage (say 16G of total write space), but only present to the OS as a smaller amount (say 2G). As each sector begins to wear out, the firmware will automatically move the data to a new unused sector. After too many writes, however, there will be no more usable storage, and smart firmware implementations will lock the drive to prevent data loss. At that point, your only option would be to copy the data to a new flash drive.







share|improve this answer






















  • If there is nothing on the drive you need to keep, use "gparted" to create a new filesystem on the drive, create a new partition and format it to your format of choice (I guess you want fat32 ?). If it mounts read only, you need to change the permissions of the mount point.
    – hatterman
    Feb 20 at 14:35











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004827%2fhow-to-fix-read-only-usb-drive%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
6
down vote



accepted
+50










If the USB was once writable and is now no longer, this suggests 3 things in my mind:




  1. A hardware switch on the device has been toggled.



    If this is the case, the simple fix would be to find that hardware switch (they can be really subtle), and toggle it.




  2. An "unclean" unmount occurred, such as pulling the USB out of the slot before the OS finished writing data to it



    To save the life of devices, and to improve performance, writes to most storage mediums are buffered -- including USB drives. In essence, this means then unless you tell the operating system to eject/unmount the USB drive, you have no guarantee that all data has been written. Further, most filesystems have flags to indicate when they've been mounted and unmounted: always tell the OS you're going to remove the drive ("eject", "unmount", "turn off") before you pull it out of the slot.



    Consequently, if simply checking and fixing the filesystem does not work, then you could try the ham-fisted approach of copying your data temporarily somewhere else, reformatting your USB drive, and then copying your data back. By reformatting, you're completely overwriting what was there, so the OS/filesystem will have no recollection the USB drive/filesystem was readonly before the format.



    One detail on repairing the filesystem. Make sure it's not mounted first. Your set of commands implies it's mounted. So:



    sudo umount /dev/sdb1



    sudo dosfsck -a /dev/sdb1




  3. The USB disk itself is dying, and the embedded firmware is protecting you from losing any data.



    If the USB uses flash-based storage, it's possible that you have written to the device enough times that it is now unable to write anymore. Writing to flash-based is a destructive process, and each sector can only take so many rewrites. Many drives will "hide" this fact, by internally having much larger storage (say 16G of total write space), but only present to the OS as a smaller amount (say 2G). As each sector begins to wear out, the firmware will automatically move the data to a new unused sector. After too many writes, however, there will be no more usable storage, and smart firmware implementations will lock the drive to prevent data loss. At that point, your only option would be to copy the data to a new flash drive.







share|improve this answer






















  • If there is nothing on the drive you need to keep, use "gparted" to create a new filesystem on the drive, create a new partition and format it to your format of choice (I guess you want fat32 ?). If it mounts read only, you need to change the permissions of the mount point.
    – hatterman
    Feb 20 at 14:35















up vote
6
down vote



accepted
+50










If the USB was once writable and is now no longer, this suggests 3 things in my mind:




  1. A hardware switch on the device has been toggled.



    If this is the case, the simple fix would be to find that hardware switch (they can be really subtle), and toggle it.




  2. An "unclean" unmount occurred, such as pulling the USB out of the slot before the OS finished writing data to it



    To save the life of devices, and to improve performance, writes to most storage mediums are buffered -- including USB drives. In essence, this means then unless you tell the operating system to eject/unmount the USB drive, you have no guarantee that all data has been written. Further, most filesystems have flags to indicate when they've been mounted and unmounted: always tell the OS you're going to remove the drive ("eject", "unmount", "turn off") before you pull it out of the slot.



    Consequently, if simply checking and fixing the filesystem does not work, then you could try the ham-fisted approach of copying your data temporarily somewhere else, reformatting your USB drive, and then copying your data back. By reformatting, you're completely overwriting what was there, so the OS/filesystem will have no recollection the USB drive/filesystem was readonly before the format.



    One detail on repairing the filesystem. Make sure it's not mounted first. Your set of commands implies it's mounted. So:



    sudo umount /dev/sdb1



    sudo dosfsck -a /dev/sdb1




  3. The USB disk itself is dying, and the embedded firmware is protecting you from losing any data.



    If the USB uses flash-based storage, it's possible that you have written to the device enough times that it is now unable to write anymore. Writing to flash-based is a destructive process, and each sector can only take so many rewrites. Many drives will "hide" this fact, by internally having much larger storage (say 16G of total write space), but only present to the OS as a smaller amount (say 2G). As each sector begins to wear out, the firmware will automatically move the data to a new unused sector. After too many writes, however, there will be no more usable storage, and smart firmware implementations will lock the drive to prevent data loss. At that point, your only option would be to copy the data to a new flash drive.







share|improve this answer






















  • If there is nothing on the drive you need to keep, use "gparted" to create a new filesystem on the drive, create a new partition and format it to your format of choice (I guess you want fat32 ?). If it mounts read only, you need to change the permissions of the mount point.
    – hatterman
    Feb 20 at 14:35













up vote
6
down vote



accepted
+50







up vote
6
down vote



accepted
+50




+50




If the USB was once writable and is now no longer, this suggests 3 things in my mind:




  1. A hardware switch on the device has been toggled.



    If this is the case, the simple fix would be to find that hardware switch (they can be really subtle), and toggle it.




  2. An "unclean" unmount occurred, such as pulling the USB out of the slot before the OS finished writing data to it



    To save the life of devices, and to improve performance, writes to most storage mediums are buffered -- including USB drives. In essence, this means then unless you tell the operating system to eject/unmount the USB drive, you have no guarantee that all data has been written. Further, most filesystems have flags to indicate when they've been mounted and unmounted: always tell the OS you're going to remove the drive ("eject", "unmount", "turn off") before you pull it out of the slot.



    Consequently, if simply checking and fixing the filesystem does not work, then you could try the ham-fisted approach of copying your data temporarily somewhere else, reformatting your USB drive, and then copying your data back. By reformatting, you're completely overwriting what was there, so the OS/filesystem will have no recollection the USB drive/filesystem was readonly before the format.



    One detail on repairing the filesystem. Make sure it's not mounted first. Your set of commands implies it's mounted. So:



    sudo umount /dev/sdb1



    sudo dosfsck -a /dev/sdb1




  3. The USB disk itself is dying, and the embedded firmware is protecting you from losing any data.



    If the USB uses flash-based storage, it's possible that you have written to the device enough times that it is now unable to write anymore. Writing to flash-based is a destructive process, and each sector can only take so many rewrites. Many drives will "hide" this fact, by internally having much larger storage (say 16G of total write space), but only present to the OS as a smaller amount (say 2G). As each sector begins to wear out, the firmware will automatically move the data to a new unused sector. After too many writes, however, there will be no more usable storage, and smart firmware implementations will lock the drive to prevent data loss. At that point, your only option would be to copy the data to a new flash drive.







share|improve this answer














If the USB was once writable and is now no longer, this suggests 3 things in my mind:




  1. A hardware switch on the device has been toggled.



    If this is the case, the simple fix would be to find that hardware switch (they can be really subtle), and toggle it.




  2. An "unclean" unmount occurred, such as pulling the USB out of the slot before the OS finished writing data to it



    To save the life of devices, and to improve performance, writes to most storage mediums are buffered -- including USB drives. In essence, this means then unless you tell the operating system to eject/unmount the USB drive, you have no guarantee that all data has been written. Further, most filesystems have flags to indicate when they've been mounted and unmounted: always tell the OS you're going to remove the drive ("eject", "unmount", "turn off") before you pull it out of the slot.



    Consequently, if simply checking and fixing the filesystem does not work, then you could try the ham-fisted approach of copying your data temporarily somewhere else, reformatting your USB drive, and then copying your data back. By reformatting, you're completely overwriting what was there, so the OS/filesystem will have no recollection the USB drive/filesystem was readonly before the format.



    One detail on repairing the filesystem. Make sure it's not mounted first. Your set of commands implies it's mounted. So:



    sudo umount /dev/sdb1



    sudo dosfsck -a /dev/sdb1




  3. The USB disk itself is dying, and the embedded firmware is protecting you from losing any data.



    If the USB uses flash-based storage, it's possible that you have written to the device enough times that it is now unable to write anymore. Writing to flash-based is a destructive process, and each sector can only take so many rewrites. Many drives will "hide" this fact, by internally having much larger storage (say 16G of total write space), but only present to the OS as a smaller amount (say 2G). As each sector begins to wear out, the firmware will automatically move the data to a new unused sector. After too many writes, however, there will be no more usable storage, and smart firmware implementations will lock the drive to prevent data loss. At that point, your only option would be to copy the data to a new flash drive.








share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 16 at 16:30

























answered Feb 16 at 16:17









hunteke

2838




2838











  • If there is nothing on the drive you need to keep, use "gparted" to create a new filesystem on the drive, create a new partition and format it to your format of choice (I guess you want fat32 ?). If it mounts read only, you need to change the permissions of the mount point.
    – hatterman
    Feb 20 at 14:35

















  • If there is nothing on the drive you need to keep, use "gparted" to create a new filesystem on the drive, create a new partition and format it to your format of choice (I guess you want fat32 ?). If it mounts read only, you need to change the permissions of the mount point.
    – hatterman
    Feb 20 at 14:35
















If there is nothing on the drive you need to keep, use "gparted" to create a new filesystem on the drive, create a new partition and format it to your format of choice (I guess you want fat32 ?). If it mounts read only, you need to change the permissions of the mount point.
– hatterman
Feb 20 at 14:35





If there is nothing on the drive you need to keep, use "gparted" to create a new filesystem on the drive, create a new partition and format it to your format of choice (I guess you want fat32 ?). If it mounts read only, you need to change the permissions of the mount point.
– hatterman
Feb 20 at 14:35


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004827%2fhow-to-fix-read-only-usb-drive%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491