Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Do you mean reset the USB (hardware) subsystem? If so, this can be done for a particular device, or for all devices attached to a host controller. There are numerous threads on the subject. For example...
Do you mean reset the USB (hardware) subsystem? If so, this can be done for a particular device, or for all devices attached to a host controller. There are numerous threads on the subject. For example...
typical x-y-problem.
what are you really trying to achieve?
As I said, I like to restart USB service. For example, Sometimes I plugged my Pendrive and Linux tell me it is read only but when I reboot my Linux it become OK.
As I said, I like to restart USB service. For example, Sometimes I plugged my Pendrive and Linux tell me it is read only but when I reboot my Linux it become OK.
Sometimes they can be difficult. Usually it's enough to
(1) unmount the drive
(2) unplug it
(3) plug it in again and hope for the best!
If a drive has repeated problems it may need repair: see
man dosfsck
To turn off disk device`s write protect, we use the low level system utility hdparm like this:
Code:
sudo hdparm -r0 /dev/sdb
where we asume that /dev/sdb is the Physical disk device we're working on. If the device has partitions that are mounted as read-only, you should re-mount 'em as read-write in order to write data to them.
If that doesnt work you may have to format the drive
To turn off disk device`s write protect, we use the low level system utility hdparm like this:
Code:
sudo hdparm -r0 /dev/sdb
where we asume that /dev/sdb is the Physical disk device we're working on. If the device has partitions that are mounted as read-only, you should re-mount 'em as read-write in order to write data to them.
If that doesnt work you may have to format the drive
as it was already mentioned: (post #7) you did not try to solve the real problem but want to force the system to do what you need. This will hardly work and most probably you will generate additional problems.
Furthermore
Quote:
Sorry, It is not working always
is not an acceptable answer, please tell us when does it work and when did it fail.
If you use GUI, try to safely remove the pen drive instead of just removing the device itself, that may cause this issue (when you try to plug in something again). If you use CLI you may try to use the commands: umount and/or eject also.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.