I Googled for over an hour and cfdisk was suggested, but no workie.
There`s e2label for ext2 partitions, but no e3label or M$ label utility.
It was suggested that the rox and gtk bookmarks have the volume label.
If a USB pen is labeled: Puppy, then the bookmarks show: Puppy /mnt/sda1.
How To: Get drive volume label with Bash?
pdrive shows labels:
http://www.murga-linux.com/puppy/viewtopic.php?t=21200
the relevant part is in /usr/local/pdrive/func_probe:
So e2label seems to be used also for ext3.
For ntfs you use "ntfslabel", and for fat "mlabel".
Mark
http://www.murga-linux.com/puppy/viewtopic.php?t=21200
the relevant part is in /usr/local/pdrive/func_probe:
Code: Select all
VOLUME_LABEL=""
case "$ONEFS" in
ntfs)
if [ `ntfslabel -f $ONEDEV 2> /dev/null` ]; then VOLUME_LABEL="`ntfslabel -f $ONEDEV 2> /dev/null`"; fi;;
vfat)
if [ `mlabel -i $ONEDEV -s :: 2> /dev/null | cut -d " " -f 4` ]; then
VOLUME_LABEL="`mlabel -i $ONEDEV -s :: 2> /dev/null | cut -d " " -f 5`"; fi;;
ext*)
if [ `e2label $ONEDEV 2> /dev/null` ]; then VOLUME_LABEL="`e2label $ONEDEV`"; fi;;
esac
#---
For ntfs you use "ntfslabel", and for fat "mlabel".
Mark
Last edited by MU on Fri 16 Oct 2009, 12:33, edited 1 time in total.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
oh, Amigo was faster.
Yes, he is correct, blkid shows my testlabel that I just added, too
A much better solution that is.
result from "blkid":
Mark
Yes, he is correct, blkid shows my testlabel that I just added, too
A much better solution that is.
result from "blkid":
/dev/sde13: UUID="863af64f-1da4-4994-9798-cbc686dbe217" TYPE="ext2" LABEL="testlabel"
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
blkid is a great tool -much better than using 'fdisk -l' to find disks as well. I use it for my USB-auto-mounting program. One thing to be aware of is that running it creates a file /etc/blkid.tab with the info. Successively running blkid will not always refresh this file, so if you use blkid to identify disks, be sure to remove /etc/blkid.tab first so you get fresh info.
blkid is even more accurate than looking at /proc/partitions as the proc info can also become stale under certain circumstances.
Cheers!
blkid is even more accurate than looking at /proc/partitions as the proc info can also become stale under certain circumstances.
Cheers!