转:http://test115.blog.163.com/blog/static/233085042013924111039650/
- 第一步,修改mtools.conf
-
- vim /etc/mtools.conf
- 添加一行
mtools_skip_check=1
- mlabel -i /dev/sdb1 ::jetflash
-
- '/dev/sdb1' 这个是你的设备节点,可能不同的环境,名称不一样;
- jetflash 你期望的设备名称;
- 然后弹出设备
-
- eject /dev/sdb1
修改前
lynx@lynx-gx520-desktop:~$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda7 13558528 4821108 8048680 38% / none 1019532 296 1019236 1% /dev none 1024064 1024 1023040 1% /dev/shm none 1024064 336 1023728 1% /var/run none 1024064 0 1024064 0% /var/lock none 1024064 0 1024064 0% /lib/init/rw /dev/sda6 188403 39844 138831 23% /boot /dev/sda10 25952124 20114696 4519132 82% /home /dev/sda9 29751364 24277276 3962768 86% /opt /dev/sdb1 1855932 665548 1190384 36% /media/DISK-USB修改后
root@lynx-gx520-desktop:/home/lynx# df -lh Filesystem Size Used Avail Use% Mounted on /dev/sda7 13G 4.6G 7.7G 38% / none 996M 296K 996M 1% /dev none 1001M 1.3M 999M 1% /dev/shm none 1001M 340K 1000M 1% /var/run none 1001M 0 1001M 0% /var/lock none 1001M 0 1001M 0% /lib/init/rw /dev/sda6 184M 39M 136M 23% /boot /dev/sda10 25G 20G 4.4G 82% /home /dev/sda9 29G 24G 3.8G 86% /opt /dev/sdb1 1.8G 650M 1.2G 36% /media/JETFLASH
- 也可以使用‘dosfslabel’ 修改;
dosfslabel /dev/sdb1 jasonxu eject /media/JETFLASH/再插入
- 显示结果
root@lynx-gx520-desktop:/home/lynx# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda7 13558528 4821112 8048676 38% / none 1019532 296 1019236 1% /dev none 1024064 1028 1023036 1% /dev/shm none 1024064 340 1023724 1% /var/run none 1024064 0 1024064 0% /var/lock none 1024064 0 1024064 0% /lib/init/rw /dev/sda6 188403 39844 138831 23% /boot /dev/sda10 25952124 20115432 4518396 82% /home /dev/sda9 29751364 24277276 3962768 86% /opt /dev/sdb1 1855932 665548 1190384 36% /media/jasonxu
- 查看修改几个结果
- dosfslabel /dev/sdb1