LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-28-2007, 10:43 PM   #1
Ceran
Member
 
Registered: Sep 2006
Posts: 32

Rep: Reputation: 15
How Do You Edit Disk Labels?


Most flash drives use the FAT filesystem, and this allows them to store a "disk label". When you plug a flash drive into your computer, and Gnome/KDE shows its icon, this is the name it'll use with the icon. In Windows you can edit this name just by right-clicking on the drive. As far as I can tell, Linux has no similar feature. This doesn't sound like a very complicated task, but I get nothing from Google.

Note, I'm not asking how to edit fstab, or the device's mount folder, as changing these doesn't change the name stored on the physical device. Does anyone know what I'm talking about? This seems like such a simple stupid little thing, but hours of Googling have brought me nothing.
 
Old 07-28-2007, 11:37 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Quote:
Originally Posted by Ceran
Most flash drives use the FAT filesystem, and this allows them to store a "disk label". When you plug a flash drive into your computer, and Gnome/KDE shows its icon, this is the name it'll use with the icon. In Windows you can edit this name just by right-clicking on the drive. As far as I can tell, Linux has no similar feature. This doesn't sound like a very complicated task, but I get nothing from Google.

Note, I'm not asking how to edit fstab, or the device's mount folder, as changing these doesn't change the name stored on the physical device. Does anyone know what I'm talking about? This seems like such a simple stupid little thing, but hours of Googling have brought me nothing.
Right click your flash drive and select Properties, change the name to anything you want, then click ok. Although this does not store the new label on the device, everytime you plug that device into the same computer, it will retain that change and display the new label you chose for that flash drive. I hope this helps.
 
Old 07-29-2007, 01:00 AM   #3
Ceran
Member
 
Registered: Sep 2006
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by {BBI}Nexus{BBI}
Right click your flash drive and select Properties, change the name to anything you want, then click ok. Although this does not store the new label on the device, everytime you plug that device into the same computer, it will retain that change and display the new label you chose for that flash drive. I hope this helps.
There's nothing in Properties that lets you change the name (at least in Gnome). However, with the help of a guy on Freenode, I figured out how to do it. With the mlabel program included in the mtools package, I can edit the label of any device that's using a DOS partition.
 
Old 07-29-2007, 01:18 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
"mkfs.msdos -n pick-a-name /dev/????" perhaps.
Never tried it, but it's likely to already be on your distro.
 
Old 07-29-2007, 01:41 AM   #5
Ceran
Member
 
Registered: Sep 2006
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00
"mkfs.msdos -n pick-a-name /dev/????" perhaps.
Never tried it, but it's likely to already be on your distro.
My drive is at /dev/sdd2. If I try 'mkfs.msdos -n "Some New Label" /dev/sdd2' I get the error:
mkfs.msdos: /dev/sdd2 contains a mounted file system.

But of course if I unmount the drive, I then get:
/dev/sdd2: No such file or directory
 
Old 07-29-2007, 01:59 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
Quote:
Originally Posted by Ceran
But of course if I unmount the drive, I then get:
/dev/sdd2: No such file or directory
Umount command (against the mount point), or (physically) remove the drive ???.
 
Old 07-29-2007, 11:37 AM   #7
Ceran
Member
 
Registered: Sep 2006
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by syg00
Umount command (against the mount point), or (physically) remove the drive ???.
Just umount. I get that error with the drive still physically connected.
 
Old 07-29-2007, 11:47 AM   #8
Ceran
Member
 
Registered: Sep 2006
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Ceran
Just umount. I get that error with the drive still physically connected.
I just tried using the /dev/disk/by-label/<drivelabel> path instead and that changes the label, but it also wipes out everything on the drive.

Last edited by Ceran; 07-29-2007 at 11:50 AM.
 
Old 07-29-2007, 06:11 PM   #9
GregLee
Member
 
Registered: Feb 2004
Location: Waimanalo, HI
Distribution: Slackware 10, Fedora 6
Posts: 308

Rep: Reputation: 30
If you want to stick with the msdos filesystem on the usb drive, here is a reference for how to add or change a label:
http://bradthemad.org/tech/notes/sandisk_sdmx1.php

If you want to put a linux filesystem on the device, here is an account of doing that: http://ubuntuforums.org/showthread.php?t=125990
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
1. how to set labels bottom margin? 2. how to set all labels to be right to left typi dfgfdgdf General 0 03-20-2007 09:43 AM
Cannot Edit Partitions/Erase Disk! pengu Linux - Hardware 2 07-04-2006 10:38 PM
edit volume serial number (VSN) on floppy disk nvbauer Linux - Hardware 11 08-12-2005 07:44 AM
Hex Edit Hard Disk soulstace Linux - Software 1 04-22-2005 04:40 PM
edit boot disk after changing drive to slave? petrosil Linux - Newbie 4 11-17-2003 09:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration