Reference http://blog.itpub.net/12272958/viewspace-676977/
First, the boot automatically mounts the optical drive
1. By habit, root user, create directory under/media directory Cdrom--mkdir/media/cdrom
2. Modify the/etc/fstab file. At the end of the file, add the following in order:
/dev/cdrom/media/cdrom Auto EXEC 0 0
3. Restart the CentOS system
4. Execute command: Mount-tiso9660/dev/cdrom/media/cdrom complete optical drive mount
Second, the Fstab document contents detailed
Transferred from: http://linux.chinaunix.net/techdoc/system/2007/12/25/975119.shtml
The/etc/fstab is automatically mounted to the Linux file system at boot time.
The data items that are/etc/fstab in Linux are as follows:
/dev/device Mountpoint Type Rules 0 order
For example, this is an ordinary/etc/fstab:
/DEV/HDA2/EXT3 Defaults 0 1
/dev/hda3 swap swap defaults 0 0
/DEV/HDA5/USR ext3 defaults 0 0
/dev/fdo/mnt/flopy ext3 noauto 0 0
/dev/cdrom/mnt/cdrom iso9660 Noauto,ro 0 0
/dev/device is the device that needs to be mounted, and the/hda2 is the second partition of the primary hard disk on the first IDE slot. If the second IDE slot is the third partition of the primary hard drive, it is/DEV/HDC3, which can be viewed under Linux using Fdisk-l.
Mountpoint is the mount point. /,/usr, swap are the default mount points for the partition when the system is installed.
If you're going to mount a new device, you need to think about it, because this new device will be a permanent part of the filesystem, depending on the FSSTND (file system standard), and its role, user needs. For example, if you want to make it a shared resource, it is a good choice to put it under/home.
Type refers to the file system class shape.
Rules are those that are attached to a mount. Here are a few common examples:
Auto-mount Automatic boot
Default sets the mount definition according to the default values of most permanent file systems
Noauto boot does not mount automatically
Nouser only super users can mount
RO mount by read-only permission
RW mount by Read writable permission
User can mount
Please note that the optical drive and floppy drive can only be mounted when the media is installed, so it is Noauto
0 refers to the dump (System Backup utility). This entry is 0, which means that you never back up. If you last backed up with a dump, the number of days since backup is displayed.
Order refers to fsck (the order in which fsck checks at startup). 0 means no checks, and (/) partitions are always
is 1, the other partitions can only start at 2, and when the numbers are the same check (but not 21).
If I want to hook up Windows C on the second IDE slot master hard drive to the file system, the data entry is:
/DEV/HDC1/C VFAT Defaults 0 0
(/C is a pre-established folder, as a mount point for the C drive.) )
Once you have modified the/etc/fstab, you must reboot the system to be effective.
Fstab contains important information about the partition, each of which acts as a partition record, each row can be divided into six parts, the following/dev/hda7/ext2 defaults 1 1 As an example of each description:
1. The first item is the physical location of the storage device you want to mount, such as the HDB or/DEV/HDA7 as in the example above.
2. The second item is where you want to add to the directory location, such as/home or/, as in the example above, which is actually the mount point that was prompted at the time of installation.
3. The third item is the so-called local filesystem, which contains the following formats: ext, ext2, MSDOS, iso9660, NFS, swap, etc., or ext2, as in the example above, can be found in the/prco/filesystems description.
4. The fourth item is the state you want to set when you mount, such as RO (read-only) or defaults (including other parameters such as RW, suid, exec, auto, nouser, async) as in the example above, see "mount nfs".
5. The fifth item is to provide the dump function, whether the flag bit of backup is required when the system dump, the value is 0.
6. The sixth is to set the filesystem whether to do check at boot, except the root filesystem its necessary check is 1, the others are required to set, the default value is 0.
Reproduced CentOS system boot automatically mount CD-ROM and fstab file detailed