How to attach a mobile hard drive and an optical drive in Linux

Source: Internet
Author: User
Tags dmesg

How to load the mobile hard drive and optical drive in Linux? For more information about loading the mobile hard drive in linux, see the children's shoes ~ 1. Mount the USB file and check the information. Follow these steps. 1. Log in 2. Create a USB disk directory in the/mnt folder to load the mobile hard disk. 3. Check whether the core is loaded with the USB Module for execution # dmesg | grep usb if "usb. c: registered ..... "The information indicates that the module has been loaded; otherwise, run: # modprobe usb-uhci # modprobe usb-storage # dmesg (output a toy) 4. Insert the mobile hard disk and view the loading result: # dmesg | tail can see SCSI device sda: 19640880 512-byte hdwr sectors (10056 MB) sdb: sdb ...... --------------------------------- the command for loading usb is mount/dev/sda1/mnt/usb-o iocharset = cp936, umask = 0000, where mount is the load command, /dev/sda1 is the representation of the usb device in your linux, lin Ux uses files to represent everything, And/mnt/usb is the directory to be loaded, -o iocharset = cp936 is used to display Chinese characters ===========================2. before using the optical drive (1), mount: # mount/dev/cdrom/mnt/cdrom, then you can read the content of the CD in the/mnt/cdrom directory. (2) when you want to exit the CD, you must use the umout command, otherwise, the optical drive remains deadlocked: # umount/mnt/cdrom. Tip: mount: block device/dev/cdrom is write-protected, mounting read-only indicates that the optical drive has been mounted successfully. Only because the disc is a read-only device and cannot be written. =======================================3. to mount a floppy disk to the/mnt/floppy directory, run the following command: # mount/dev/fd0/mnt/floppy to detach a floppy disk: # umount/mnt/floppy ================================== ======= 4. mount external hard disk partition (FAT32 format) also need to use "fdisk-1" to view the external hard disk partition device number, assume it is/dev/hda1. Run the following command to mount the/mnt/vfat mount Directory: # mount-t vfat/dev/hda1/mnt/vfat, by default, Linux only allows the root user to execute the mount command. To enable general users to mount the disk or floppy disk automatically when the system starts, modify the/etc/fstab configuration file and add the following content: LABEL = // ext3 defaults 11/dev/cdrom/mnt/cdrom iSo9660 auto, owner, kudzu, ro, user 00/dev/fdo/mnt/floppy auto, owner, kudzu, ro, and user 00. "user" indicates giving the mount command to the general user. ========================================================== ===== 5. it is too cumbersome to run the mount command every time you access windows partitions at startup. Why not use the mount command to access other linux partitions? In fact, during each boot, linux automatically mounts the linux partition to be mounted. So can we set the partitions we want to mount when linux is started, such as windows partitions, to realize automatic mounting of the file system? This is completely possible. There is a fstab file in the/etc directory, which lists the file systems automatically mounted when linux is started. My/etc/fstab file is as follows:/dev/hda2/ext3 defaults 1 1/dev/hda1/boot ext3 defaults 1 2 none/dev/pts devpts gid = 5, mode = 620 0 0 none/proc defaults 0 0 0 none/dev/shm tmpfs defaults 0 0/dev/hda3 swap defaults 0 0 0/dev/cdrom/mnt/cdrom iso9660 noauto, codepage = 936, iocharset = gb2312 0 0/dev/fd0/mnt/floppy auto noauto, owner, kudzu 0 0/dev/hdb1/mnt/winc vfat defaults, codepage = 936, iocharset = cp936 0 0/dev/hda5/mnt/wind vfat defaults, codepage = 936, iocharset = cp936 0 0 in the/etc/fstab file, the first column is the device name of the mounted file system, the second column is the mount point, the third column is the mounted file system type, and the fourth column is the mount option. The options are separated by commas. The fifth and sixth columns do not know what they mean. They also look at their fingers. In the last two lines, I manually added the C; D Drive in windows, and added the codepage = 936 and iocharset = cp936 parameters to support Chinese file names. The defaults parameter actually contains a set of default parameters: rw mounting suid in read/write mode enable user ID and group ID setting bit dev can interpret characters or block devices on the file system exec can execute binary files auto automatic mounting nouser so that general users cannot mount async if the file system's input and output operations are not synchronized, you can see that in this list, the optical drive and the soft drive are not automatically mounted, and the parameter is set to noauto. (If you want to enable automatic mounting, make sure that you have disks in your drive and drive every time you start the system .)

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.