Ubuntu automatically mounts all hard disk partitions at startup

Source: Internet
Author: User
1. for mounting and access to NTFS partitions under Ubuntu, follow these steps: sudoapt-getinstallntfs-configntfs-3g // Ubuntu8.04 has automatically installed the ntfs-3g and then in the "application"-& gt; "System Tools"-& gt; "NTFS write support configuration program" and then select "enable internal device write support" and "enable external device write support, the NTFS partition can be automatically mounted after restart; 2. About Fat

1. for mounting and accessing NTFS partitions in Ubuntu, follow these steps:
Sudo apt-get install ntfs-config ntfs-3g // Ubuntu 8.04 has a ntfs-3g installed automatically
Choose "application"> "System Tools"> "NTFS write support configuration program" and select "enable internal device write support" and "enable external device write support "., after restart, the NTFS partition can be automatically mounted;
2. perform the following operations on partitions in Fat32 format:
Explanation: Ubuntu 8.04 does not know why it is necessary to mount all disks in the fat32 format into the CD-rom format. In this way, you cannot mount them when you start the system;
If you encounter such problems, the following methods can solve the problem:
Sudo gedit/etc/fstab
Delete the original VFat partition confidence. I deleted the original WINXP, DATA, and BACKUP partitions and then re-mounted them;

Mount method:
Obtain the uuid of each partition.
Ls-all/edv/disk/by-uuid // display partition information. You can view the uuid of each partition.
The uuid of each partition is shown as follows:
Haria @ haria-desktop :~ $ Ls-all/dev/disk/by-uuid
Total usage 0
Drwxr-xr-x 2 root 220.
Drwxr-xr-x 6 root 120 ..
Lrwxrwxrwx 1 root 11 2008-06-14 00:09 7071-54AF->.../sda11
Lrwxrwxrwx 1 root 10 2008-06-14 00:09 71f3d39e-d91f-4145-b10b-c343d86b8889->.../sda7
Lrwxrwxrwx 1 root 10 2008-06-14 00:09 B29CAA719CAA3031->.../sda2
Lrwxrwxrwx 1 root 10 2008-06-14 00:09 bc1577a3-b00b-4a20-961d-967e99c36d06->.../sda8
Lrwxrwxrwx 1 root 10 2008-06-14 00:09 c216c3d4-866a-4d74-a220-dada06fe71c0->.../sda6
Lrwxrwxrwx 1 root 10 2008-06-14 00:09 c5f059d2-6e12-4eee-b0c1-91ad0ee81dca->.../sda9
Lrwxrwxrwx 1 root 11 2008-06-14 00:09 cac236fe-3474-4842-ac87-fb86dc212e6d->.../sda12
Lrwxrwxrwx 1 root 10 2008-06-14 00:09 ce9ff147-6129-4b29-bf57-2648c58bdddf->.../sda5
Lrwxrwxrwx 1 root 11 2008-06-14 00:09 FC3D-FA37->.../sda10

Method:
First, create the folder to which your partition will be mounted:
Sudo mkdir/media/WINXP
Sudo mkdir/media/DATA
Sudo mkdir/media/BACKUP
Next, you can write the content in fstab according to the UUID to automatically mount the hard disk partition at startup:
Explanation:
Sudo gedit/etc/fstab // edit the fstab command
# Entry for/dev/sdan // n: Save Your partition number, which is a comment
UUID = "UUID of your partition"
/Media/WINXP "this is the destination address for mounting", vfat refers to fat32 format, utf8 is the encoding format, umask is the specified access permission, gid is the user ID. You do not need to paste it directly from here;
After the editing is complete, it should be automatically mounted next time it is started.

After editing the partition, the content is as follows:
#/Etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
#

Proc/proc defaults 0 0
# Entry for/dev/sda12:
UUID = cac236fe-3474-4842-ac87-fb86dc212e6d/xfs relatime 0 1
# Entry for/dev/sda6:
UUID = c216c3d4-866a-4d74-a220-dada06fe71c0/boot ext2 relatime 0 2
# Entry for/dev/sda7:
UUID = 71f3d39e-d91f-4145-b10b-c343d86b8889/home xfs relatime 0 2
# Entry for/dev/sda9:
UUID = c5f059d2-6e12-4eee-b0c1-91ad0ee81dca/home/Data ext3 relatime 0 2
# Entry for/dev/sda8:
UUID = bc1577a3-b00b-4a20-961d-967e99c36d06/usr ext3 relatime 0 2
# Entry for/dev/sda5:
UUID = ce9ff147-6129-4b29-bf57-2648c58bdddf none swap sw 0 0
/Dev/cd0/media/cdrom1 udf, iso9660 user, noauto, exec, utf8 0 0 // these systems can be automatically mounted, and you need to add and modify them later.
/Dev/sda2/media/WINXP ntfs-3g ults, locale = zh_CN.UTF-8 0 0 // This is the Mount entry for the NTFS partition, which is automatically generated after NTFS-config is installed
UUID = FC3D-FA37/media/DATA vfat user, auto, umask = 002, gid = 1000, utf8 0 0 // these two items need to be manually added
UUID = 7071-54AF/media/BACKUP vfat user, auto, umask = 002, gid = 1000, utf8 0 0

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.