Linux Mount File System Overview-reprint

Source: Internet
Author: User
NTFS partitions are supported.
To enable Linux to support the NTFS format, you can compile the kernel, but the simplest method is to install the RPM package that supports NTFS.
Enter uname-A in the terminal to view the kernel version.
Code for logging:
Rpm-IVH kernel-ntfs-2.4.20-8.i686.rpm

Mount Windows partitions
In the LINUX partition representation, the hard disk is HD, the first hard disk is hda, and the second is HDB. A hard disk can be divided into up to four primary partitions, namely, the DOS primary partition, the DOS extended partition, the Linux Root partition and the Linux swap partition both belong to the primary partition, and the four primary partitions are represented by numbers respectively, for the first hard disk, hda1, hda2, hda3, and hda4. the extended partitions can also be divided into logical partitions, with labels arranged in sequence from 5. in Windows, drive C is the primary DOS partition, which is hda1. Drive D is generally the first logical partition on the extended DOS partition, which is hda5, drive E is hda6, and F is hda7. in Linux, you can use the mount command to mount Windows partitions to a folder (this folder is called a mount point), and then you can access windows partitions through this folder, just like a shortcut. for example, attach a C Disk
Create a new winc directory in the/mnt/directory first
Enter the code on the terminal:
Mount-T vfat/dev/hda1/mnt/winc-O codePage = 936 iocharset = 936
(-T indicates the file system of the specified device. vfat indicates the fat16 and FAT32 File System formats of windows.-O indicates the option when the file system is loaded, the option codePage = 936 iocharset = 936 is to enable Linux to display the Chinese characters in the Mount partition normally.) If you want to automatically load the Windows partition at startup, you can modify the fstab file under/etc, the format is code:
/Dev/hda1/mnt/winc vfat defaults, codePage = 936, iocharset = cp936
Save and restart.
My fstab content is as follows:
Code:
Label = // ext3 defaults 1 1
None/dev/PTS devpts gid = 5, mode = 620 0 0
None/proc defaults 0 0
None/dev/SHM tmpfs defaults 0 0
/Dev/hdb2 swap defaults 0 0
/Dev/CDROM/mnt/cdrom udf, iso9660 noauto, owner, kudzu, RO 0 0
/Dev/fd0/mnt/Floppy auto noauto, owner, kudzu 0 0
/Dev/sda1/mnt/USB vfat noauto 0 0
/Dev/hda1/mnt/winc NTFS defaults 0 0
/Dev/hda5/mnt/wind vfat defaults, codePage = 936, iocharset = cp936 0 0
/Dev/hda6/mnt/wine vfat defaults, codePage = 936, iocharset = cp936 0 0
/Dev/hda7/mnt/winf NTFS defaults 0 0

The content in fstab is divided into six fields using space as the separator. The following two numbers are the 5th and 6th fields. The 5th section indicates whether the file system needs to be backed up or dumped. If it is 0, indicates that backup is not required. 1 indicates backup once a day, 2 indicates backup once every two days, and so on ~, The 6th field is used for fsck to verify the file system's completeness. 0 indicates that fsck is not used during system restart. The number table here shows the priority level for the detection ~, The smaller the number, the higher the level ~
The defaults parameter actually contains a set of default parameters:
RW mounting in read/write mode
Enable User ID and group ID settings for SUID
Dev can interpret characters or block devices on the file system
Exec executable binary file
Auto auto mount
Nouser makes the general user unable to mount
Async executes the input and output operations of the file system in non-synchronous Mode

In addition, you can use the Mount-T iso9660-o loop name. ISO mount point to directly use the ISO file, and 8 needs to use a virtual optical drive like windows.

Mount a USB flash drive
In Linux, the USB flash disk is used as a SCSI device. before mounting the USB flash disk, confirm the name of the USB flash disk device and enter dmesg on the terminal. | more view, my ID is sda1.
Create mount point/mnt/USB
Then use the code:
Mount-T vfat/dev/sda1/mnt/USB
Mount the file, or add the code to fstab:
/Dev/sda1/mnt/USB vfat defaults 0 0
Automatic mounting at startup, but the defaults parameter is used. If the USB flash disk is not inserted at startup, an error is reported.
Therefore, add/dev/sda1/mnt/USB vfat noauto 0 0 to fstab, create a connection to the hard disk device on the desktop, and select a device on the device tab of The Link property.

Semi-automated mounting for/dev/sda1 (/mnt/USB). You only need to click this link to use a USB flash drive.

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.