FAT32 USB flash drives mounted in Linux

Source: Internet
Author: User
Steps 1: Insert the USB flash disk into the USB interface and check whether it is inserted. 2: run the fdisk command to check the partition and USB device information. [root @ wgods ~] # Fdisk-lDisk/dev/sda: 1000.2 GB, 1000204886016bytes255hea... steps 1: Insert the USB flash disk into the USB interface and check whether it is inserted. 2: run the fdisk command to check the partition and USB device information. [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) we can see from the above information that the USB device is in FAT32 format and is identified as/dev/sdb1 [root @ wgods ~] # Fdisk-l | grep FAT32/dev/sdb1 * 56 640 3580928 c W95 FAT32 (LBA) 3: Create a usb directory in the mnt Directory [root @ wgods ~] # Cd/mnt/[root @ wgods mnt] # mkdir usb 4: mount the usb flash disk [root @ wgods mnt] # mount-t vfat/dev/sdb1/mnt/usb after mounting the disk, we can see the relevant content under/mount/usb. 5: When detaching a USB flash drive and executing the umount command, the following error "device is busy" is reported. you can use parameter l to solve the problem. You can also use the fuser command to solve the problem. [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 problem solving [root @ wgods usb] # umount/mnt/usbumount:/mnt/usb: device is busyumount:/mnt/usb: device is busy [root @ wgods usb] # fuser-m/mnt/usb: 21123c 21158c 21180c 21182c 21223c [root @ wgods usb] # ps-auxw | grep 21123 Warning: bad syntax, perhaps a bogu '-'? See/usr/share/doc/procps-3.2.7/FAQroot 21123 0.0 0.0 3784 672 pts/2 T more 12. sqlroot 21346 0.0 0.0 3920 pts/2 S + grep 696 [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: delete the usb Directory [root @ wgods ~] # Umount-l/mnt/usb [root @ wgods ~] # Rm-rf/mnt/usb Note: Sometimes the Chinese file name and directory name may be garbled during mounting. to avoid this problem, you can specify the character set by running the following command: [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 note: cp936 refers to simplified Chinese and cp950 refers to traditional Chinese. Source http://www.cnblogs.com/kerrycode/archive/2013/04/01/2993744.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.