1 |
On 31/12/2013 18:06, Joseph wrote: |
2 |
> On 12/31/13 10:49, Alan McKinnon wrote: |
3 |
>> On 30/12/2013 19:22, Joseph wrote: |
4 |
>>> On 12/30/13 17:36, Randolph Maaßen wrote: |
5 |
>>> [snip] |
6 |
>>>>> |
7 |
>>>>> With the line in fstab: |
8 |
>>>>> |
9 |
>>>>> /dev/sdb1 /media/stick auto |
10 |
>>>>> noauto,rw,users |
11 |
>>>>> 0 0 |
12 |
>>>>> |
13 |
>>>>> Some USB stick are mounted as root:root and I can not change that |
14 |
>>>>> even as |
15 |
>>>>> root. |
16 |
>>>>> When I remove this like from fstab. |
17 |
>>>>> The USB stick are mounting correctly as joseph:users owner except |
18 |
>>>>> they have |
19 |
>>>>> different mounting location which I don't like. |
20 |
>>>>> |
21 |
>>>>> -- |
22 |
>>>>> Joseph |
23 |
>>>>> |
24 |
>>>> |
25 |
>>>> You can specify the user/group that mounts a device with some mount |
26 |
>>>> options. I think they are uid=<username>/gid=<groupname> but I'm not |
27 |
>>>> sure and unfortunatly not on my Linux box at the moment. |
28 |
>>> |
29 |
>>> I've tried in fstab: |
30 |
>>> /dev/sdb1 /media/stick auto |
31 |
>>> noauto,uid=1000,gid=100,umask=077 0 0 |
32 |
>>> |
33 |
>>> but I'm getting an error: |
34 |
>>> Error mounting system-managed device /dev/sdb1: Command-line `mount |
35 |
>>> "/media/stick"' exited with non-zero exit status 32: mount: wrong fs |
36 |
>>> type, bad option, bad superblock on /dev/sdb1, |
37 |
>>> |
38 |
>>> What am I missing? |
39 |
>>> |
40 |
>> |
41 |
>> mount cannot auto-identify the fs type on your USB stick, or /dev/sdb1 |
42 |
>> is the wrong node. |
43 |
>> |
44 |
>> blkid as Bruce mentioned will help identify what is really going on. |
45 |
>> Also, tail -f /var/log/messages, insert the stick, and post the entries |
46 |
>> that produces. |
47 |
>> |
48 |
>> |
49 |
>> |
50 |
>> |
51 |
>> -- |
52 |
>> Alan McKinnon |
53 |
>> alan.mckinnon@×××××.com |
54 |
> |
55 |
> Thank you for the hints, here is the output of: tail -f /var/log/messages |
56 |
> My line if fstab is: /dev/sdb1 /media/stick auto |
57 |
> noauto,rw,user |
58 |
> and this USB below file are mounted as root:root (not joseph:users) |
59 |
> |
60 |
> Dec 31 09:02:16 syscon7 kernel: [231771.029376] usb 8-1: new high-speed |
61 |
> USB device number 33 using xhci_hcd |
62 |
> Dec 31 09:02:16 syscon7 kernel: [231771.042189] usb 8-1: default |
63 |
> language 0x0409 |
64 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043442] usb 8-1: udev 33, busnum |
65 |
> 8, minor = 928 |
66 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043445] usb 8-1: New USB device |
67 |
> found, idVendor=058f, idProduct=6366 |
68 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043447] usb 8-1: New USB device |
69 |
> strings: Mfr=1, Product=2, SerialNumber=3 |
70 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043448] usb 8-1: Product: Mass |
71 |
> Storage Device |
72 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043450] usb 8-1: Manufacturer: |
73 |
> Generic |
74 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043451] usb 8-1: SerialNumber: |
75 |
> 058F63666433 |
76 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043515] usb 8-1: usb_probe_device |
77 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043517] usb 8-1: configuration |
78 |
> #1 chosen from 1 choice |
79 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043614] usb 8-1: Successful |
80 |
> Endpoint Configure command |
81 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043689] usb 8-1: adding 8-1:1.0 |
82 |
> (config #1, interface 0) |
83 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043722] usb-storage 8-1:1.0: |
84 |
> usb_probe_interface |
85 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043726] usb-storage 8-1:1.0: |
86 |
> usb_probe_interface - got id |
87 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043728] usb-storage 8-1:1.0: USB |
88 |
> Mass Storage device detected |
89 |
> Dec 31 09:02:16 syscon7 kernel: [231771.043787] scsi41 : usb-storage |
90 |
> 8-1:1.0 |
91 |
> Dec 31 09:02:17 syscon7 kernel: [231772.175846] scsi 41:0:0:0: |
92 |
> Direct-Access Multiple Card Reader 1.00 PQ: 0 ANSI: 0 |
93 |
> Dec 31 09:02:17 syscon7 kernel: [231772.176055] sd 41:0:0:0: Attached |
94 |
> scsi generic sg2 type 0 |
95 |
> Dec 31 09:02:18 syscon7 kernel: [231772.836523] sd 41:0:0:0: [sdb] |
96 |
> 62333952 512-byte logical blocks: (31.9 GB/29.7 GiB) |
97 |
> Dec 31 09:02:18 syscon7 kernel: [231772.836932] sd 41:0:0:0: [sdb] Write |
98 |
> Protect is off |
99 |
> Dec 31 09:02:18 syscon7 kernel: [231772.836934] sd 41:0:0:0: [sdb] Mode |
100 |
> Sense: 03 00 00 00 |
101 |
> Dec 31 09:02:18 syscon7 kernel: [231772.837316] sd 41:0:0:0: [sdb] No |
102 |
> Caching mode page present |
103 |
> Dec 31 09:02:18 syscon7 kernel: [231772.837318] sd 41:0:0:0: [sdb] |
104 |
> Assuming drive cache: write through |
105 |
> Dec 31 09:02:18 syscon7 kernel: [231772.838812] sd 41:0:0:0: [sdb] No |
106 |
> Caching mode page present |
107 |
> Dec 31 09:02:18 syscon7 kernel: [231772.838815] sd 41:0:0:0: [sdb] |
108 |
> Assuming drive cache: write through |
109 |
> Dec 31 09:02:18 syscon7 kernel: [231772.846512] sdb: sdb1 |
110 |
> Dec 31 09:02:18 syscon7 kernel: [231772.848062] sd 41:0:0:0: [sdb] No |
111 |
> Caching mode page present |
112 |
> Dec 31 09:02:18 syscon7 kernel: [231772.848065] sd 41:0:0:0: [sdb] |
113 |
> Assuming drive cache: write through |
114 |
> Dec 31 09:02:18 syscon7 kernel: [231772.848067] sd 41:0:0:0: [sdb] |
115 |
> Attached SCSI removable disk |
116 |
> Dec 31 09:02:25 syscon7 udisksd[3624]: Mounted /dev/sdb1 (system) at |
117 |
> /media/stick on behalf of uid 1000 |
118 |
> |
119 |
|
120 |
|
121 |
That looks normal. Having lines in fstab for removable media is not a |
122 |
good solution in general - insert two sticks and the second one doesn't |
123 |
have a matching line (it isn't /dev/sdb1) |
124 |
|
125 |
|
126 |
That's why automounter apps were developed so you can get the config out |
127 |
of fstab and replace it with something more generic somewhere else. |
128 |
|
129 |
udisks is the app you are suing for this and it's the most common |
130 |
solution chosen by most DEs. |
131 |
|
132 |
When was udisks last updated on your system? |
133 |
What was updated/installed at the last update when this problem started? |
134 |
|
135 |
-- |
136 |
Alan McKinnon |
137 |
alan.mckinnon@×××××.com |