Linux system disk Mount information file

Source: Internet
Author: User

Set File system mount information (Etc/fstab) so that the boot can automatically mount the disk partition

File System mount


Method One: Directly hanging in, temporary effect

# format System (no file system without formatting, no data)    DD If=/dev/zero of=/dev/sdb1 bs=4096 count=10   --Create a virtual block device-file system    MKFS.EXT4/ DEV/SDB1    --format    mount-t ext4-o loop,noexec,noatime/dev/sdb1/mnt    --Mount    df-h  View Portal

Method Two: Edit configuration, Permanent effect

# 2-1-1  Edit configuration file
    Vim/etc/fstab      # Assume the following configuration:
Dev/mapper/volgroup-lv_root     /   ext4 (EXT2,PROC,XFS,TMPFS, etc.)   defaults   1           1 first column: device/information to be hung (UUID, Label disk partition) The second column: The point at which the disk is to be hung the third column: The file system to which to mount the fourth column: Mount option (read-only, write-only, etc.) column fifth: whether to back up (0 not backup, 1 backup) column sixth: If the system fails scan recovery, set parameter 1, no set 0              
# 2-1-2 Reload     mount-a# 2-1-3 df-h  View Portal

Method Three: Write the self-boot file, permanent effect

# Edit the profile file to start the disk    vim/etc/rc.local
        Mount-t ext4-o loop,noexec,noatime/dev/sdb1/mnt    # Write Mount

System Mounting considerations

Note The fstab file configuration error will cause the file system to not come up and can be rescued as follows
0 Modify/etc/fstab, but the files are read-only and need to be changed
Mount-o Rw,remount/
1 boot will not start after the prompt, enter the password, repair
2 Rescue Mode: Rescue


"More References"
Linux DD Command detailed https://www.cnblogs.com/ftl1012/p/9248611.
Linux DF Command Detailed https://www.cnblogs.com/ftl1012/p/9248233.html
Linux fdisk command Detailed https://www.cnblogs.com/ftl1012/p/9248663.html
Linux fdisk command Detailed https://www.cnblogs.com/ftl1012/p/9248126.html

Linux system disk Mount information file

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.