With the emergence of many operating systems, people's choices are also increasing. Nowadays, many enterprise computer systems are a hybrid system consisting of UNIX, Linux, and Windows systems. Data Exchange is often required between different systems. The problem also arises. Next we will discuss how to mount a mobile hard disk on a Linux system.
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 system's hard disk and hard disk partition.
- [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 8193150 f 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 8193150 f 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 34973505 f 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: The-t ntfs parameter should be used for Disk Partitions In ntfs format, and the-t vfat parameter should be used for disk partitions in 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
We hope that you will learn how to mount a mobile hard disk in Linux.
- Analysis on Suse Linux under vm
- Preschool guidance: SUSE Linux
- Abbreviations in SUSE Linux
- Operation Manual: Install the RDAC driver in SUSE
- Your Chameleon: Open Suse