Mount

xiaoxiao2021-03-06  74

I. Loading (a) Preparing knowledge In the Linux system, you want to use the floppy drive, first load them into the system, the format of the load command MOUNT is as follows: mount -t file system Type Device File Name Loading Directory 1. The file system type file system type is generally partition format, depending on the operating system. The file system type supported by Linux system is selected as shown in Table 1: 2. The device file name is in the Linux system, the naming of each drive device and the rules in Windows (such as A:, C:, etc.) have great differences. All system hardware devices can find the corresponding device file name in the / dev directory. For example, / dev / mouse is used to represent the mouse in the system. The list of devices file names corresponding to each different partition of the disk drive is shown in Table 2: Assuming that the first IDE hard drive is divided into several partitions, usually, the first partition can affirm its device file name / dev / hda1, but other The device file name of the partition is not possible in order (especially when the user uses disk partition tools such as PTM). If you want to know the device file name corresponding to the partition of the hard disk, you can perform CFDisk instructions under the console, and the device file name corresponding to each partition can be aerated. 3. Loading catalogs typically create a directory in the / mnt directory below for a disk drive that you need to load, but this does not mean that they cannot be mounted in other directory that is not used. Furthermore, the so-called loading directory is not copied to the local to the local, but only provides a load point locally to contact other disk drives that require loading. The Linux system is sensitive to the case of characters, but it is not the case in Windows. And when you load a drive in a Windows system, the size of the character is not sensitive to the file operation, which means that the user cannot establish such a directory in the same directory of the loaded Windows drive. File: abc.txt and abc.txt, because in the Windows system, they represent the same file. (2) Loading Example 1. The loading flopp is first created a directory FLOPPY for the soft disk in the / mnt directory (sometimes the Linux system has made this step when installing): MKDIR / MNT / FLOPPY then loads the content in the floppy on this directory with the loading instruction Medium: Mount -t MSDoS / DEV / FD0 / MNT / FLOPPY You can completely access the content in the floppy on / mnt / floppy. Of course, you can also use vfat file system type instead of MSDOS so that you can access the long file name on the floppy disk, or replace it with EXT2 to enable you to access the floppy file in the Linux file format.

2. Loading FAT 32 Format Create in / mnt directory Create a directory WINC (WinC, and other loading directories are the author's assumption, you can name these directories with other legal characters you like): MKDIR / MNT / WINC Mount the C disk content into this directory with the loading instruction: mount -t vfat / dev / hda1 / mnt / winc 3. Load CDs Create a directory CDROM in / mnt directory (some Linux system is installed for you): mkdir / mnt / cdrom If your CD drive is installed on the Primary Slave, the device The file name is / dev / hdb; if installed on the Secondary Master, the device file name is / dev / hdc. Suppose your CD drive is hung in Secondary Master, use the following loading instruction: mount -t iso9600 / dev / hdc / mnt / cdrom Due to the different Linux version, you use such instructions to load the disc: MOUNT / dev / cdrom or mount / mnt / cdrom 2, uninstall (Umount) If you have already loaded the floppy disk into the corresponding directory, don't take them directly from the floppy drive, otherwise it may result in loss of information; the discharged disc The drive is even more invalid on the pop bore on the panel to prevent you from taking out directly. Before you take out them, you must first determine that there is no user access to them, including the directory where the disk drive is loaded in the disk drive. The format of the unloading instruction is as follows: Umount Uninstall Directory Name, such as the user wants to uninstall the floppy disk, can be used as the following instruction: umount / mnt / floppy 3, advanced use (1) Adding a simple form user can be in the system configuration file / Specify some commonly used drives to load them in ETC / FSTAB to load them with a more concise instruction. The following is given an example of the C-Dip Profile of the Windows System: Use the file editing tool Vi (you can also use you Familiar file editing tools) Open / etc / fstab, we will see that the system has specified the file system type and device file name and load directory (possibly because Linux used) for the root directory "/", soft disk drive, optical drive, etc. (possibly because Linux used) Different versions, the specified drive will be inserted, but the user can refer to the following example to make changes). You can change their preset values ​​or add new drives therein. Move the cursor to the last line with an arrow, add the following line: / dev / hda1 / mnt / Winc vfault DEFAULTS 0 0 If you still want to load other partitions in your hard disk, you can join. Save the file and exit after completing. Don't forget the corresponding creation of directory / MNT / Winc. After that, you can load the C drive of the Windows system with the following instructions: Mount / MNT / Winc (2) Automatically load disk drive Users can wish that the system can be used in the disk drive (such as Windows in the hard disk) when the system is started. Partition or disc drive) is automatically loaded to reduce the trouble of loading manually after each startup.

