Neil Bothwick wrote:
Is there a way to set or change the volume name of a FAT partition
without reformatting it? When using HAL with KDE or Gnome Volume Manager
to display icons of USB devices, it uses the volume name, if present, as
the icon text, so it would be useful to be able to change this to give a
more meaningful label.
That sounds like a job for dd (be careful though). I used conv=notrunc but
that shouldn't be necessary for a normal block device.
$ dd if=/dev/zero of=floppy.img bs=1k seek=1440 count=0
0+0 records in
0+0 records out
$ /usr/sbin/mkdosfs -n 12345678901 floppy.img
mkdosfs 2.11 (12 Mar 2005)
$ strings -t d floppy.img
3 mkdosfs
42 B12345678901FAT12
91 This is not a bootable disk. Please insert a bootable floppy and
158 press any key to try again ...
9728 12345678901
$ echo -n "abcdefghijk" | dd of=floppy.img bs=1 seek=43 count=11 conv=notrunc
11+0 records in
11+0 records out
$ strings -t d floppy.img
3 mkdosfs
42 BabcdefghijkFAT12
91 This is not a bootable disk. Please insert a bootable floppy and
158 press any key to try again ...
9728 12345678901
Zac
--
[email protected] mailing list