[plug] Partition/volume label change

Jim Householder nofixed at westnet.com.au
Mon Feb 26 15:13:35 WST 2007

Michael Holland wrote:
> 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

I tried this.  Seemed to work ok, but it produced no visible change.

> 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!
> _______________________________________________

I went ahead and used Windows to change the label.
Then I used emacs to locate the new label.  It was found at the start of 
sector 1976.  The 2 copies of the FAT both had "NO NAME    ".

I'm still looking into the details so I can write a utility for the task.

More information about the plug mailing list