Search:  
Gentoo Wiki

TIP_Media_mount_points

This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

Contents

/media mount points

When sys-apps/hal detects a partition that's not listed in /etc/fstab, like when you attach a removable usb drive, it's automaticly mounted in /media.

Unlabeled partitions are mounted in /media/disk, /media/disk-1, /media/disk-2 and so on. It can be annoying that if you boot with multiple external drives you can't tell which one will get /media/disk and which one will get /media/disk-1.

If you label the partition, the mount point will be /media/<label>.

Labeling a partition

In this example I will assign the label "shinynewdisk" to /dev/sdb1:

ext2/ext3

Install sys-fs/e2fsprogs if you don't have it yet.

$ emerge e2fsprogs -av

read existing label

$ e2label /dev/sdb1

set new label

$ e2label /dev/sdb1 shinynewdisk

vfat

Install sys-fs/mtools

$ emerge mtools -av

edit /etc/mtools/mtools.conf and asign a windows device name to your disk

...
drive c: file="/dev/sdb1"
...

read existing label

$ mlabel -s c:

set new label

$ mlabel c:shinynewdisk

Other filesystems

Use the right tool for your file system: sys-fs/xfsprogs for xfs, sys-fs/reiserfsprogs for reiserfs, etc.

Retrieved from "http://www.gentoo-wiki.info/TIP_Media_mount_points"

Last modified: Fri, 26 Sep 2008 08:42:00 +0000 Hits: 2,464