What makes a usb stick from Read write -> read only
I am having Endeavorous linux KDE "can't write configuration file" issue.
Hence doing some manual copy of data from from /home to a usb drive. I created a folder on the usbstick on the problematic laptop and transferred some data over 1 time, then paste it to a desktop. Plugged the same usbstick the 2nd time on the same problematic laptop, wanted to create another folder to do data transfer again.. but this time it said : Code:
mkdir: cannot create directory 'folder': Read-only file system I have to do : Code:
sudo mount -o remount,rw '/run/media/user/usbstick' Only after this i can create a new folder in the usbstick. My question is why it changes ? What causes it to change ? is this the same thing that causes my current issue "can't write configuration file" ? Thanks |
What are you using to mount that usb device? Are you un-mounting it before you remove it? Does user have full mount permissions. Are you mounting as user or root? What kind of permissions does user have? Are you using an auto mounter?
Quote:
|
A common reason for that error is a corrupt filesystem which can sometimes be repaired. First thing we would need to know is what filesystem is on the usb drive. Also answering all the questions in post 2 will provide helpful information.
In your other thread, you indicate that you were having problems editing a configuration file with vi, When you edited it the first time, did you close the file properly? |
Code:
man chmod |
My practice here has always been to
1. start with a Linux format on the usb stick — less likely to cause trouble 2. if it goes read-only, use fsck 3. if it does it again, reformat 4. if it happens for the third time, dump it. |
Well, you learn something new every day. My mp3 player, when inserted into the pc, sometimes does not allow deletion of files or does not allow transfer of files. So are you saying the reason is because I always just yank it out when I'm done with it? I need to unmount it first or use the eject/remove button?
|
Quote:
|
Quote:
Even on a windows machine, with a external ntfs volume, you are suppose to click on that icon in the taskbar, "remove drive safely", before you pull it out, or it'll do it's checkdisk the next time you stick it in. And windows can fix it's own file system just fine. On a linux machine you need to make sure it is unmounted before removing, or it won't mount again. And ntfs-tools probably won't help. Not something that you should do on purpose but, you can pull a FAT or EXT4 drive out in the middle of a write and it won't hurt it, other than the file that you were copying will be corrupt. But you'll have a hung mount. You'll probably need to do a force umount. That is what mount and df are for. |
Quote:
I do not unmount usb stick, just when it is no doing data transfer, just unplug it. I always do that, never a problem before. I also do that to my manjaro kde desktop, no problem what so ever. |
Quote:
The filesystem on the usb drive that i asked in this thread is actually liveusb from Endeavorous. I was borrowing the space to do 1 file transfer from problematic Endeavourous laptop to manjaro desktop. Never a problem on Manjaro.. but on the laptop with Endeavorous os.. the problem occurs. |
Quote:
|
Quote:
|
Quote:
|
Quote:
And you said the problem occurs on the endeavorous laptop. That is a different OS than the manjaro desktop so you have to expect the software may not be the same and it apparently does not handle unplugging a USB without dismounting it the same way. Learn the differences and practice what works on the most restrictive one always; so you don't forget and cause yourself problems. |
This is strangely similar to this:
https://www.linuxquestions.org/quest...514/page2.html I wonder if the "hard drive" in that other thread is really the same USB stick? |
All times are GMT -5. The time now is 10:05 PM. |