Hard drive and USB flash drive mounted in Linux

Source: Internet
Author: User
Mount-T iso9660/dev/CDROM/mnt/CDROM Optical Drive mounting
Mount-T vfat/dev/fd0/mnt/floppy
Attached to a soft drive ( You can select the file type. )
Mount-T vfat-o rw, utf8, umask = 000/dev/sda1/Media/USB
Linux The Windows The partition Chinese display is abnormal. The Chinese characters in the optical drive cannot be displayed normally. . The solution is as follows:

1Automatic mounting
Modify/Etc/fstabAddIocharset = utf8
Example:

/Dev/sda5/Media/sda5 vfat iocharset = utf8, defaults, umask = 0 0 0
/Dev/hda/Media/cdrom0 UDF, iso9660 user, noauto, iocharset = utf8 0 0
Mine is SATA Hard Disk. /Dev/sda5 Is a partition of the hard disk. /Dev/hda Yes. Where "Umask = 0" Indicates that normal users also have read and write permissions.

2Manual mounting
Add parameters when mounting-O iocharset = utf8
Example:

$ Sudo Mount-O iocharser = utf8/dev/sdb1/Media/USB
Mount Command details

MountCommand details

Function: load the specified file system.
Syntax: Mount [-affhnrvvw] [-L < Tag >] [-O < Option >] [-T < File System Type >] [ Device Name ] [ Load point ]
Usage instructions: Mount You can load the specified file system from a specified device Linux Directory (that is, the mount point ). Write frequently used devices into files
/Etc/fastab,
To enable the system to automatically load each time it starts. Mount The device information is recorded in /Etc/mtab File. Use Umount Command to uninstall the device, the record is cleared.
Common Parameters and options:
-
Load files /Etc/fstab .
-F
Does not actually load the device. And -V And other parameters to view Mount .
-F
And - Parameters are used at the same time. All /Etc/fstab The specified device is loaded at the same time to speed up the execution.
-H
Displays online help information.
-L <
Tag > Load the file system label < Tag > .
-N
Do not record the loading information in /Etc/mtab File.
-O <
Option > Specifies the option for loading the file system. Some options can also be found in /Etc/fstab . These options include:
Async
Execute the input and output operations of the file system in non-synchronous mode.
Atime
Every access is updated. Inode The access time, which is set by default. The cancel option is Noatime .
Auto
Must be in /Etc/fstab File. Run - When the parameter is set Auto To cancel the selection. Noauto .
Ults
Use the default options. The default value is RW , SUID , Dev , Exec , Anto nouser And Async .
Dev
Characters or block devices in a readable file system. The cancel option is Nodev .
Exec
Executable binary file. The cancel option is Noexec .
Noatime
Not updated during each access Inode The access time.
Noauto
Unavailable - Parameters.
Nodev
Do not read characters or block devices on the file system.
Noexec
The binary file cannot be executed.
Nosuid
Close Set-user-identifier ( Set User ID) And Set-group-identifer ( Set Group ID) Set bit.
Nouser
This prevents a user from performing the loading operation. The default setting is used.
Remount
Reload the device. It is usually used to change the configuration status of a device.
Ro
Load data in read-only mode.
RW
Load data in read/write mode.
SUID
Start Set-user-identifier ( Set User ID) And Set-group-identifer ( Set Group ID) Set bit. The cancel option is Nosuid .
Sync
Execute the input and output operations of the file system in synchronous mode.
User
Allows general users to load devices.

-R Load the device in read-only mode.
-T <
File System Type > Specifies the file system type of the device. Common options are described as follows:
Minix Linux
The earliest used file system.
Ext2 Linux
Common file systems.
Msdos MS-DOS
Of Fat .
Vfat win85/98
Of Vfat .
NFS
Network File System.
Iso660 CD-ROM
The standard file system of the CD.
NTFS Windows NT
File System.
HPFs OS/2
File System. Windows NT 3.51 Previous versions of the file system.
Auto
Automatically detects the file system.
-V
Detailed information is displayed during execution.
-V
Displays version information.
-W
The device can be loaded in read/write mode. The default setting is as follows.

simple usage :
FAT32
partition
Mount-O codePage = 936, iocharset = cp936/dev/hda7/mnt/CDROM (Mount-T
vfat-O iocharset = cp936/dev/hda7/mnt/CDROM)
NTFS
partition
Mount-O iocharset = cp936/dev/hda7/mnt/CDROM
ISO
file
Mount-o loop/ABC. ISO/mnt/CDROM
floppy disk
Mount/dev/fd0/mnt/Floppy
USB
flash
Mount/dev/sda1/mnt/CDROM
description :/ MNT/CDROM the directory must exist.

All/Etc/fstabContentMount-

File format can be specified"-TFormat",The format can beVfat, ext2, ext3And so on.

image file:
Mount filename mountpoint-O
loop
, filename is the image file name (*. ISO ,*. IMG) the rest is the same as above. Example: If I have a . ISO Cd image file, Mount
. ISO a-o loop
to enter the directory A you can browse . ISO content, *. IMG file usage is the same.

Display Chinese,If yesFedora Core 1UseUtf8Better
Mount-O iocharset = uft8/dev/hda1/mnt/C
Mount-O iocharset = uft8/dev/sda1/mnt/USB
Mount-T smbfs // ip_addr/share/DIR/mnt/SMB/share-o
Iocharset = uft8, username = Name, password = passwd

Start Mount Upper Windows Partition
Automatically Windows Of D Disk mounted /Mnt/d . VI Open /Etc/fstab , Add the following line
/Dev/hda5/mnt/d vfat defaults, codePage = 936, iocharset = cp936 0 0
Note: you must first create /Mnt/d Directory
Mount
Others on LAN Windows Directory shared by the machine (Bjchenxu)
Mount-T smbfs-O username = guest, password = guest // machine/path/mnt/CDROM

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.