Debian auto mount windows partition Batch Processing
Source: Internet
Author: User
Debian automatically mounts windows partition batch processing-Linux Release Technology-Debian information. The following is a detailed description. [I = s] This post was last edited by chenxiaobosc
First you have to install NTFS-3G, the following are transferred from the Internet.
Run the following command to edit the Mount script autowinfs.
Sudo gedit/usr/sbin/autowinfs
Copy and paste the following referenced content, save the file, and exit.
Mkdir-p/windows/
Rmdir/windows/* 1>/dev/null
Grep-v '/windows/'/etc/fstab>/etc/fstab. swp
Fdisk-l/dev/[hs] d [a-z] | grep 'ntfs '| cut-d'-f1 | cut-d/-f3 | while read WDISKS
Do echo "/dev/$ WDISKS/windows/$ WDISKS ntfs-3g auto, user, nls = utf8, umask = 0 0 0">/etc/fstab. swp
Mkdir "/windows/$ WDISKS"
Done
Fdisk-l/dev/[hs] d [a-z] | grep 'fat' | cut-d'-f1 | cut-d/-f3 | while read WDISKS
Do echo "/dev/$ WDISKS/windows/$ WDISKS vfat auto, user, utf8, umask = 0 0 0">/etc/fstab. swp
Mkdir "/windows/$ WDISKS"
Done
Mv/etc/fstab. swp/etc/fstab
Mount-
Exit 0
Run the following command:
Sudo chmod + x/usr/sbin/autowinfs
Sudo/usr/sbin/autowinfs
The Windows partition will be mounted under/windows /.
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.