In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In this issue, the editor will bring you about how to use the mount command to mount CDROM in CentOS. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.
Use the mount command to mount the CentOS CDROM mount.
Command: mount-t auto / dev/cdrom / mnt/cdrom this command is to mount the CentOS CDROM in the / mnt/cdrom directory, where I can access the contents. Learn the operation process: [OK_008@CentOS4] $mount-t auto / dev/cdrom / mnt/cdrommount: only root can do that-- ordinary users cannot mount cdrom, only root users can operate it. [OK_008@CentOS4 ~] $--switch user actions: [root@CentOS4 /] # mount-t auto / dev/cdrom / mnt/cdrommount: mount point / mnt/cdrom does not exist-- / mnt/cdrom directory does not exist and needs to be created 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 /] # lsbin dev home lib media mnt proc sbin srv tmp varboot etc initrd lost+found misc opt root selinux sys usr
[root@CentOS4 /] # mount-t auto / dev/cdrom / mnt/cdrom-Mount CentOS CDROM mount mount: block device / dev/cdrom is write-protected, mounting read-only-mount successfully.
[root@CentOS4 /] # ls-l / mnt/cdrom-- View the contents of CentOS CDROM mount total 859
Dr-xr-xr-x 4 root root 2048 Sep 4 2005 CentOS
2 root root 8859 Mar 19 2005 centosdocs-man.css
-Rmuri-9 root root 18009 Mar 1 2005 GPL
Dr-xr-xr-x 2 root root 241664 May 7 02:32 headers
Dr-xr-xr-x 4 root root 2048 May 7 02:23 images
Dr-xr-xr-x 2 root root 4096 May 7 02:23 isolinux
Dr-xr-xr-x 2 root root 18432 May 2 18:50 NOTES
2 root root 5443 May 7 01:49 RELEASE-NOTES-en.html
Dr-xr-xr-x 2 root root 2048 May 7 02:34 repodata
-Rmuri-9 root root 1795 Mar 1 2005 RPM-GPG-KEY
2 root root 1795 Mar 1 2005 RPM-GPG-KEY-centos4
1 root root 571730 May 7 01:39 yumgroups.xml
[root@CentOS4 /] # [root@CentOS4 /] # umount / mnt/cdrom-Unmount CentOS CDROM. It's easy to use umount / mnt/cdrom directly. For the description of other parameters of the mount command, please refer to the following: name: mount permission: system administrator or user allowed in / etc/fstab: mount [- hV] mount-a [- fFnrsvw] [- t vfstype] mount [- fnrsvw] [- o options [,...]] Device | dir mount [- fnrsvw] [- t vfstype] [- o options] device dir
Description: interpret the contents of a file as a file system, and then hang it on a location in the directory. When this command is successfully executed, all files under this command will not be available for the time being until we remove the file system using umnount. This command can be used to mount any file system, and you can even use the-o loop option to mount a general file as if it were a hard drive. This feature is very useful for interpreting ramdisk,romdisk or ISO 9660 video files.
Parameters.
The version of the-V display program-h displays auxiliary messages-v displays more messages and is usually used for debugging with-f. -a Mount all file systems defined in / etc/fstab. The command-F is usually used with-a, which generates a stroke for each mount action to be executed. When the system needs to hang a large number of NFS file system, you can speed up the action of hanging. -f is usually used for debugging purposes. It causes mount not to perform the actual mount action, but to simulate the entire mount process. Usually used with-v. -n generally speaking, mount will write a piece of data in / etc/mtab after hanging up. However, you can use this option to cancel this action if there is no writable file system in the system.
-Smurr equals-o ro-w equals-o rw-L to hang a hard disk partition with a specific label. -U hangs up the file system with the file division serial number. -L and-U only make sense when files such as / proc/partition exist. -t specifies the type of file system, which is usually not required. Mount automatically selects the correct type. -o async turns on asynchronous mode, and all file read and write actions are performed in asynchronous mode. -o sync executes in synchronous mode. -oatime-o noatime when atime is opened, the last call time of the archive is updated each time the archive is read.
When we use the flash file system, we may choose to turn this option off to reduce the number of writes.
-oauto-o noauto turns auto-hang mode on / off. -o defaults uses the default options rw, suid, dev, exec, auto, nouser, and async.
-odev-o nodev-o exec-o noexec allows executable files to be executed.
-osuid-o nosuid allows execution files to be executed under root permissions.
-ouser-o nouser users can perform mount/umount actions.
-o remount remounts a suspended file system in a different way. For example, a system that used to be read-only is now re-hung in read-write mode.
-o ro hangs in read-only mode.
-o rw hangs in read / write mode.
-o loop= uses loop mode to attach a file to the system as if it were a hard disk partition.
The example hangs / dev/hda1 under / mnt. # mount / dev/hda1 / mnt hangs / dev/hda1 under / mnt in read-only mode. # mount-o ro / dev/hda1 / mnt hangs the image file of / tmp/image.iso under / mnt/cdrom using loop mode. In this way, the contents of Linux ISO files that can be found on the network can be viewed without burning them into CDs. # mount-o loop / tmp/image.iso / mnt/cdrom related command umount.
The above is how to use the mount command to mount CDROM in the CentOS shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.