[SOLVED] Re: can I change the label of memory stick in a camera

H.S. hs.samix at gmail.com
Thu Jan 15 03:38:01 UTC 2009


H.S. wrote:
> Thanks for the link, it solved the problem.
> 
> What I did was this:
> 
> 1. I needed to install mtools package first. Then, to avoid a noisy
> warning by mtools while dealing with labels of FAT partitions, I did:
> $> echo mtools_skip_check=1 >> ~/.mtoolsrc
> 
> 2. While the camera was connected via the USB cable (and while it was
> powered on; some cameras power off after a few minutes of inactivity), I
> found out its partition using the mount command:
> $> mount
> 
> in my case, it was listed as:
> /dev/sdc1 on /media/disk type vfat
> (rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=1001,utf8,umask=077,flush)
> 
> so the partition I was trying to relabel was /dev/sdc1.
> 
> 2. Next, I was able to list the current label using the following command.
> $> sudo mlabel -i /dev/sdc1 -s ::
> 
> 3. Finally, to actually change the label, I used the command:
> $> sudo mlabel -i /dev/sdc1 ::MemStick1GB
> 
> where "MemStick1GB" was the label I wanted. I think you can have a
> string here of at most 11 characters.
> 
> Note that if for some reason the attached camera powers off (maybe power
> save option), and if you try to change the label, you will get an error
> like this:
> $> sudo mlabel -i /dev/sdc1 ::MemStick1GB
> Can't open /dev/sdc1: No such file or directory
> Cannot initialize '::'
> mlabel: Cannot initialize drive
> 
> After changing the label, unmount the camera volume (right click on the
> camera device's icon), and then reconnect the camera. The icon now
> should have the new label.
> 
> Regards.
> 

A couple of additional things I just noticed. I have this mp3 player
connected to my computer. When I gave the following command, notice that
it said there was no label and asked for a new one:
$> mlabel -i /dev/sda1 ::
 Volume has no label
Enter the new volume label :

Typing a label after this changed the volume's label. BTW, the mp3
player is Samsung YP-C1 (plays ogg as well).

Also, I was able to set a label longer than 11 characters,
"SamsungMP3Player" in the above case. And the next time I gave the above
command, I got:
$> mlabel -i /dev/sda1 ::
 Volume label is SamsungMP3Player (abbr=SAMSUNGMP3P)
Enter the new volume label :


So even though the label is truncated (abbreviated) to 11 characters
internally, yet when I connect the player to my desktop (running KDE),
the removable drive icon shows the full label.

Regards.

-- 

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.





More information about the ubuntu-users mailing list