SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2015-07-13 08:07:16

Narmo
Member
Registered: 2015-06-18
Posts: 45

Flash mount as read only

Hello,
I was searching last three hours for solution, but without results. Problem like in topic name. Btw I want to have an option to automatically mount all sticky devices like usb, flash etc in read, write & execute option, I'm the only user of machine. Internet have some one use tricks but nothing worked in auto mode. I'm sorry if it is stupid noob question, but don't want to broke configs or something like that. I was trying to install usbmount and udisks but synaptic want a CD with Jessie snapshot so it also didn't work hmm

dmesg | tail:

[   38.587187] scsi 5:0:0:0: Direct-Access     Multiple Card  Reader     1.00 PQ: 0 ANSI: 0
[   38.587615] sd 5:0:0:0: Attached scsi generic sg2 type 0
[   39.322272] sd 5:0:0:0: [sdb] 30679040 512-byte logical blocks: (15.7 GB/14.6 GiB)
[   39.323357] sd 5:0:0:0: [sdb] Write Protect is on
[   39.323365] sd 5:0:0:0: [sdb] Mode Sense: 03 00 80 00
[   39.324452] sd 5:0:0:0: [sdb] No Caching mode page found
[   39.324462] sd 5:0:0:0: [sdb] Assuming drive cache: write through
[   39.330409]  sdb: sdb1
[   39.334719] sd 5:0:0:0: [sdb] Attached SCSI removable disk
[   44.087312] FAT-fs (sdb1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!

fdisk -l

fdisk: cannot open /dev/sda: Brak dostępu
fdisk: cannot open /dev/sdb: Brak dostępu

"Brak dostępu" means lack of access.

Help, please?

Last edited by Narmo (2015-07-13 08:40:27)

Offline

Help fund CrunchBang, donate to the project!

#2 2015-07-13 11:52:29

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Flash mount as read only

Curious, but does your /etc/apt/sources.list have a line similar to this:

#deb cdrom:[Debian GNU/Linux 8.1.0 _Jessie_ - Official amd64 NETINST Binary-1 20150606-14:16]/ jessie main

if so, comment it out as I have or directly delete it.

Are you using Jessie?
If you are I'll move this to "Help & Support (Stable)"

Offline

#3 2015-07-13 12:50:46

Narmo
Member
Registered: 2015-06-18
Posts: 45

Re: Flash mount as read only

Yep, it have and I commented it out, so one weird thing less smile I'm using Hydrogen with Jessie. Still no luck with a mounting, other mounted devices do the same thing and however usbmount helps a little I don't want to use it, if there is any other option.

Offline

#4 2015-07-13 17:57:22

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Flash mount as read only

sudo hdparm -r0 /dev/sdb

Last edited by Head_on_a_Stick (2015-07-13 17:59:16)

Offline

#5 2015-07-13 19:33:47

Narmo
Member
Registered: 2015-06-18
Posts: 45

Re: Flash mount as read only

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=b800f644-d3f6-4791-91bb-d6d15e866a98 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda6 during installation
UUID=5d9452b1-f578-4f04-a896-40f0926e1731 /home           ext4    defaults        0       2
# swap was on /dev/sda5 during installation
UUID=a68e2eec-26c1-498d-9e44-a434496d489f none            swap    sw              0       0

Offline

#6 2015-07-13 19:40:50

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Flash mount as read only

[   39.323357] sd 5:0:0:0: [sdb] Write Protect is on

Offline

#7 2015-07-13 20:51:04

Narmo
Member
Registered: 2015-06-18
Posts: 45

Re: Flash mount as read only

 setting readonly to 0 (off)
 readonly      =  0 (off)

but still I can only copy things on this device, not cut or remove.

Offline

#8 2015-07-13 20:55:11

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Flash mount as read only

Offline

#9 2015-07-14 06:28:28

Narmo
Member
Registered: 2015-06-18
Posts: 45

Re: Flash mount as read only

Erm, when I click right button of the mouse on file or folder which I have on this flash card, I have some options, like you know "open", "send to", "cut', "copy", "remove" etc. Options like "cut", "move to trash", "remove" and "change file name" are inaccessible.

Offline

#10 2015-07-14 06:36:29

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Flash mount as read only

Offline

#11 2015-07-14 06:44:25

Narmo
Member
Registered: 2015-06-18
Posts: 45

Re: Flash mount as read only

After fresh install usbmount allowed me to have all right-click options, but one reboot later it didn't work again. I can't delete from terminal, here is the message:

rmdir: failed to remove 'Books': Permission denied

Offline

#12 2015-07-14 06:48:28

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Flash mount as read only

rmdir: failed to remove 'Books': Permission denied

Offline

#13 2015-07-14 07:16:25

Narmo
Member
Registered: 2015-06-18
Posts: 45

Re: Flash mount as read only

I used:

LC_ALL=C rmdir Books

as a regular user, without sudo. The output was:

rmdir: failed to remove 'Books': Permission denied

The device was mounted automatically, I didn't mount it via terminal commands only stick it in the laptop.

Offline

#14 2015-07-14 07:24:08

Head_on_a_Stick
CatMod
From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Flash mount as read only

OK, try mounting it manually (do this from a TTY to stop automounting).

Plug the device then run these commands:

sudo mount /dev/sdb /mnt
sudo rmdir Books

This presumes the device is assigned to /dev/sdb -- change this if needed (use `dmesg|tail` to find the block device assignation).

Offline

#15 2015-07-14 07:54:50

Narmo
Member
Registered: 2015-06-18
Posts: 45

Re: Flash mount as read only

Ok, I deinstalled usbmount and was able to remove one of the files with commands you gave me. For now right-click options are also working, which is really weird because I installed and deleted usbmount few times before and I didn't changed anything else O.o Seems so that usbmount was also blocking rockbox utility, because after deinstallation it also started to working properly.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: bleh

Debian Logo