Google
 

Rename USB FlashDisk Label On Linux System

>


Rename USB FlashDisk Label On Linux System
1. Install mtools packet
Code :
[root@msmunir1 ~]# yum install mtools
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Resolving Dependencies

--> Running transaction check
---> Package mtools.i386 0:3.9.11-4.fc9 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================
Package Arch Version Repository Size
===========================================================
Installing:
mtools i386 3.9.11-4.fc9 fedora 210 k

Transaction Summary
===========================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 210 k
Is this ok [y/N]: y
Downloading Packages:
mtools-3.9.11-4.fc9.i386.rpm | 210 kB 00:04
============================== Entering rpm code   
===========

Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mtools 1/1
=============================== Leaving rpm code   
===========
Installed:
mtools.i386 0:3.9.11-4.fc9

Complete!
[root@msmunir1 ~]#

2. View device name of your USB FlashDisk
Code :
[root@msmunir1 ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
56443212 23057344 30518668 44% /
/dev/sda1 194442 18871 165532 11% /boot
tmpfs 252516 60 252456 1% /dev/shm
/dev/sdb1 7848956 4768636 3080320 61% /media/KINGSTON
[root@msmunir1 ~]#

3. Unmount your USB FlashDisk (/dev/sdb1)
Code :
[root@msmunir1 ~]# umount /dev/sdb1

4. Check old USB FlashDisk Label
Code :
[root@msmunir1 ~]# mlabel -i /dev/sdb1 -s ::
Volume label is KINGSTON
[root@msmunir1 ~]#

5. Change label from KINGSTON to MYFLASH
Code :
[root@msmunir1 ~]# mlabel -i /dev/sdb1 -s ::MYFLASH
Volume label is KINGSTON
[root@msmunir1 ~]#

Note :
No space between :: and MYFLASH

6. Check new USB FlashDisk label
Code :
[root@msmunir1 ~]# mlabel -i /dev/sdb1 -s ::
Volume label is MYFLASH
[root@msmunir1 ~]#

7. Unplug your USB FlashDisk directly, then plug again. See the label of your USB FlashDisk.

Code :
[root@msmunir1 ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
56443212 23023368 30552644 43% /
/dev/sda1 194442 18871 165532 11% /boot
tmpfs 252516 60 252456 1% /dev/shm
/dev/sdb1 7848956 4768636 3080320 61% /media/MYFLASH
[root@msmunir1 ~]#

by. msmunir@batan.go.id