Analysis of mounting optical drive in linux

Source: Internet
Author: User
For details about how to mount an optical drive in linux, refer to general Linux technology-Linux technology and application information. I have learned a lot about linux recently. Now I will give you a more detailed and simple answer based on my practices and online articles. I hope you will criticize and correct me.

In linux, the optical drive must be mounted for access. In some linux systems, the optical drive is automatically mounted. For example, if I use red flag 6.0 sp1, some must be manually mounted. For example, I am using red hat enterprise 5.1.

In linux, no physical device is mapped to a file. These files are stored in the/dev file (the directory in linux is also a file, the file mapped to the optical drive is a file named cdrom. The mount command is the basic command for mounting the optical drive, which can be followed by parameters. You must select a mount point before mounting the optical drive. We strongly recommend that you do not mount the file directly under, here I mount the file to/mnt/cdrom. The cdrom is my new file. The entire process is described in detail as follows:

Learning operation process:
[OK _008 @ CentOS4 ~] $ Mount-t auto/dev/cdrom/mnt/cdrom
Mount: only root can do that -- generally, users cannot mount cdrom, and only root users can perform this operation.
[OK _008 @ CentOS4 ~] $

-- Switch user operation:
[Root @ CentOS4/] # mount-t auto/dev/cdrom/mnt/cdrom
Mount: mount point/mnt/cdrom does not exist --/mnt/cdrom directory does not exist. You need to create it first.
[Root @ CentOS4/] # cd/mnt
-Bash: cd:/mnt: No such file or directory
[Root @ CentOS4/] #
[Root @ CentOS4/] # mkdir-p/mnt/cdrom -- create/mnt/cdrom directory
[Root @ CentOS4/] # ls
Bin dev home lib media mnt proc sbin srv tmp var
Boot etc initrd lost + found misc opt root selinux sys usr
[Root @ CentOS4/] # mount-t auto/dev/cdrom/mnt/cdrom -- mount cdrom
Mount: block device/dev/cdrom is write-protected, mounting read-only -- mount successful
[Root @ CentOS4/] # ls-l/mnt/cdrom -- View content in cdrom

Parameters

-V

Show program version
-H

Show auxiliary messages
-V

Displays more information, usually used with-f for debugging.
-
Mount all file systems defined in/etc/fstab.

-F
This command is usually used together with-a, which generates a route for each mount action. You can speed up mounting when the system needs to mount a large number of NFS file systems.

-F
It is usually used for debugging. It will make the mount not execute the actual action, but simulate the entire process of mounting. It is usually used with-v.

-N
Generally, after mount is mounted, a message is written to the/etc/mtab. However, you can use this option to cancel this operation if the file system does not exist.

-S-r
Equal to-o ro

-W
Equal to-o rw

-L
Separate the hard disks with specific tags.

-U
Mount the file system with the file division serial number. -L and-U must exist in the/proc/partition file to make sense.

-T
Specifies the type of the file system, which is usually not required. Mount automatically selects the correct type.

-O async
When the non-synchronous mode is enabled, all file read and write operations are performed in non-synchronous mode.

-O sync
Run the command in synchronization mode.

-O atime
-O noatime
When atime is enabled, the system updates the "Last call time" of the file each time the file is read 』. When we use the flash file system, we may choose to disable this option to reduce the number of writes.

-O auto
-O noauto
Enable/disable automatic mounting mode.

-O defaults
Use the default options rw, suid, dev, exec, auto, nouser, and async.

-O dev
-O nodev-o exec
-O noexec
The execution file can be executed.

-O suid
-O nosuid
The execution file can be executed with the root permission.

-O user
-O nouser
You can perform the mount/umount action.

-O remount
You can use different methods to re-mount an existing file system. For example, a previously read-only system can be re-mounted in the read-write mode.

-O ro
Use the read-only mode.

-O rw
In read/write mode.

-O loop =
Loop mode is used to separate an archive into a hard disk and mount it to the system.


Example

Mount/dev/hda1 under/mnt.

# Mount/dev/hda1/mnt

Mount/dev/hda1 in read-only mode under/mnt.

# Mount-o ro/dev/hda1/mnt

The mounting part of the optical drive is introduced here. I hope you can correct it more accurately.
Related Article

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.