Main Page   Related Pages  

How to put labels on your partitions

Important: you don't need to put labels on your partitions. transitmount works ok without any configuration for itself or label on your disks. Only if you often swap hard disks, and prefer to access them my volume name, it might be more convenient to put a label, which is easy.

Short answer:

for ext2 or ext3 filesystems:

e2label /dev/hdb1 MyLabel
e2label /dev/ide/host0/bus0/target0/lun0/part7 MyDatas

for other filesystems:

echo "MyAlienFileSystem" > /mnt/transit/hdd1/volname

Long answer below:

What are labels ?

Volume label have long existed since floppy disks exist and probably even before, but they've been more or less used depending on systems.

A label is a (preferably unique) word or short sentence attached to a filesystem, as a referer.

On the Amiga, for example, the system, when needing information from a particular floppy disk would ask you in a graphical "requester window" (many years later, most people call this a "dialog box"):

Please insert volume
Workbench 1.3
in any drive

[Ok] [Cancel]

You would then either insert the needed floppy, or click on "Cancel".

(The Macintosh has a similar approach, but the Amiga did real multitasking before 1990 ;-).

Label nowadays

There is provision for a volume label up to 16 characters long in all ext2 filesystems. These are already used by e2fsck for cosmetic purpose, and by mount -L.

There is provision for a volume label up to 11 uppercase letters in all fat filesystems.

There is provision for a longer volume label in all iso9660 (CD-Rom) filesystems (and variants).

Many other filesystems have labels (amiga ofs and ffs, FIXME give me some examples).

These are called "hard labels" in transitmount.

Labels in transitmount

Current aim of transitmount is simply making transitting hard disks easily and conveniently available without becoming root. For future ideas, you may want to visit Possible future of transitmount.

Since version 0.3, you have two ways to specify a volume name:

Hard labels (ext2fs only for now)

So far, transitmount support hard labels for ext2fs only.

transitmount reads the filesystem volume name using "e2label" (a program which is already on your systems, for it is distributed with mke2fs and e2fsck, in the e2fsprogs package).

Currently, other filesystem types are not checked for a "hard" label.

How to set a "hard" volume label on an ext2 filesystem

If transitmount mounted John's 20Gig drive with some video stuff on /mnt/transit/hdb1, and if this disk may often be plugged into the computer, if might be convenient to set an ext2 volume label by e.g.

e2label /dev/hdb1 John20GigVideo

Unless you changed permission on devices, only root can do this.

(Of course, replace /dev/hdb1 by the proper device name depending on your setup).

Next time the filesystem is umounted and transitmount called again, it will be mounted in /mnt/transit/John20GigVideo, see Refreshing the mountpoints below for a check.

Other filesystems: soft labels

For others filesystems supported by kernel, transitmount relies on what are called "soft labels".

If a partition or device is mounted under /mnt/transit/device , say /mnt/transit/hdd1 , and is not ext2, you may want put a soft label on it.

echo "MyAlienFileSystem" > /mnt/transit/hdd1/volname

Next time the filesystem is umounted and transitmount called again, it will be mounted in /mnt/transit/MyAlienFileSystem, see Refreshing the mountpoints below for a check.

Refreshing the mountpoints

If you change a hard or soft label, you may want to check that from now, volume will be mounted at proper places.

You may want to do this as root:

umount /mnt/transit/*

In these examples, /dev/hdb1 will be mounted under /mnt/transit/John20GigVideo and /dev/hdd1 under /mnt/transit/MyAlienFileSystem .

Back to transitmount

Transitmount is available on the following mirrors: mirror

Documentation generated by doxygen