Linux Boot auto Mount partition __linux

Source: Internet
Author: User

There must be a partition in Linux that works, and that is, the swap partition is also needed, but if the physical memory is large enough, the swap partition is not necessary.

Now we're going to boot up the specified partition automatically. How to configure it. Let's take a look at it now.


Type the following command:

Vim/etc/fstab


The last record was added by yourself.   It means to mount the/DEV/SDB1 partition to the/MNT/SDB1 file format for ext3 auto Mount 1 to allow the dump backup program to be backed up. 2 The Sixth column is the fsck disk check setting.
The value is in one order. When its value is 0 o'clock, it is never checked, and/the root directory partition is always 1. Other partitions starting from 2, the smaller the number, check first, if the number of two partitions are the same, check at the same time.



The

First column can be either the actual partition name or the actual partition's volume label (lable).
If the disk is a SATA interface and has more than one disk, each disk is labeled/dev/hda,/dev/hdb,/DEV/HDC, and so on, and each disk's partition is labeled/DEV/HDA1,/dev/hda2, and so on.
If the disk is a SCSI type, multiple disks are labeled/DEV/SDA,/dev/sdb, and so on. Partitioning is the same.
If you use labels to represent, the format is:
1 lable=/
The second column is the mount point. The
mount point must be a directory that already exists, and for compatibility purposes, it is a good idea to set the permission to 777 to open all permissions after creating the destination directory that needs to be mounted.
The third column is the file system type for this partition.
Linux can use types such as ext2, ext3, and this field must be the same type used when the partition is formatted. You can also use the special syntax of auto to enable the system to automatically detect the partition type of the target partition. Auto is typically used for mounting a removable device. The
Fourth column is a mounted option that sets the parameters for the mount. The
common parameters are as follows:
Auto: System mount automatically, fstab default is this option
Defaults:rw, suid, Dev, exec, auto, Nouser, and async.
Noauto boot does not mount automatically
Nouser only Superuser can mount
ro to mount with read-only permissions
RW to mount
user any user can mount
Note that the optical drive and floppy drive can only be mounted when the media is installed, so it is Noauto
The fifth column is the dump backup setting.
When the value is set to 1 o'clock, a dump backup program is allowed, set to 0 o'clock, and the backup operation is ignored;
The sixth column is the fsck disk check setting. The value of the
is in one order. When its value is 0 o'clock, it is never checked, and/the root directory partition is always 1. Other partitions starting from 2, the smaller the number, check first, if the number of two partitions are the same, check at the same time.
The reboot server takes effect when the file is modified and saved.

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.