Manually Mount other Hard Disk Partitions In UBUNTU

Source: Internet
Author: User

Manually Mount other Hard Disk Partitions In UBUNTU

After UBUNTU is installed, if the computer has other partitions, You need to click the mouse each time to mount them. This is inconvenient. This topic describes how to automatically mount an ECS instance.

Overview

UBUNTU has two Mount methods:
One is the PRE-USER mode, but the Mount partition is a bit late and must be logged on. If you install the database to that partition, an error occurs.
Another method is to mount the system. It is more convenient to mount the system at an early start, that is, the so-called fstab file configuration mode.
This article focuses on the second method. The essence of the second method is to edit the fstab file. Before that, you need to prepare the device name, type, and uuid. The detailed method is as follows:

View the name and type of the system partition.

Sudo fdisk-l
This command mainly remembers the device such as/dev/sdb1 In the result and the type of the last column such as NTFS. It will be used later.

The following figure shows the link type:
W95 FAT32, W95 FAT16-> vfat
NTFS-> ntfs-3g
Apple-hfs-> hfsplus

Query the UUID of a device.

Sudo ls-l/dev/disk/by-uuid/

Lrwxrwxrwx 1 root 10 March 15 08:12 08DE9DD3DE9DBA00->.../sdc1
Lrwxrwxrwx 1 root 10 March 15 08:53 2CF4ED0EF4ECDB5A->.../sdb1
Lrwxrwxrwx 1 root 10 March 15 08:12 5042112042110C7A->.../sdb5

Edit the fstab file

Sudo vi/etc/fstab

The following describes the meanings of several fields in this file.

File system
This is usually written in the/dev/sdb7 format. However, if the order of system device plugging is different, the device name will change and it will be uncomfortable. Therefore, you can use the unique identifier (UUID) of the device to obtain the unique identifier (UUID.

Mount point
Is the directory you mounted, usually/media/jason/disk1 ....

Type
Is the type obtained in the first step above, I am here for the ntfs-3g, if you use this option, you have to install the ntfs-3g package first. Sudo apt-get install ntfs-3g

Options
Specifies the file system options, separated by commas.

The edited image is as follows:
// Program
UUID = 5042112042110C7A/media/jason/program ntfs-3g nls = utf8 0 1

// Personal
UUID = 6AAA07C9AA0790AD/media/jason/personal ntfs-3g nls = utf8 0 1

// Work
UUID = BE96285C96281803/media/jason/work ntfs-39 nls = utf8 0 1

If the computer cannot enter the graphic interface due to improper operations, you can boot to the RECOVERY MODE
Select the root environment, and then run mount-o remount and rw/to modify any files on the disk.

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.