[plug] Partition/volume label change

Michael Holland myk at myk.id.au
Sat Feb 24 11:00:40 WST 2007


On Sat, 24 Feb 2007, Patrick Coleman wrote:

> On 2/24/07, Jim Householder <nofixed at westnet.com.au> wrote:
> > Is there a command to change the label of a volume or partition?

$ echo "My New Name" | dd of=/dev/XXX  bs=1 count=11 seek=43

Pad with spaces to 11 characters, no terminator.
I found that this only works if the partiton is mounted first, then
unmounted to flush the writes. What is the proper way to do this?

or for the less brave, use hexedit. They make it dead easy by using
'NO NAME' rather than an empty field, if none is set.

> You mentioned USB drive - assuming you want a dos-based filesystem,
> and don't mind formatting the device, mkfs.vfat and mkfs.msdos appear

I'd guess he might mind re-formatting :-)
Anyway, its a sledgehammer approach to what should be a trivial problem.
I'm surprised to find that neither the Gnome or KDE file browsers seem to
allow editing a FAT volume ID, given how simple and common it is.

There must be a better way!



More information about the plug mailing list