Removable media/ja

リムーバブルメディアは単に、Article description::システムから容易に取り除くことができるメディアのことです. 典型的には、CD、DVD、USB ドライブ、各フォームファクタのメモリカードがこれに該当します.

非特権ユーザが不明なデバイスをマウントしたい場合、こうした種類のメディアには特別な処理が必要です.

前提条件

 * カーネルが、ストレージデバイスに対応していること.
 * カーネルが、デバイスが使用するに対応していること.

UUID とラベル
In many cases storage devices are identified by their device file, e.g. . Alternatively their UUID (Universally Unique Identifier) or label  can be used. In comparison to device files UUIDs and labels are persistent and will never change because of asynchronous detection. The UUID is generated automatically during filesystem creation. The label can be specified at filesystem creation or changed afterwards.

Use or  (part of ) to show all storage devices and their UUIDs and labels:

Mounting removable media
For mounting as a normal user without root privileges the device needs an entry with the option in /etc/fstab.

Plug removable media to the computer then run or.

The and  lines display the UUIDs  and  to be added to  for two media just plugged-in. also has the label which could be used alternatively. Let's create their mountpoints and :

And add them in.

With the option in these entries, they can be mounted / unmounted by normal users.

To see what is mounted, run without arguments or  again and find the  column populated for sdb1 and sdc1:

Once a device is mounted it can be accessed like a normal hard disk. Usual operations like, , , etc. work fine.

For unmounting the usage of mountpoint, label or UUID is equivalent as is for mounting. Any of them will do it.

Mounting without the fstab entry can be done by root only.

For further details see.

Another alternative is to edit /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy, under action id "org.freedesktop.udisks2.filesystem-mount", change auth_admin to yes for allow_any. This will allow a disk to be mounted by remote and local users, so consider this change as a potential security risk.

MTP
MTP (Media Transfer Protocol) プロトコルを利用したメディアの取り扱いについては、 の記事を参照してください.

関連項目

 * Texas Instruments PCIxx12 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
 * Texas Instruments PCIxx12 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
 * Texas Instruments PCIxx12 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
 * Texas Instruments PCIxx12 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
 * Texas Instruments PCIxx12 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
 * Texas Instruments PCIxx12 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
 * Texas Instruments PCIxx12 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)

外部資料

 * https://wiki.debian.org/Part-UUID
 * https://en.wikipedia.org/wiki/Universally_unique_identifier