Mount mount Commands and tips CD-ROM image file, mobile hard disk and USB stick simple description

Source: Internet
Author: User

 Hook up Command (Mount)


Describes the use of the Mount command, as well as tips on how to image files, removable hard disks and USB drives.


One, Mount command (Mount)


How to use the Attach (Mount) command.


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.

Second, attach the disc image file
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 disc image file from CD-ROM. Put the disc in the CD drive and execute the command below.


Action format

Typing command: ======= simulation Environment

#cp/dev/cdrom/home/sunky/mydisk.iso or #dd if=/dev/cdrom of=/home/sunky/mydisk.iso


Description
Perform any of the commands above to make a disc image of the disc in the current CD-ROM:/home/sunky/mydisk.iso.

2. Make the files and directories into a disc image file, execute the following command.


Action format

Typing command: ======= simulation Environment

#mkisofs-R-j-v Mydisk-o/home/sunky/mydisk.iso/home/sunky/mydir


Description
This command will/home/sunky/mydir all directories and files in the directory, made into a disc image file/home/sunky/mydisk.iso, the disc is labeled as: Mydisk.

3. Mounting of the disc image file (Mount)


Action format

Typing command: ======= simulation Environment

#mkdir/mnt/vcdrom


Description: Create a directory to use as a mount point


Action format

Typing command: ======= simulation Environment

#mount-O loop-t iso9660/home/sunky/mydisk.iso/mnt/vcdrom


Description: Use the directory/mnt/vcdrom to access all files in the disk image file Mydisk.iso.

Third, mount the removable hard drive

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.


Action format

Typing command: ======= simulation Environment

[Email protected] ~]# fdisk-ldisk/dev/sda:73 dot 4 GB, 73407820800 bytes255 heads, $ sectors/track, 8924 Cylindersuni ts = Cylinders of 16065 * 8225280 = bytesdevice Boot Start End Blocks Id system/dev/sda1 1 4 32098+ de Dell utility/de V/SDA2 * 5 2554 20482875 7 Hpfs/ntfs/dev/sda3 2555 7904 42973875 linux/dev/sda4 7905 8924 8193150 f Win95 Ext ' d (LBA)/d Ev/sda5 7905 8924 8193118+, Linux swap


From the above information, it is known that the system has a SCSI hard disk/DEV/SDA and its four disk partition/DEV/SDA1-/DEV/SDA4,/DEV/SDA5 is partition/DEV/SDA4 logical 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


Action format

Typing command: ======= simulation Environment

[[email protected] ~]# fdisk -ldisk /dev/sda: 21.5 gb, 21474836480  bytes255 heads, 63 sectors/track, 2610 cylindersunits = cylinders  of 16065 * 512 = 8225280 bytesSector size  (logical/physical):  512 bytes / 512 bytesI/O size  (Minimum/optimal): 512 bytes  / 512 bytesdisk identifier: 0x00050ad5   device boot       Start         End       Blocks   Id  System/dev/sda1   *            1          26       204800   83  linuxpartition 1 does not  end on cylinder boundary./dev/sda2               26         287     2098176    82  linux swap / solarispartition 2 does not end on  cylinder boundary./dev/sda3              287        2611    18667520    83  linux

From the above information, there is a SCSI hard disk/DEV/SDC and its two disk partition/DEV/SDC1?,/DEV/SDC2, where/DEV/SDC5 is the logical partition of the/DEV/SDC2 partition.

You can use the following command to hook up/DEV/SDC1 and/DEV/SDC5.


Action format

Typing command: ======= simulation Environment

#mkdir-P/mnt/usbhd1#mkdir-p/mnt/usbhd2


Description
Create a directory to use as a mount point


Action format

Typing command: ======= simulation Environment

#mount-T Ntfs/dev/sdc1/mnt/usbhd1#mount-t vfat/dev/sdc5/mnt/usbhd2


Description
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:


Action format

Typing command: ======= simulation Environment

#mount-T ntfs-o iocharset=cp936/dev/sdc1/mnt/usbhd1#mount-t vfat-o IOCHARSET=CP936/DEV/SDC5/MNT/USBHD2



Using the Fdisk partition 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 much easier to use it under Linux.


Use the following command to hook up directly:


Action format

Typing command: ======= simulation Environment

#mount/DEV/SDC1/MNT/USBHD1


Four, attach USB flash drive

As with the USB interface of a removable hard disk, the USB stick is also treated as a SCSI device for Linux systems.
Use the same method as moving the hard disk. Before inserting a USB flash drive, you should first use Fdisk–l or more/proc/partitions to view the system's hard disk and hard disk partition.


Action format

Typing command: ======= simulation Environment

[[email protected] ~]# fdisk -ldisk /dev/sda: 21.5 gb, 21474836480  bytes255 heads, 63 sectors/track, 2610 cylindersunits = cylinders  of 16065 * 512 = 8225280 bytesSector size  (logical/physical):  512 bytes / 512 bytesI/O size  (Minimum/optimal): 512 bytes  / 512 bytesdisk identifier: 0x00050ad5   device boot       Start         End       Blocks   Id  System/dev/sda1   *            1          26       204800   83  linuxpartition 1 does not  end on cylinder boundary./dev/sda2               26         287     2098176    82  linux swap / solarispartition 2 does not end on  cylinder boundary./dev/sda3              287        2611    18667520    83  linux

After inserting the USB drive, use Fdisk–l or more/proc/partitions to view the system's hard disk and hard disk partition. The following is not a demonstration

[roo[email protected] ~]# fdisk -ldisk /dev/sda: 21.5 gb, 21474836480  bytes255 heads, 63 sectors/track, 2610 cylindersunits = cylinders  of 16065 * 512 = 8225280 bytesSector size  (logical/physical):  512 bytes / 512 bytesI/O size  (Minimum/optimal): 512 bytes  / 512 bytesdisk identifier: 0x00050ad5   device boot       Start         End       Blocks   Id  System/dev/sda1   *            1          26       204800   83  linuxpartition 1 does not  end on cylinder boundary./dev/sda2               26         287     2098176    82  linux swap / solarispartition 2 does not end  on cylinder boundary./dev/sda3              287        2611    18667520    83  linux

The system has a SCSI hard disk/DEV/SDD and a disk partition/dev/sdd1.

/DEV/SDD1 is the USB drive we are going to hook up with, mount it with the following command:


Action format

Typing command: ======= simulation Environment

#mkdir-P/MNT/USB


Note: Create a directory to use as a mount point


Action format

Typing command: ======= simulation Environment

#mount-T Vfat/dev/sdd1/mnt/usb


Description: You can now access the USB flash drive through/MNT/USB, if the Chinese character file name is displayed as garbled or not displayed, please use the following command to access:


Action format

Typing command: ======= simulation Environment

#mount-T Vfat-o iocharset=cp936/dev/sdd1/mnt/usb


Here, the use of Mount command mount in Linux is introduced, it is recommended that friends do more hands-on, their own practice under the above example, to help understand the content.


This article is from the "I am a Little bird" blog, please make sure to keep this source http://liyanchao.blog.51cto.com/9954601/1659893

Mount mount Commands and tips CD-ROM image file, mobile hard disk and USB stick simple description

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.