个人工具

“UbuntuHelp:MountingWindowsPartitions/ThirdPartyNTFS3G”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(重定向页面到UbuntuHelp:MountingWindowsPartitions
 
第1行: 第1行:
 +
#REDIRECT [[UbuntuHelp:MountingWindowsPartitions]]
 
{{From|https://help.ubuntu.com/community/MountingWindowsPartitions/ThirdPartyNTFS3G}}
 
{{From|https://help.ubuntu.com/community/MountingWindowsPartitions/ThirdPartyNTFS3G}}
 
{{Languages|UbuntuHelp:MountingWindowsPartitions/ThirdPartyNTFS3G}}
 
{{Languages|UbuntuHelp:MountingWindowsPartitions/ThirdPartyNTFS3G}}
== Introduction ==
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconSambaShares.png NTFS (New Technology File System) is a file system developed by Microsoft and used by Windows computers (Windows 2000 and later).  Until 2007, linux was not able to write to this type of filesystem, it could only read from it.  The stable ntfs-3g driver now allows linux systems to read ''and'' write NTFS formatted partitions.
 
== Installation ==
 
The ntfs-3g packages comes pre-installed in currently supported versions of Ubuntu, but you still need to install ntfs-config if you want the GUI configuration tool.  You can search for "ntfs-config" in [[UbuntuHelp:SynapticHowto| Synaptic]] or install via terminal:
 
<pre><nowiki>
 
sudo apt-get install ntfs-config
 
</nowiki></pre>
 
Alternatively, [[UbuntuHelp:apt:ntfs-config|click here to install the ''ntfs-config'' package]] (the Universe [[UbuntuHelp:Repositories/Ubuntu|repository]] must be enabled).
 
== Configuration ==
 
Now you have the choice between an automatic configuration using ntfs-config or a manual configuration.
 
=== The Automatic Way ===
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=navigate.png Launch '''NTFS Configuration Tool''' from Applications->System Tools, or via the terminal:
 
<pre><nowiki>
 
gksudo ntfs-config
 
</nowiki></pre>
 
https://help.ubuntu.com/community/MountingWindowsPartitions/ThirdPartyNTFS3G?action=AttachFile&do=get&target=ntfs-config.png
 
If you have at least one internal NTFS partition, it will allow you to check both boxes, otherwise you can only check the box for external devices.
 
If your NTFS partition(s) are not yet configured, it will ask you to choose a name that will be used as the mount point (please no spaces).  Then enable write support for internal and/or external devices.
 
=== The Manual Way ===
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconGNOMETerminal.png First you need to find the device location of the NTFS partition(s) you want to mount.  In terminal, run:
 
<pre><nowiki>
 
sudo fdisk -l | grep NTFS | awk '{print $1}'
 
</nowiki></pre>
 
The name of each partition should be something like /dev/hd'''xn''' or /dev/sd'''xn''', where '''x''' is an alphabetical letter (ranges from a to z) and '''n''' is a number (e.g. /dev/hda1).
 
If the drive is internal, you will now need to edit your [[UbuntuHelp:Fstab| file systems table]] configuration file, <code><nowiki>/etc/fstab</nowiki></code>.  If the drive is an external USB or firewire drive, hal should automount it.  Now, be sure to save a backup of fstab first, then open the file for editing:
 
<pre><nowiki>
 
sudo cp /etc/fstab /etc/fstab.orig
 
gksudo gedit /etc/fstab
 
</nowiki></pre>
 
After entering your password, find the line that matches the device location you just found and change it to the following. If there is no entry yet, add a new line like the following:
 
<pre><nowiki>
 
<your partition> /media/<mount point> ntfs-3g defaults,locale=en_US.utf8 0 0
 
</nowiki></pre>
 
NOTE: If it displays your NTFS partition with a [[UbuntuHelp:UsingUUID| UUID]], you can check the relevant device location by running one of the following commands.  It is OK (and even advisable) to keep the UUID setup if that is what already exists.
 
<pre><nowiki>
 
sudo blkid
 
ls -l /dev/disk/by-uuid/
 
</nowiki></pre>
 
Replace <your partition> with the name of the partition you identified earlier. Replace <mount point> with the location you would like the partition to be mounted at, so you have something like <code><nowiki>/media/windows</nowiki></code> or <code><nowiki>/media/documents</nowiki></code> for that column.
 
Note: you can also change your locale option (ex: locale=fr_FR.utf8). Execute <code><nowiki>locale -a</nowiki></code> in a terminal to know which ones are supported on your system.
 
Save and close the file.  You will now need to create the mount point for each NTFS partition before you can actually mount them:
 
<pre><nowiki>
 
sudo mkdir -p /media/<mount point>
 
</nowiki></pre>
 
Now remount each partition with
 
<pre><nowiki>
 
sudo umount <your partition>
 
sudo mount -a
 
</nowiki></pre>
 
==== If you have a problem ====
 
If you want to revert to your previous configuration, run:
 
<pre><nowiki>
 
sudo mv /etc/fstab.orig /etc/fstab
 
sudo umount /media/<mount point>
 
</nowiki></pre>
 
== Known Issues ==
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=stop.png The present limitations of this driver are:
 
* writing files encrypted or compressed at the filesystem level (does not include .zip, .gz, .rar files since they are compressed on the file, not the file system level)
 
* changing NTFS file ownership and access rights
 
=== Separate /usr partition work-around ===
 
'''''It is unknown if this issue still exists.  Please remove this line if you can confirm that it does.'''''
 
Bug report: https://bugs.launchpad.net/ubuntu/+bug/120643
 
This is only needed if you have installed ubuntu with a separate /usr partition.
 
Before running the Applications->System Tools->NTFS Configuration Tool provided with the installation, you will need to backup and edit your fstab file:
 
<pre><nowiki>
 
sudo cp /etc/fstab /etc/fstab.pre_ntfs3g_workaround
 
gksudo gedit /etc/fstab
 
</nowiki></pre>
 
Now, carefully look through the file for all references of your ntfs partitions
 
(this is taken from part of my fstab file and is '''ONLY''' for example, yours '''WILL''' be different).
 
<pre><nowiki>
 
# Entry for /dev/sda9 :
 
UUID=98451ab9-d323-4a09-96a2-91b5ea58035c / ext3 defaults,errors=remount-ro 0 1
 
# Entry for /dev/sda3 :
 
UUID=09f8e063-64d5-4b20-a97b-26cfb7b08989 /boot ext3 defaults 0 2
 
# Entry for /dev/sda11 :
 
UUID=7b0fce56-2eb6-4e39-b428-4fe45eef5f21 /home ext3 defaults 0 2
 
# Entry for /dev/sda1 :
 
UUID=68084A9E084A6B60 /media/sda1 ntfs defaults,locale=en_GB.UTF-8 0 1
 
# Entry for /dev/sda12 :
 
UUID=28FEE8554059CE0D /media/sda12 ntfs defaults,locale=en_GB.UTF-8 0 1
 
# Entry for /dev/sda13 :
 
UUID=ec8a8c6e-f9fb-4af6-839e-4ed5da28cd92 /tmp ext3 defaults 0 2
 
# Entry for /dev/sda14 :
 
UUID=6763b394-2cd8-4830-8cb7-a4cd4b45fa41 /usr ext3 defaults 0 2
 
# Entry for /dev/sda15 :
 
UUID=e53c0925-18a0-415c-8786-615b3b195c8f /var ext3 defaults 0 2
 
# Entry for /dev/sdb1 :
 
UUID=582a25db-c088-427c-9279-48af84695c7b none swap sw 0 0
 
</nowiki></pre>
 
the lines
 
<pre><nowiki>
 
# Entry for /dev/sda1 :
 
UUID=68084A9E084A6B60 /media/sda1 ntfs defaults,locale=en_GB.UTF-8 0 1
 
# Entry for /dev/sda12 :
 
UUID=28FEE8554059CE0D /media/sda12 ntfs defaults,locale=en_GB.UTF-8 0 1
 
</nowiki></pre>
 
need to be cut and then pasted below the /var partition entry to read:
 
<pre><nowiki>
 
# Entry for /dev/sda9 :
 
UUID=98451ab9-d323-4a09-96a2-91b5ea58035c / ext3 defaults,errors=remount-ro 0 1
 
# Entry for /dev/sda3 :
 
UUID=09f8e063-64d5-4b20-a97b-26cfb7b08989 /boot ext3 defaults 0 2
 
# Entry for /dev/sda11 :
 
UUID=7b0fce56-2eb6-4e39-b428-4fe45eef5f21 /home ext3 defaults 0 2
 
# Entry for /dev/sda13 :
 
UUID=ec8a8c6e-f9fb-4af6-839e-4ed5da28cd92 /tmp ext3 defaults 0 2
 
# Entry for /dev/sda14 :
 
UUID=6763b394-2cd8-4830-8cb7-a4cd4b45fa41 /usr ext3 defaults 0 2
 
# Entry for /dev/sda15 :
 
UUID=e53c0925-18a0-415c-8786-615b3b195c8f /var ext3 defaults 0 2
 
# Entry for /dev/sda1 :
 
UUID=68084A9E084A6B60 /media/sda1 ntfs defaults,locale=en_GB.UTF-8 0 1
 
# Entry for /dev/sda12 :
 
UUID=28FEE8554059CE0D /media/sda12 ntfs defaults,locale=en_GB.UTF-8 0 1
 
# Entry for /dev/sdb1 :
 
UUID=582a25db-c088-427c-9279-48af84695c7b none swap sw 0 0
 
</nowiki></pre>
 
'''Remember - these are ONLY given as an example, do not copy and paste - your fstab WILL BE DIFFERENT'''.
 
Save your fstab file and close.  Now you can continue on with either the 'automatic' or 'manual' configuration as per the instructions above.
 
=== Custom Kernel ===
 
'''''It is unknown if this issue still exists.  Please remove this line if you can confirm that it does.'''''
 
If you compiled your own kernel, you probably will not have '''fuse''' installed. You can get the source with
 
<pre><nowiki>
 
sudo apt-get install fuse-source
 
</nowiki></pre>
 
and have a look at '''/usr/share/doc/fuse-source/README.Debian''' for instructions on how to compile it.
 
== See also ==
 
== External links ==
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconBook-small.png
 
* [http://ntfs-3g.org/releases.html ntfs-3g homepage]
 
* [[UbuntuHelp:MountingWindowsPartitions|MountingWindowsPartitions]]
 
* [[UbuntuHelp:Fstab|Fstab]]
 
----
 
[[category:CategoryWindows]]
 
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 23:27的最新版本