Set up auto mount HDD (GO) under Ubuntu

Source: Internet
Author: User

Original: http://feierky.iteye.com/blog/1998602

In Linux, we often use the Mount command to mount a hard disk partition or CD-ROM to the file system. The/etc/fstab is automatically mounted to the Linux file system at boot time.

If the computer is equipped with a new disk, has been partitioned, formatted, mounted, and then we want the computer to automatically mount when booting, by modifying the/etc/fstab table, adding new

All partition records for the disk. Then, after configuring, save, and execute mount-a to verify that the configuration is correct, parameter-a refers to the data/etc/fstab by the configuration file to

Mount the attached disk.

The data items that are/etc/fstab in Linux are as follows:

/dev/device mountpoint Type rules dump order

Device name mount point partition type Mount option dump option fsck option

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/sda1/home EXT4 Defaults 0 0

(1) Device name
/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.

(2) Mount point
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.

(3) Type of partition
Type refers to the file system types, which are listed below for several common:

Linux file Systems:ext2, ext3, JFS, ReiserFS, Reiser4, XFS, swap.
Windows:
VFAT = fat, Fat 16
ntfs= NTFS
Note:for NTFS RW ntfs-3g
cd/dvd/iso:iso9660
Network File Systems:
Nfs:server:/shared_directory/mnt/nfs NFS <options> 0 0
SMB://win_box/shared_folder/mnt/samba smbfs rw,credentials=/home/user_name/winbox-credentials.txt 0 0
Auto:the file system type (ext3, iso9660, etc) it detected automatically. Usually works. Used for removable devices (CD/DVD, floppy drives, or Usb/flash drives) as the file system may vary on thesedevices.

(4) Mount option
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

(5) Dump option
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.

(6) fsck option
Order refers to fsck (the order in which fsck checks at startup) and is typically set to 0. 0 means no check, the (/) partition is always 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.) )


Set up auto mount HDD (GO) under Ubuntu

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.