Mount and view mobile devices

Source: Internet
Author: User
Linux: How to Use the mount command (attach a mobile hard drive) Mount a mobile hard drive

For Linux systems, mobile hard disks with USB interfaces are treated as SCSI devices. Before inserting a mobile hard disk, use fdisk-l
Or more/proc/partitions to view the hard disk and hard disk partition of the system.

[Root at pldyrouter/] # fdisk-l

Disk/dev/SDA: 73 dot 4 GB, 73407820800 bytes

255 heads, 63 sectors/track, 8924 Cylinders

Units = cylinders of 16065*512 = 8225280 bytes

Device boot start end blocks ID system

/Dev/sda1 1 4 32098 + de Dell Utility

/Dev/sda2*5 2554 20482875 7 HPFs/NTFS

/Dev/sda3 2555 7904 42973875 83 Linux

/Dev/sda4 7905 8924 Win95 ext 'd (LBA)

/Dev/sda5 7905 8924 8193118 + 82 Linux swap

Here we can clearly see that the system has a SCSI hard disk/dev/SDA and its four Disk Partitions/dev/sda1 --/dev/sda4, /dev/sda5 is the logical partition of/dev/sda4. After the mobile hard disk is connected, use fdisk-l
Or more/proc/partitions to view the hard disk and hard disk partition of the system

[Root at pldyrouter/] # fdisk-l

Disk/dev/SDA: 73 dot 4 GB, 73407820800 bytes

255 heads, 63 sectors/track, 8924 Cylinders

Units = cylinders of 16065*512 = 8225280 bytes

Device boot start end blocks ID system

/Dev/sda1 1 4 32098 + de Dell Utility

/Dev/sda2*5 2554 20482875 7 HPFs/NTFS

/Dev/sda3 2555 7904 42973875 83 Linux

/Dev/sda4 7905 8924 Win95 ext 'd (LBA)

/Dev/sda5 7905 8924 8193118 + 82 Linux swap

Disk/dev/SDC: 40.0 GB, 40007761920 bytes

255 heads, 63 sectors/track, 4864 Cylinders

Units = cylinders of 16065*512 = 8225280 bytes

Device boot start end blocks ID system

/Dev/sdc1 1 510 4096543 + 7 HPFs/NTFS

/Dev/sdc2 511 4864 Win95 ext 'd (LBA)

/Dev/sdc5 511 4864 34973473 + B Win95 FAT32

We should be able to find that there is an additional SCSI hard disk/dev/SDC and its two disk partitions/dev/sdc1? /Dev/sdc2, where/dev/sdc5 is the logical partition of the/dev/sdc2 partition. We can use the following command to mount/dev/sdc1 and/dev/sdc5.

# Mkdir-P/mnt/usbhd1

# Mkdir-P/mnt/usbhd2

Note: creating a directory is used as a mount point)

# Mount-t ntfs/dev/sdc1/mnt/usbhd1

# Mount-T vfat/dev/sdc5/mnt/usbhd2

Note:-t ntfs should be used for Disk Partitions In NTFS format.
Parameter. The-T vfat parameter should be used for Disk Partitions In the FAT32 format. If the Chinese character file name is garbled or not displayed, you can use the following command format.

# Mount-t ntfs-O iocharset = cp936/dev/sdc1/mnt/usbhd1

# Mount-T vfat-O iocharset = cp936/dev/sdc5/mnt/usbhd2

In Linux, The fdisk partition command and The mkfs file system creation command can be used to make the partition of the mobile hard disk into the ext2 and ext3 formats specific to the Linux system. In this way, it is more convenient to use in Linux. Use the following command to directly mount the file.

# Mount/dev/sdc1/mnt/usbhd1

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.