Somehow Automount in fileserver doesn't work, despite it is listed as a feature.
How can I fix it?
I need CD and USB drives to be automounted to SAMBA. The appliance is running under VirtualBox for Windows (x64).
Replies (19)
The strange thing is there is
Reply 1do you have experience with
Reply 2do you have experience with udev? it seems, it should be enough to automount CDs...it works well on archlinux and a couple of others. but something is wrong there, in TKL.
I didn't think it was obvious....
Reply 3automount is also used to automatically mount shares from remote servers, so I was just trying to confirm what you wanted to do.
Thank you for that.
I tried it on an older version of TKL fileserver (all that I have available at the moment) and saw the same behaviour (the CD not autmounting). I also noticed that the autofs package was not installed on my system, which might be a clue as to why it's not working.
If you find the solution, please post back as I am sure it will help others.
Fileserver: It is said that
Reply 4Fileserver:
I want CD support. USB flash drives support, if possible (seems it is the same as CD for UDEV)
It is said that CD Automount is supported for Fileserver.
Configured shares: CD-ROM with automount
cdrom share is present by default in preconfigured Samba
It is obvious that I want Automount to function. I.e.:
- create /media/cdrom on CD insert HAL event
- mount /media/cdrom or /media/cdrom/{volume_name} the same time.
- unmount and delete the folder on removal HAL event.
There is everything needed in the TKL, but configuration is broken. I can't figure out how to fix UDEV configs to mount CDROM and USB drives.
I'm not sure what you want to do
Reply 5Sorry, but I am missing something.
What, exactly, do you want to do?
- Insert a cd/image onto the TKL fileserver and have it automatically mount it locally?
- Mount an existing smb share from another machine (TKL is the client, some other machine is the server with the share)?
Sorry, I didn't understand
Reply 6Sorry, I didn't understand the Idea you are talking about...
I have:
turnkey-fileserver-12.0-squeeze-x86-vmdk
uname -r 2.6.32-5-686
VirtualBox 4.2.12 build r84980
host: win7 x64
vbox tools installed according to the VBOX help (updates and dkms are according manual)
both, VBOX shares and CD can be mounted manually via mount.
VBOX can't be mounted during boot. According to google this is a common problem caused by late process of tools/share. I mount it as a last directive in the boot script.
CD doesn't automount, i.e. automatically upon disk insertion.
/etc/udev/rules.d .rules for CD (concearning sr0 and sda1 devices) are not processed uppon disk insertion
udevadm monitor doesn't produce any output to console uppon disk insertion.
Do you mean VBox shared folder?
Reply 7If so then that definately did work (I had it working fine with v12.0 on a VBox (forget which version) install I did some time ago... I wrote this tutorial as I did it... Although IIRC there is a step missing towards the end as by default only root has access when mounted with fstab).
If VBox auto mount of shared folders at boot (shared on your host via VBox) isn't working then either you have made some mistake or there is a regression somewhere (perhaps in TKL v12.1 or the version of VBox itself or the version of Vbox tools you've used...).
that startup mount doesn't
Reply 8that startup mount doesn't work either (I don't know why people call it auto, because it is not automatic)...the fstab is processed earlier than tools module. so I mount it in the startup script.
I wouldn't think that it would've broken udev
Reply 9But TBH I have no idea... I have never run TKL servers on hardware nor used automount with the Fileserver so I have no idea whether this behaviour is limited to running inside VBox or whether it is just totally broken (regardless of where it is running...)
I vaguely recall needing to install VBox tools to get host shares auto mounting at boot...
I do know that to automount USBs you need to install AutoFS (or similar - as suggested above by Eric). Seeing as you also have stated that you desire USB automounting (and auto sharing) then perhaps it's worth installing now anyway and see if that also helps with CD automount? I'm not sure on the best practice for auto-sharing USBs though...
"The other thing that springs
Reply 10"The other thing that springs to mind is the question of whether you have VBox tools installed?"
I have. Do you think the've damaged udev?
Actually, I mount the host's NTFS volume through VBOX to use it with SAMBA. It is just easier to manage contents this way.
I tried to pass CDROM and to mount images.
My experience tells that it should generate the same insertion events in Ubuntu and Windows guests.
Yes, I can mount CD's manually from /dev/sr0 and /dev/sda1.
Oh ok, didn't realise your problem was with CDROM...
Reply 11I thought you were complaining about USB not automounting (which AFAIK is not configured in any TKL appliances...)
I haven't ever tested that feature so I won't deny that it's a possibly a bug, but I doubt very much that it was caused by "some hot head". Assuming that you are using the v12.1 release (which only just came out) then perhaps it is a regression?
The other thing that springs to mind is the question of whether you have VBox tools installed? TBH I don't know if that's a requirement but I'd be inclined to install them and see if it helps. Also have you made sure that you have the CDROM passing through correctly to the VM? Can you mount it ok manually?
please see previous
Reply 12please see previous comment.
It is not just TKL, but a Fileserver appliance with /media present and CDROM share created by default.
udev is running by default, but some hot head blocked the support for automount.
I have successfully had VBox shares automounting...
Reply 13Although unfortunately I don't recall the exact steps. I got all the info on how to do it via google though...
I'm not sure about it being mentioned as a feature anywhere because as far as I know TKL doesn't have automount configured by default (and rightly so IMO) but it should be pretty straight forward...
If you keep in mind that the current TKL v12.x is based on Debian 6/Squeeze, a google such as "automount cd samba debian squeeze" serves up a number of results that look like they'd be useful. I think you'll also need to investigate
Bottom line is that it seems to me that you are having a few separate issues. Whilst they are sort of interrelated, addressing them one at a time is the way to go IMO.
tried this script, doesn't
Reply 14tried this script, doesn't work.
devices to mount are correct, /dev/sr0 = /dev/sda1
But nothing happens when inserting disk.
It's like udev is permanently disabled, or all events are filtered out, I don't know...
/etc/udev/rules.d/10-cdrom.rules
KERNEL!="sr[0-9]*", GOTO="disc_by_label_auto_mount_end"
# Get label
ACTION=="add", PROGRAM=="/sbin/blkid -o value -s LABEL %E{device}", ENV{dir_name}="%c"
ACTION=="add", RUN+="/bin/mkdir -p '/media/%E{dir_name}'", RUN+="/bin/mount -t auto -o %E{mount_options} /dev/%k '/media/%E{dir_name}'"
ACTION=="remove", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'"
LABEL="disc_by_label_auto_mount_end"
Are you running in VBox too?
Reply 15Out of interest, is acpi-support installed?
Not acpid - acpi-support
Reply 16So yes a package called 'acpi-support'. TBH I don't know a lot about it, but acording to what I have read it supports "a range of hardware events" and I thought perhaps telling the OS that a CD has been inserted may be one of those hardware events... IDK but it may be worth a shot...!?
Also FWIW you do need it installed (or at least 'acpi-support-base') to get a VBox VM to shutdown cleanly.
Are there any changes in TKL
Reply 17Are there any changes in TKL 13 ?
I'm not sure why it doesn't work
Reply 18And I'm not going to speculate on what it imay be (I don't know enough).... But I have lodged an issue (bug report) on the TKL Dev Tracker (https://github.com/turnkeylinux/tracker/issues/43)
... does it mean udev is
Reply 19... does it mean udev is broken in TKL?
Can fixing it be set as a goal of the future releases?
The strange thing is there is udevd running, but do nothing.
Seems like automount is disabled by default and no manual tells how to enable it back!
People, please, help!
It, actually does't automount VBOX shares the same. FSTAB doesn't work because it is processed too soon to see VBOX shares, UDEV doesn't work.
:(