You are not logged in.
Hello everyone,
first of all, Happy Holidays to all.
I am on vanilla debian + lxde on a HP minitower.
Since I don't need the dvd drive, I removed it and replaced it with a second HDD to store files (pictures and ebooks).
The problem is that every time I reboot, the drive doesn't automatically mount so calibre, the book cataloging software I am using, cannot access it.
Furthermore, if I click on it, it requires root permissions to be mounted.
I accessed it with a root permission enabled thunar (dark red mode) and changed the permissions (it didn't let me change the name of the drive though), but every time I reboot it looks as if it is a new drive.
What should I do.
Thank you all.
All the best,
Clemens
Last edited by clemens (2015-12-29 19:59:25)
Offline
I think you need to loosen the polkit permissions for drive mounting in your system.
See http://crunchbang.org/forums/viewtopic. … 12#p394912 and http://crunchbang.org/forums/viewtopic. … 54#p425554
EDIT: To mount the drive automatically at boot, add it to /etc/fstab
Last edited by Head_on_a_Stick (2015-12-26 16:40:36)
Offline
Hello,
thank you for your kind reply.
The polkit references got me started but I got lost quite soon not being very good with settings.
First I wanted to simply add the drive to fstab, but then I read that in case of updates or similar things it gets modified since it depends on the settings of polkit.
The options there are so many so I got a bit scared of touching things that I might not be able to fix so I did just one modification in the
/usr/share/polkit-1/action/org.freedesktop.udisks.policy
file (line 38 in my computer) on the filesystem-mount.system-internal (the HDD is internal, replacing the DVDD), and commented out the part on
<allow_active>auth_admin_keep</allow active>
and added instead a
<allow_active>yes</allow active>
.
After rebooting the drive wasn't mounted, but when I tried to open it in thunar (normal mode), it did without requesting the root password.
I am just wondering about one thing: is the change I have made dangerous (in the sense that it exposes my computer to easier external access)?
Cheers,
Clemens
p.s. I also read about pysdm, a gui for fstab. Does it work well on Debian?
Last edited by clemens (2015-12-26 19:14:59)
Offline
when I tried to open it in thunar (normal mode), it did without requesting the root password.
I am just wondering about one thing:is the change I have made dangerous (in the sense that it exposes my computer to easier external access)?
That would depend on how comfortable you are with any normal users on your machine being able to mount the internal drive without a password.
I think the polkit rules can be tailored to individual users but I don't know much about that TBH.
In respect of the fstab entry, it can be a lot simpler than you may think -- you can view the mount options used by thunar for your drive and add them to the entry:
grep path/to/drive/mount/point /proc/self/mounts
So it would look something like this (presuming you use an ext4 filesystem):
UUID=$UUID /mydrive ext4 $options 1 1
Replace "$options" with those found in the above command output then replace "/mydrive" with the desired mount point and replace "$UUID" with the UUID of the drive (hint: `blkid`)
I would advise against using GUI tools to modify /etc/fstab as the file has a simple syntax and should be familiar to the user.
Extra layers of abstraction are usually a bad idea.
Offline
Thank you for your reply.
I don't have particular problems with people mounting the internal drive, since I am the only user of this specific computer, but knowing that it can be accessed easily does not make me feel too comfortable.
I have just removed the settings I mentioned in the previous post and will now try the fstab way.
My only concern was that once there are modifications to the polkit due to updates or upgrades (not that I do them often though), the fstab gets automatically changed and therefore the settings have to be applied again.
Thank you also for the instructions.
By the way, by "mount options used by thunar" do you mean the path that appears when I mount the drive from it (i.e. /media/a very long uuid).
One last thing, I don't understand why the name I gave to the drive with a sudo thunar disappeared after I rebooted. Does it have to do with the fact that the computer considers the drive as a new one and reassigns it a uuid?
Thank you,
Cheers
Last edited by clemens (2015-12-28 22:00:55)
Offline
the fstab gets automatically changed and therefore the settings have to be applied again
/etc/fstab will not be modified unless you change it.
by "mount options used by thunar" do you mean the path that appears when I mount the drive from it (i.e. /media/a very long uuid)
Yes.
I don't understand why the name I gave to the drive with a sudo thunar disappeared after I rebooted
The /dev folder is dynamically re-created at boot.
EDIT: 1k posts, woot!
Offline
Thank you for your explanations and congratulations for the 1000 posts!!!
I am really impressed by the dedication and the breath of knowledge.
It is thanks to kind people like you that Bunselnalbs and #!! are so great: it is not just the wonderful software and tweaks, but the actual community full of amazing people.
Thank you and everyone who has contributed or is contributing for your constant help, patience and readiness to assist others!!
Cheers,
Clemens
Offline