Linux系統掛載FAT32的隨身碟

來源:互聯網
上載者:User

Linux系統掛載FAT32的隨身碟 Linux掛載隨身碟步驟如下 1:將隨身碟插入USB介面,檢查是否插好 2:用fdisk命令檢查分區和USB裝置資訊 [root@wgods ~]# fdisk -l Disk /dev/sda: 1000.2 GB, 1000204886016 bytes255 heads, 63 sectors/track, 121601 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/sda1 * 1 13 104391 83 Linux/dev/sda2 14 121601 976655610 8e Linux LVM Disk /dev/sdb: 4012 MB, 4012900352 bytes223 heads, 55 sectors/track, 639 cylindersUnits = cylinders of 12265 * 512 = 6279680 bytes Device Boot Start End Blocks Id System/dev/sdb1 * 56 640 3580928 c W95 FAT32 (LBA)Partition 1 has different physical/logical beginnings (non-Linux?):phys=(42, 17, 40) logical=(55, 23, 1)Partition 1 has different physical/logical endings:phys=(487, 222, 55) logical=(639, 6, 31) 通過上面資訊我們可以看出USB裝置是FAT32格式的,標識為/dev/sdb1 [root@wgods ~]# fdisk -l | grep FAT32/dev/sdb1 * 56 640 3580928 c W95 FAT32 (LBA) 3:在mnt目錄下先建立一個usb的目錄 [root@wgods ~]# cd /mnt/[root@wgods mnt]# mkdir usb 4:掛載隨身碟[root@wgods mnt]# mount -t vfat /dev/sdb1 /mnt/usb 掛載成功後,我們可以在/mount/usb下看到相關的內容。 5:卸載隨身碟 執行umount命令卸載隨身碟時,報如下錯誤“device is busy”,可以用參數l解決問題。當然你也可以用fuser命令解決問題。如下所示 [root@wgods ~]# umount /mnt/usbumount: /mnt/usb: device is busyumount: /mnt/usb: device is busy [root@wgods ~]# umount -f /mnt/usbumount2: Device or resource busyumount: /mnt/usb: device is busyumount2: Device or resource busyumount: /mnt/usb: device is busy [root@wgods ~]# umount -l /mnt/usb 問題解決 [root@wgods usb]# umount /mnt/usbumount: /mnt/usb: device is busyumount: /mnt/usb: device is busy[root@wgods usb]# fuser -m /mnt/usb/mnt/usb: 21123c 21158c 21180c 21182c 21223c[root@wgods usb]# ps -auxw | grep 21123Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQroot 21123 0.0 0.0 3784 672 pts/2 T 15:10 0:00 more 12.sqlroot 21346 0.0 0.0 3920 696 pts/2 S+ 15:52 0:00 grep 21123 [root@wgods usb]# fuser -kvm /mnt/usb USER PID ACCESS COMMAND/mnt/usb: root 21123 f.c.. moreroot 21158 ..c.. manroot 21180 ..c.. shroot 21182 ..c.. lessroot 21223 ..c.. bash [etl@wgods ~]$ umount /mnt/usbumount: /mnt/usb is not in the fstab (and you are not root)[etl@wgods ~]$ su - rootPassword: [root@wgods ~]# umount /mnt/usb 6: 刪除usb目錄[root@wgods ~]# umount -l /mnt/usb[root@wgods ~]# rm -rf /mnt/usb 注意:有時候掛載時,中文的檔案名稱和目錄名會出現亂碼,為了避免這種情況可以指定字元集,命令如下 [root@wgods ~]# mount -t vfat -o iocharset=utf8,codepage=uft8 /dev/sdb1 /mnt/usb [root@wgods ~]# mount -t vfat -o iocharset=cp936,codepage=936 /dev/sdb1 /mnt/usb 注意:cp936是指簡體中文,cp950是指繁體中文。 來源 http://www.cnblogs.com/kerrycode/archive/2013/04/01/2993744.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.