You can use the following methods to automatically load the function: open / etc / fstab with the file editing tool, change the defaults in the line we joined to Auto, such as: / dev / hda1 / mnt / winc vfat auto 0 0 Others want to load the disk drive when starting, can change Defaults to Auto. It should be noted that such changes are required for Linux partitions (including EXT2 and SWAP) on the hard disk. After restarting the system, in the / mnt / winc directory, you can see that the system is loaded with a good Windows system at startup. 4. Using mtools in Linux wants to share the Windows system resources, in addition to the load (Mount) commands described above, there is a set of packages named MTools to implement this feature. Like most utility, the MTools package is also the default installation kit for Linux system. You can download to its latest version mtools-3.9.7.tar.gz at http://mtools.ltnb.lu/. (1) MTools commands for users who are familiar with DOS commands, the mtools command will make them feel like returning to the DOS. In the table below, we can see how similar it is: Obviously, the mtools command is simply plus a M prefix before the DOS command, the function is still the same as in DOS. It is important to note that changing the directory path can have both CD and ChDIR in the DOS command, but only MCD is formatted in mtools. Similar to the corresponding commands in Mtools include MKDIR, RMDIR, RENAME, and more. (2) Configuration of mtools.conf documents Because MTools is a software package for simulation dos commands, it also saves the disk drive concept under the DOS system. MTools can not only achieve the concept of A disk, B disk, and C drive, but also more specialized commands (Mzip) for some special drives such as ZIP drives to make users easily operate. In the default environment, the A disk and the B trays correspond to two floppy drives (if any), n, respectively, corresponding to the mirror file of the DOSMU boot disk. We can change the default configuration by modifying the /etc/mtools.conf document, of course, before making modifications, you still have to have a considerable understanding of the device file name under Linux (please refer to the previous phase of this version of the device and The introduction of its file name). Suppose your machine has a 1.44MB floppy drive (A), the hard disk is hung in the main location of the first IDE interface, and the Windows operating system is installed in the first partition (C drive), the optical drive is hung in the second IDE interface At the main location (D disk), as well as the SCSI disk, etc., you can simply configure the mtools.conf Document as follows: mtools.conf drive a: file = "/ dev / fd0" Exclusive 1.44M Drive C: file = "/ dev / hda1 "drive d: file =" / dev / hdc "drive x: file =" / dev / rdsk / c0t5d0s2 "partition = 4 SCSI = 1 nodelay (3) Mtools command system and DOS have a lot of similarity Where, if you can add different parameters to implement more features after the command (the method of using the parameter of the mTools command is added later "-

", you can imagine" - "instead of" / ") used by the DOS command, can you use wildcard"? "And" * ". More convenient, using MTools does not need to be loaded in advance ( Mount) and afterwards (Umount). Below we use the directory list command MDIR as a description (want to know the usage format of other commands and more available parameters can be used to view the associated help system with the man command). Mdir's function is to DOS The directory and the documentation list. The command format is as follows: mdir [- /] [-f] [-w] [-a] [-x] msdosfile [msdosfile] The function of each command parameter is described below: /: Output All directories and documents under the current path are equivalent to the "S" parameter in the DOS command DIR; F: When the list does not attempt to calculate the free space of the current partition, for the big hard disk, do so can save some read and scan partitions Table (FAT) time; W: list display multiple directory documents in a row, this output format does not display the size of the document and creation time, equivalent to the "W" parameter in the DOS command DIR; A: list Hidden Directory Documents; X: Profile list, listing the path name without listing other additional information. Some specific application instances: 1. List A list (excluding hidden directory documents) MDIR - / A: 2. List C: Directory Document with "ABC" in the list C: / Windows / * ABC * or MDIR C: / Windows / * ABC * Note: In the mtools command, / and / can be mixed Also because the list is the document under the DOS system, the case is not sensitive to case, so "ABC" and "ABC" are equivalent. And the usage and DOS commands of the wildcard "*" are also different. Documents that share the Linux system in the Windows system, no matter the masters that have just been in contact with Linux, I am afraid I want to call the Linux system in the Windows system. This can be used to watch Linux partitions under the Windows system. Small software (such as fsdext2, etc.) Recommend two small software that can achieve this function here. (1) Linuxindos Linuxindos is a small program that is less than 500kb, and the version of the author is a Demo version of Beta 0.9, Users can download trials at http://best.163.com/~linux/soft/. The program can run under the Windows system without installation, and the use is very simple. Will be under Windows Linuxindos.zip decompresses to the hard disk directory, the user will see a executable program with a penguin icon LID95Demo.exe. After the program is started, a very simple window will appear. After the user selects a disk drive containing the Linux system document, all documents in the Linux partition will appear, and the left window is listed is the directory in the Linux partition, and The right window lists the documentation in the directory, which feels like the Windows resource manager. (2) Explore2FS This is a more small free software, the size is about 308KB, and the user can also be downloaded in http://best.163.com/~linux/soft/.

转载请注明原文地址:https://www.9cbs.com/read-105121.html

New Post(0)