[clug] Volume names

Paul Wayper paulway at mabula.net
Mon Apr 11 01:48:19 MDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/11/2011 08:40 AM, Brendan Jurd wrote:
> On 10 April 2011 09:06, Keith Sayers <keiths at apex.net.au> wrote:
>>        Can Linux ascribe a volume name to a hard drive, please?
> 
> Not to a hard drive, but if you're looking for something like Windows'
> "volume label" a la the Format Disk program, you want to put a label
> on a _filesystem_, not a hard drive.
> 
> The method for doing so depends on the filesystem.  For example, for
> an ext2 or ext3 filesystem, `tune2fs -L <label> <device>` will get you
> there.

Or 'e2label <device> <new_label>' - e.g. 'e2label /dev/sda1 BOOT'

The important point is that it depends on what file system you have on there.
 If it's not an ext2, ext3 or ext4 file system, e2label and tune2fs won't
write anything (they won't find a correctly-formatted superblock on the
filesystem).  NTFS partitions can use ntfslabel, XFS uses xfs_admin -L
<label>, etc.

Have fun,

Paul
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk2iskIACgkQu7W0U8VsXYKY0ACg2Q9JvdKOW8zFacGX76Okj/A/
hlEAnA26xLKy/ddyyE1ynZH8sANQ2Bkp
=qjUW
-----END PGP SIGNATURE-----


More information about the linux mailing list