UbuntuLinux8.04 introduction to automatic disk mounting

Source: Internet
Author: User
Article Title: UbuntuLinux8.04 introduction to automatic disk mounting Methods. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

In ubuntu8.04, the disk is not automatically mounted when the instance is started by default. For example, if my machine has an 80 GB hard disk and 10 Gb is used to install ubuntu, the remaining part is used as the Mount disk, which is generally used for backup, distribution Center for downloading files.

After learning the/etc/fstab part again, the system can finally automatically mount the disk when it is started.

Specific Method:

Query disk uuid

Ls-al/dev/disk/by-uuid

Total usage

0drwxr-xr-x 2 root 120.

Drwxr-xr-x 5 root 100 ......

Rwxrwxrwx 1 root 10 2008-05-03 08:02 084C-084D-> ...... /...... /Sda4

Lrwxrwxrwx 1 root 10 2008-05-03 08:02 93b32f8a-9284-455c-9e68-319d38f7970f-> ...... /...... /Sda3

Lrwxrwxrwx 1 root 10 ea5e6210-b4c9-45e5-b6c4-f904156d3954-> ...... /...... /Sda1

Lrwxrwxrwx 1 root 10 ffe6dd79-73c0-4d9f-8b8c-7ec1036ee270-> ...... /...... /Sda2

Basic Principles of mounting:

Mount a device under/dev to/media

Similar to the ln-s command

For example, I/dev has four disks, which are

Sda1 swap

Sda2/home

Sda3/

Sda4 fat32

Then I need

Mount/dev/sda4/media/disk

In this way, the disk is mounted.

But if you want to write this command to/etc/fstab, let the system identify and mount it on its own?

You can add a row.

/Dev/sda4/media/disk vfat user, auto, umask = 002, gid = 1000, utf8 0 0

Among them, vfat refers to fat32 format, utf8 is the encoding format, umask is the specified access permission, and gid is my User ID.

Written in uuid format

UUID = 084C-084D/media/disk vfat user, auto, umask = 002, gid = 1000, utf8 0 0

If the disk is mounted in ntfs format, it should be written as (reference)

UUID = 084C-084D/media/disk ntfs user, nls = utf8, umask = 0222, gid = 1000, auto 0 0

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.