Linux automatically mounts NTFS-formatted hard disk __linux

Source: Internet
Author: User
Tags file permissions


Reference articles

Http://blog.sina.com.cn/s/blog_65a523dd0100sw5p.html

Http://www.filewatcher.com/m/fuse-2.7.1.tar.gz.506312-0.html

http://pkgs.fedoraproject.org/repo/pkgs/ntfs-3g/ntfs-3g_ntfsprogs-2013.1.13.tgz/2d6fb47ddf62b51733227126fe9227fe/

Linux boot automatically mount NTFS-formatted hard drive

A, go to/mnt Path, new folder named "F"

B, use the fdisk-l command to query the hard drive for each interval corresponding to the address

C, enter the/etc path to edit the Fstab file, add the following code at the end

/dev/sda5/mnt/e ntfs-3g Defaults 0 0
/dev/sda6/mnt/f VFAT Defaults 0 0

C, the implementation of command mount-a, detection fstab file is written incorrectly, such as written correctly mounted hard disk, you can open/mnt/f check


To achieve Plug and play purposes

The/sbin/mount.ntfs file is created with root authority, which reads as follows:

#!/bin/sh
Export Lang=en_us. UTF-8
exec/sbin/mount.ntfs-3g "$@"

After saving, reinsert the removable hard disk, and see if the NTFS-formatted partition is automatically loaded like a FAT32 partition.

Remember to give/sbin/mount.ntfs file permissions Oh chmod a+x/sbin/mount.ntfs

The code above should be written below.

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.