WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: USB Automount for Kiosk  (Read 314 times)

Offline frankdugan3

  • Newbie
  • *
  • Posts: 2
USB Automount for Kiosk
« on: March 12, 2013, 01:52:24 PM »
Hello. I hate to make my first post a help request for a particularly tricky and probably annoying subject, but I just can't figure this out on my own at this time.

What I'm trying to do: I have created a locked-down kiosk that boots to RAM over PXE on a number of nettop devices. It loads Chromium to a specific page in kiosk mode, and the user is blocked from doing much of anything, including closing it or switching to any other application. My organization uses PaperCut to enable a "webprint" feature, which basically allows a user to upload a file to the print server. In order for that to work on the kiosks, I need a way for the user to simply plug in a generic FAT32/NTFS USB drive and have it automatically mount to a generic point so that the user can use the file-browser pop-up from the browser to select a file from their drive. (Safe unmounting is not a priority, though would be nice if it unmounted after the drive was pulled.)

What I've done so far: I have done my best to search the forums already, but the most promising solution for my situation (http://forum.tinycorelinux.net/index.php/topic,9622.msg52676.html#msg52676) is a couple years old, and the specific udev rule bmarkus refers to (98-tc.rules) no longer exists, and I can't find a rule that has any kind of similar configuration to modify. Any advice?

An alternative solution when I was using Ubuntu Server as the kiosk was the program usbmount. It handled usb quite nicely, though the rest of the operating system was not very portable. If there is any possibility of getting usbmount to run on TC, or any similar program, that would be great. Any ideas on this?

Thank you in advance for any help you may offer!

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 2411
Re: USB Automount for Kiosk
« Reply #1 on: March 12, 2013, 02:06:24 PM »

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 3577
Re: USB Automount for Kiosk
« Reply #2 on: March 12, 2013, 05:50:06 PM »
Hi frankdugan3
Quote
... and the specific udev rule bmarkus refers to (98-tc.rules) no longer exists, ...
You can edit that file:
Code: [Select]
sudo editor /etc/udev/rules.d/98-tc.rulesMake sure you add   etc/udev/rules.d/98-tc.rules   to your backup.
If you want to read a much longer thread:
http://forum.tinycorelinux.net/index.php/topic,14977.msg86158.html#new

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 3577
Re: USB Automount for Kiosk
« Reply #3 on: March 12, 2013, 05:59:22 PM »
Hi Hi frankdugan3
Almost forgot:
Quote
(Safe unmounting is not a priority, though would be nice if it unmounted after the drive was pulled.)
You definitely want to make sure the device gets unmounted if it's pulled. If you don't, the system will keep on
creating more and more mount points as people plug and unplug their thumb drives.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 2411
Re: USB Automount for Kiosk
« Reply #4 on: March 12, 2013, 06:27:23 PM »
You must make sure it is unmounted BEFORE you pull it.

Offline frankdugan3

  • Newbie
  • *
  • Posts: 2
Re: USB Automount for Kiosk
« Reply #5 on: March 14, 2013, 01:27:43 PM »
Thanks for replies. I would to clarify a few points:

The users will only be uploading files, so read-only access to NTFS is perfectly fine, perhaps even preferred. My only issue is automating the process of mounting and unmounting.

Quote from: Rich
You definitely want to make sure the device gets unmounted if it's pulled. If you don't, the system will keep on
creating more and more mount points as people plug and unplug their thumb drives.

Exactly why it would be nice. What I meant by "safe unmounting" was that I'm OK with the idea of a user ripping out a drive before it is safely unmounted, so long as the mount point is removed afterwords automatically. This acceptable primarily because I will have them mount read-only anyway. In any case, I do plan on restarting these kiosks daily via a cronjob, so they will load fresh off of the boot image early every morning to clean up any user-generated messes.

Quote from: gerald_clark
You must make sure it is unmounted BEFORE you pull it.

I really have no way of forcing a user of this kiosk to click on a button to unmount before he or she yanks it out of the hub. Even if I did provide such a button for the handful of conscientious Linux users, I would still need it to automatically clean up after a device is removed without unmounting. Besides, as I mentioned above, I plan on mounting read-only, so data loss shouldn't be a problem.

Quote from: Rich
Make sure you add   etc/udev/rules.d/98-tc.rules   to your backup.

I have already done that, and ensured that it and the linked scripts had proper permissions, but it seemed to have no effect. Also, I am actually extracting the core.gz image and editing the filesystem directly, then packing it back up, so I'm not really using the backup feature.

For now, I will follow up on the links you posted, and read up on udev rules. I'll report back with my success or failure. Thanks again!
« Last Edit: March 14, 2013, 01:32:09 PM by frankdugan3 »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3162
Re: USB Automount for Kiosk
« Reply #6 on: March 14, 2013, 07:10:49 PM »
Even if I did provide such a button for the handful of conscientious Linux users
Last time I checked detaching a USB connected storage device under windows (xp), the procedure was neither requiring less effort nor time compared to Linux...
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)