Linux mount (Mount) disc image file, removable hard disk

Source: Internet
Author: User

Hook up Command (Mount)

Command format:

Mount [-t vfstype] [-O options] Device dir
which
1.-t vfstype Specifies the type of file system that is not normally specified. Mount will automatically select the correct type. Common types are:
Disc or disc Image: iso9660
DOS FAT16 file system: MSDOS
Windows 9x FAT32 file system: VFAT
Windows NT NTFS file system: NTFS
Mount Windows file network share: SMBFS
UNIX (LINUX) file network share: NFS
The 2.-o options are primarily used to describe the way devices or files are hooked up. The commonly used parameters are:
Loop: Used to attach a file as a hard disk partition on the system
RO: Hook device with read-only method
RW: Mount device with read-write mode
Iocharset: Specifies the character set used to access the file system
3.device the device to mount (Mount).
Mount point of the 4.dir device on the system.
Mount Disc image File

Under Windows Many people are accustomed to using software and materials as disc image files through a virtual optical drive. It is easier to make and use disc mirroring under a Linux system than a Windows system, without having to borrow any third-party packages.
1. Make a disc image from the disc. Put the disc in the CD drive and execute the command below.
#cp/dev/cdrom/home/sunky/mydisk.iso or
#dd if=/dev/cdrom f=/home/sunky/mydisk.iso
Note: Any of the above commands can be used to make CD-ROM images in the current CD-ROM image file/home/sunky/mydisk.iso
2, make the files and directories into a disc image file, execute the following command.
#mkisofs-R-j-v mydisk-o/home/sunky/mydisk.iso/home/sunky/mydir
Note: This command will/home/sunky/ All directories and files in the Mydir directory are made into a disc image file/home/sunky/mydisk.iso, the disc is labeled: Mydisk
3, Mount of the disc image file (mount)
#mkdir/mnt/vcdrom
Note: Create a directory to use as mount point
#mount-o loop-t iso9660/home/sunky/mydisk.iso/mnt/vcdrom
Note: Use/mnt/ Vcdrom can access all the files in the disk image file Mydisk.iso.
hooking up a removable hard disk

For Linux systems, the USB interface's removable hard disk is treated as a SCSI device. Before inserting a removable hard disk, you should first use Fdisk–l or more/proc/partitions to view the system's hard disk and hard disk partition.
[Root at Pldyrouter/]# fdisk-l
Here you can see clearly 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/DEV/SDA4 partition. After the removable hard drive, then use Fdisk–l or more/proc/partitions to view the system's hard disk and hard disk partition situation
[Root at Pldyrouter/]# fdisk-l
You should be able to find a 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 hook up/DEV/SDC1 and/DEV/SDC5.
#mkdir-P/MNT/USBHD1
#mkdir-P/MNT/USBHD2
Note: Create a directory to use as a mount point
#mount-T NTFS/DEV/SDC1/MNT/USBHD1
#mount-T VFAT/DEV/SDC5/MNT/USBHD2
Note: For NTFS-formatted disk partitions, you should use the-T NTFS parameter, and the-T VFAT parameter should be used for disk partitions in FAT32 format. If the kanji file name is displayed as 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
Using the Fdisk partitioning command and the Mkfs file system creation command under the Linux system, the partition of the removable hard disk can be made into the ext2, ext3 format peculiar to the Linux system. This makes it easier to use under Linux. Use the following command to hook up directly.
#mount/DEV/SDC1/MNT/USBHD1

Linux mount (Mount) disc image file, removable hard disk

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.