Diese FAQ ist Teil des
Linux NTFS Projekts.
Die aktuellste Version kann auf
http://linux-ntfs.sourceforge.net/info/ntfs.html
heruntergeladen werden.
Wenn du Fragen über NTFS hast, die nicht in dieser FAQ beantwortet wird oder
du etwas über diese FAQ loswerden willst schreib an
Die deutsche übersetzung wurde von Gerald Able <linux-ntfs@gerald-able.de> erstellt.
- sehr häufig gestellte Frage
- interessantes Detail
- Achtung! Genau lesen!
1.1 Was ist NTFS? | |
1.2 Ist NTFS besser als FAT/FAT32? | |
1.3 Sollte ich NTFS benutzen (oder darauf umstellen)? | |
![]() |
1.4 Ist NTFS in jeder Windows-Version identisch? |
1.5 Wo sind die Grenzen von NTFS? |
5.1 Kann ich Windows auf einem NTFS Dateisystem booten? | |
5.2 Wie benutze ich lilo? | |
5.3 Wie benutze ich grub? |
NTFS ist eine Abkürzung für New Technology Filesystem
.
NT
, weil es ursprünglich bei Windows NT benutzt wurde. Ein
Dateisystem ist die Art, wie der Computer die Dateien auf der Festplatte
ablegt. Die verschiedenen Betriebssysteme benutzen dazu verschiedene
Systeme.
NTFS wird von Windows NT, 2000 und XP benutzt.
Kurz gesagt, ja. Es ist um einiges stabiler, es unterstützt Unicode Dateinamen, angemessene Sicherheitseinstellungen, Kompression und Verschlüsslung. Das Hauptproblem ist, dass es nur von Windows NT, 200 oder XP gelesen werden kann, d. h. man kann keine DOS Boot Diskette benutzen und dann die Daten auf einer NTFS Partition lesen.
Wie immer gibt es auch zu dieser Regel eine Ausnahme. Linux hat seit Dezember 1997 einen Treiber für NTFS. Zusätzlich gibt es ein Programm, mit dem man die NTFS Unterstützung für DOS nachrüsten kann (siehe Abschnitt 2.1)
Nein, du musst nicht unbedingt, aber für die meisten ist es eine gute Idee. Vielleicht merkst du nicht mal einen Unterschied. Beachtenswert ist aber, dass du nicht zurück zu FAT konvertieren kannst (siehe Abschnitt 2.3)
Du kannst Windows NT auch auf einem FAT16 Dateisystem und Windows 2000 oder
XP auch auf einem FAT32 Dateisystem installieren. Später kannst du
dann auch NTFS umstellen.
Nein. Sie sehen alle ähnlich aus, aber neuere Versionen haben mehr
Funktionen. Windows 2000 zum Beispiel hat Quotas (Festplattenkontingente
).
NTFS | Windows Version |
---|---|
v1.2 | NT 3.51, NT 4 |
v3.0 | 2000 |
v3.1 | XP |
Version 1.2 wird manchmal auch als 4.0 bezeichnet.
Version 3.0 und 3.1 werden manchmal als 5.0 und 5.1 bezeichnet.
NTFS unterstützt Dateien mit einer maximalen Größe von 263 Bytes. NTFS Dateisysteme können bis zu 263 Cluster mit jeweils 64 KiBytes groß sein. Damit ergibt sich eine Grenze von ungefähr 500 Trillionen Gigabytes für NTFS.
Das geht leider nicht. Diese Windows Versionen verstehen nur FAT. NTFS kann nur von Windows NT, 2000 oder XP gelesen werden.
Nichtsdestotrotz kann man, mit etwas Arbeit, eine Reihe von Tools von
http://www.sysinternals.com
benutzen. NTFS for Windows 98
und NTFSDOS
erlauben es NTFS
innerhalb Windows 95, 98 und DOS zu lesen. Wenn du bereit bist dafür
zu bezahlen, gibt es auch Versionen die auf NTFS schreiben können (sehr teuer!).
öffne eine Eingabeaufforderung und tippe folgendes ein (dabei ist x:
mit dem richtigen Laufwerksbuchstaben zu ersetzen)
convert x: /fs:ntfs
Wenn das Laufwerk gerade verwendet wird findet die Umstellung beim nächsten Reboot statt.
Dieses Kommando ist nicht leicht rückgängig zu machen. Siehe auch
den nächsten Punkt der FAQ.
Darauf gibt es eine einfache Antwort: Es geht nicht. Wobei es eine Ausnahme gibt, wenn du dafür Geld ausgibst. Partition Magic, erhältlich von http://www.powerquest.com kann zwischen verschiedenen Dateisystemen konvertieren, darunter auch NTFS und FAT.
This depends on which Operating System you are using.
DOS, Windows 95/98/ME: fdisk. Use a boot disk, or ask Windows to go to DOS mode. Then run fdisk. If you have more than one disk, first select that. Then you want to delete a non-DOS partition. Be very careful, your changes will be committed immediately.
Windows NT: Computer management.
Windows 2000, XP: Logical Disk Manager. Start at the Control Panel, select Administrative Tools, then Computer Management.
After a volume has been in use for a while, after many writes to the disk, the files can end up fragmented. That is not in one consecutive place on the disk, but in many small pieces. This causes a slowdown when trying to access these files.
Windows 2000 and XP have a defragmenting program built in. For users of
Windows NT, there is a free program to do the same job. Diskeeper
Lite
can be downloaded from:
http://diskeeper.com
Until recently the only way to resize and NTFS Volume without data loss, was to pay lots of money. Now we have our own program, ntfsresize. It has been tested, but for now it should be considered experimental. For more information, please read the ntfsresize FAQ.
One non-free program that can resize NTFS is Partition Magic
from:
http://powerquest.com
The Linux Driver can read all the versions of NTFS. Each version is slightly different, but the driver only has to interpret the files and directories. All the indexes that NTFS maintains can be safely ignored.
When the driver becomes able to write to an NTFS Volume, then it may be that the abilities will vary according to the version of NTFS it is writing to.
Not really, but if you only need to copy files from Linux to Windows on a dual-boot machine, see "How to write to NTFS" below for a possible way to work around the lack of write support. For write support in Linux, read on.
There are two drivers, currently. The original driver, in 2.4 has some write code in it, but it is extremely dangerous to use it. The possibility of destroying your filesystem is very high.
The new driver, introduced in 2.5.11, has some write code, but it's very limited. The driver can overwrite existing files, but it cannot change the length, add new or delete existing files.
Adding write support will take a long time. NTFS is built like a
database. Any changes you make, necessitate making changes in many places,
for consistancy. Make a mistake and the filesystem will be damaged, make
too many mistakes and the filesystem will be destroyed. Also, the current
developers are only working on NTFS as a hobby, during their free time. If
you'd like to help, please email me:
How to write to NTFS. If you are using a dual-boot machine and just need NTFS write support to transfer files from Linux to Windows, you can instead use a Windows driver for ext2/ext3 and, while running Windows, read the files from the Linux partition instead. This way, using two read-only drivers, you can still copy files from one file system type to the other.
We know about these open source Windows drivers for ext2 and ext3 Linux filesystems, as of June 4th, 2003:
NTFS supports a wide range of features, but few are honoured by the Linux NTFS Driver.
The Linux NTFS Driver supports: Unicode filenames (converted into a local codepage, or utf8); compressed files; sparse files.
However, the driver cannot read encrypted files, it ignores Windows' security information and ignores quotas set by Windows.
The driver is pretty safe read-only, but it's impossible to test every eventuality. If something goes wrong, please help us to find the problem and fix it.
Please email the development team at linux-ntfs-dev@lists.sourceforge.net and tell us which version of the driver you are using, which Linux version (uname -a) and which version of NTFS (Win NT, 2K or XP).
Additionally, if there are any logs (/var/log/messages) that you think may be useful, please include them.
Thanks.
Most users won't have to compile anything to enable NTFS support. Almost every Linux distribution (with the notable exception of RedHat) comes with NTFS support out of the box.
If you are using RedHat 9 (Shrike), 8.0 (Psyche) or 7.3 (Valhalla), then you can simply install an rpm for NTFS support. The rpm comes will detailed instructions.
If you have an older version of RedHat, or another distribution which doesn't include NTFS support, then you will have to compile the kernel yourself. This isn't as difficult as it sounds. Have a look at the Compile Page for more details.
The new version of the driver is better. It is better written, much faster, has fewer bugs and is SMP-safe. The new driver is available in 2.5.11 onwards and a patch is available to add the new driver to 2.4 kernels.
At the moment, there are only a few tools and they are aimed at developers. We keep a status list of all our tools.
Naturally the priorities lie in getting NTFS write support coded.
Microsoft haven't released any documention about the internals of NTFS, so we had to reverse engineer the filesystem from scratch. The method was roughly:
If this sounds like a lot of work, then you probably understand how hard the task has been. We now understand pretty much everything about NTFS and we have documented it for the benefit of others: http://linux-ntfs.sourceforge.net/ntfs/index.html
Actually writing the driver was far simpler than gathering the information.
First we have to thank Martin von Löwis. He created the original NTFS driver back in 1995. It was added to the Linux Kernel in December 1997 (2.1.74). He has been helped by the following kind souls:
Albert Cahalan, Anton Altaparmakov, Damon Casale, David Dillard, Domagoj Pensa, Joseph Malicki, Matthew Fanto, Olof Wolgast, Rani Assaf, Régis Duchesne, Richard Russon, Steve Dodd, Werner Seiler.
Next we have to thank Anton Altaparmakov, it was his enthusiasm which kept the project alive. At a time when the project was effectively unmaintained, he took over and stabilised the code. He went on to rewrite the driver from scratch in order to have a clean base to progress with write support. He has been helped by:
Pawel Kot, Richard Russon.
Of course. The Driver can read all versions of NTFS, but it is read-only.
When used read-only, both the Original and New Drivers are safe for general use. They will not make any changes to your filesystem, so they cannot cause any damage.
Additionally, the New Driver is SMP-safe.
In Linux disks are named hda, hdb for the first two disk on the first IDE controller and hdc, hdd for the third and fourth disks. SCSI disks are named sda, sdb, etc, in the order they are discovered.
A simple way to look for NTFS Volumes is using:
fdisk -l
The output might look like:
Disk /dev/hda: 64 heads, 63 sectors, 4465 cylinders Units = cylinders of 4032 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 1 2125 4283968+ 07 NTFS/HPFS /dev/hda2 2126 19851 35735616 0f Win95 Ext'd (LBA) /dev/hda5 * 2126 4209 4201312+ 83 Linux /dev/hda6 4210 4465 516064+ 82 Linux swap
If your kernel version is 2.4.*, or 2.5.0 - 2.5.10, then you probably have the Original NTFS Driver. If you have 2.5.11 or later, then you have got the New NTFS Driver.
A better test is to look through the kernel logs for the NTFS log message. Try either of these commands (you may need to be root to read the logs).
dmesg | grep -i ntfs grep -i ntfs /var/log/messages
The Original Driver is version 1.1.*, whereas the New Driver is version 2.*.
First of all, it might be an idea to check that your kernel understands
NTFS. The command below will give a list of all the filesystems that Linux
understands. If you see ntfs
, then you are OK. Also it might be a
good idea to read the mount manual, man 8 mount
.
cat /proc/filesystems
Next you need to create a place to mount the NTFS Volume. Then you can mount it.
mkdir /mnt/windows mount /dev/hda1 /mnt/windows -t ntfs -r
To alter the permissions of the mounted filesystem, see the
umask
option in Section 4.6. If you would like to have the
volume mounted automatically at boot time, see
Section 4.10.
When you have finished, you can unmount the partition with either of:
umount /mnt/windows umount /dev/hda1
The command is called
umount
(only one 'n').
These mount options are common to both drivers. It's recommended to also read the man page for mount. The general form of mount is:
mount device directory [options]
Additional options of the for -o option
can be given individually, or
as one parameter separated with commas. These two commands are equivalent:
mount /dev/hda1 /mnt/windows -o X -o Y -o Z mount /dev/hda1 /mnt/windows -o X,Y,Z
-r.
mount /dev/hda1 /mnt/windows -t ntfs -r -o umask=0222
mount /dev/hda1 /mnt/windows -t ntfs -r -o uid=flatcap mount /dev/hda1 /mnt/windows -t ntfs -r -o uid=500
mount /dev/hda1 /mnt/windows -t ntfs -r -o gid=winusers mount /dev/hda1 /mnt/windows -t ntfs -r -o gid=520
To find out which driver you are using, see Section 4.4. This section discusses the options for the Original Driver only. All the common mount options are discussed in Section 4.6.
Several options take a true
or false
parameter.
You may replace true
with yes
or 1
.
You may replace false
with no
or 0
.
NTFS stores all file and directory names in Unicode which can represent any character from any language. By default the Linux NTFS driver converts the names to ASCII which is OK for some people, but no good if your languages includes letters like å or é.
NLS (Native Language Support) controls how characters are displayed. You can choose either utf8 which, like Unicode, can represent all characters, or your own codepage, e.g. iso8859-1 (Western Europe), iso8859-2 (Central Europe), gb2312 (Simplified Chinese), iso8859-8 (Hebrew). Below are some example mount commands:
mount /dev/hda1 /mnt/windows -t ntfs -r -o iocharset=utf8 mount /dev/hda1 /mnt/windows -t ntfs -r -o iocharset=iso8859-2 mount /dev/hda1 /mnt/windows -t ntfs -r -o iocharset=gb2312
If your kernel doesn't support utf8, then you can use this option to
work with utf8 support from the NTFS Driver. You should use
-o iocharset=utf8
wherever possible.
mount /dev/hda1 /mnt/windows -t ntfs -r -o utf8=true
Windows preserves the case of filenames, but it doesn't distinguish when
you read. Therefore you can create a file called MyFileName
and
then open it by asking for mYfILEname
.
By default Linux is case sensitive, MyFile
, MyFile
and
myfile
are all different files. If you would like Linux to
behave like Windows, for an NTFS volume, set the posix
option to true
. Setting the option to false
will make
the driver behave like Linux (the default).
mount /dev/hda1 /mnt/windows -t ntfs -r -o posix=true
If this option is set to true, then the filesystem metadata will be
visible. If the aren't visible, they can still be explicitly listed by
providing their name, e.g. ls -l \$MFT
.
Because of a limitation of glibc,
$MFT
may not appear in listings
because it is inode number zero.
mount /dev/hda1 /mnt/windows -t ntfs -r -o show_sys_files=true
To find out which driver you are using, see Section 4.4. This section discusses the options for the New Driver only. All the common mount options are discussed in Section 4.6.
Several options take a true
or false
parameter.
You may replace true
with yes
or 1
.
You may replace false
with no
or 0
.
NTFS stores all file and directory names in Unicode which can represent any character from any language. By default the Linux NTFS driver converts the names to ASCII which is OK for some people, but no good if your languages includes letters like å or é.
NLS (Native Language Support) controls how characters are displayed. You can choose either utf8 which, like Unicode, can represent all characters, or your own codepage, e.g. iso8859-1 (Western Europe), iso8859-2 (Central Europe), gb2312 (Simplified Chinese), iso8859-8 (Hebrew). Below are some example mount commands:
mount /dev/hda1 /mnt/windows -t ntfs -r -o nls=utf8 mount /dev/hda1 /mnt/windows -t ntfs -r -o nls=iso8859-2 mount /dev/hda1 /mnt/windows -t ntfs -r -o nls=gb2312
The umask
parameter alters the permissions of both files and
directories (see Section 4.6 for a reminder).
fmask
works on files and dmask
works on directories in
the same way. The effect of the options can be combined, too. Here are
some examples:
mount /dev/hda1 /mnt/windows -t ntfs -r -o fmask=0222 mount /dev/hda1 /mnt/windows -t ntfs -r -o dmask=0222 mount /dev/hda1 /mnt/windows -t ntfs -r -o fmask=0077,dmask=0222
Windows preserves the case of filenames, but it doesn't distinguish when
you read. Therefore you can create a file called MyFileName
and
then open it by asking for mYfILEname
.
By default Linux is case sensitive, MyFile
, MyFile
and
myfile
are all different files. If you would like Linux to
behave like Windows, for an NTFS volume, set the case_sensitive
option to false
. Setting the option to true
will make
the driver behave like Linux (the default).
mount /dev/hda1 /mnt/windows -t ntfs -r -o case_sensitive=true mount /dev/hda1 /mnt/windows -t ntfs -r -o case_sensitive=false
By default, the driver will refuse to mount if any of the options are incorrect. By adding the sloppy parameter the driver will simply ignore bad parameters.
mount /dev/hda1 /mnt/windows -t ntfs -r -o sloppy=true mount /dev/hda1 /mnt/windows -t ntfs -r -o sloppy=false
This option controls how the driver copes with problems. The default is to try and continue. Any corruption will be marked and worked around. The alternative is to get the driver to try and recover. At present the only recovery the driver can do is to replace the boot sector with the backup.
mount /dev/hda1 /mnt/windows -t ntfs -r -o errors=continue mount /dev/hda1 /mnt/windows -t ntfs -r -o errors=recover
There are three options to control the permissions and ownership of files
and directories. They are: umask
, uid
and gid
. They
are mentioned in Common mount options.
Below are some examples of each option and how it affects the files. We will use the same mount command each time and just show the options.
mount /dev/hda1 /mnt/windows -t ntfs -r
umask
is a filter of permissions, so it works in the opposite way to
chmod. Full permissions are equivalent to 777 (rwxrwxrwx). A umask of 0222
(-w--w--w-) leaves 555 (r-xr-xr-x).
The default umask is set to 0077, for security reasons.
mount ... -o umask=0277 -r-x------ 1 root root 28096 Aug 24 1996 chkdsk.exe
mount ... -o umask=0222 -r-xr-xr-x 1 root root 28096 Aug 24 1996 chkdsk.exe
So far the files still have an owner and group of root
. Next we try
the uid
and gid
options.
mount ... -o uid=flatcap -r-x------ 1 flatcap root 28096 Aug 24 1996 chkdsk.exe
mount ... -o gid=winuser -r-x------ 1 root winuser 28096 Aug 24 1996 chkdsk.exe
mount ... -o uid=flatcap,gid=winuser -r-x------ 1 flatcap winuser 28096 Aug 24 1996 chkdsk.exe
Finally we combine a few options for precise control. Below we allow the
user flatcap
full control, the group of users winuser
has read
permissions and other people have no access at all.
mount ... -o umask=0027,uid=flatcap,gid=winuser -rwxr-x--- 1 flatcap winuser 28096 Aug 24 1996 chkdsk.exe
Once you are happy with your mount command, you can teach Linux how to mount
the volume automatically by adding a line to /etc/fstab
(filesystem table).
Below are some example mount commands and their equivalent fstab.
Don't worry about the meaning of the
0 0
on the end.
mount /dev/hda1 /mnt/windows -t ntfs -r /dev/hda1 /mnt/windows ntfs ro 0 0
Here we've transformed -r
into the equivalent -o ro
.
mount /dev/hda1 /mnt/windows -t ntfs -r -o umask=0222 /dev/hda1 /mnt/windows ntfs ro,umask=0222 0 0
mount /dev/hda1 /mnt/windows -t ntfs -r -o umask=0222,uid=flatcap,gid=winuser /dev/hda1 /mnt/windows ntfs ro,umask=0222,uid=flatcap,gid=winuser 0 0
Yes, both grub and lilo can boot Windows from an NTFS Volume. What actually happens, is that the Linux boot loader finds the NTFS boot loader and gives control to it.
Add this entry to /etc/lilo.conf, then rerun lilo.
other = /dev/hda1 table = /dev/hda label = Windows
The other
points to the partition containing Windows and table
points to the partition table of the disk.
Add this entry to /boot/grub/grub.conf
title Windows root (hd0,0) makeactive chainloader +1
According to the grub disk numbering, /dev/hda is hd0, hdb is hd1, etc. The partitions are numbered from zero. Therefore, hda1 is hd0,0, hdc4 is hd2,3.
The Linux Distributions that are known to support NTFS are: Mandrake, Debian, SuSE, Gentoo, Lindows and Caldera
In fact, the pattern is, that if the name isn't RedHat, then they will support NTFS.
I'd really like to know. The rumours are that it's a legal worry.
Check which kernel version you are using with the command uname -a
.
If the version is 2.4.9 then it is important for you to update your kernel.
See the RedHat Website
for more details.
If you'd prefer, you could compile your own kernel. See How do I add NTFS support to Linux? for more details.
Not quite. Phat Linux can install onto a FAT partition within Windows, then boot from the files inside Windows. The New Driver nearly has enough support for them to perform this trick using NTFS.
It is a complete rewrite of the NTFS driver. The original driver was writen over a period of many years. In the beginning we knew little about NTFS or Linux and the source code became hard to maintain.
We created a new driver, with our new knowledge, which is much simpler, faster and easier to maintain.
No. There is already an NTFS driver in the current Linux kernel, so you don't need to use the new driver. The original driver, though old, is reliable enough for everyday use.
We release the new driver as a patch to the official Linux kernel source code.
http://linux-ntfs.sourceforge.net/downloads.html
http://www.kernel.org/pub/linux/kernel/v2.4
A patch is a set of changes for a set of text files. Since we are only altering the NTFS code, it is inefficient to release all the kernel code every time we make a small change. We make our patches against official Linux kernel releases.
Once you have unpacked the source, change directory into the source directory and use the command (replacing the path and patchname as necessary):
patch -p1 < path/to/patchname
This will modify the source code. There should be no rejects or failures. Next build the kernel as normal. There are instructions for this elsewhere in this FAQ.
Sorry. We try to help everyone we can, but we have a limited amount of time. There are a few sites that might help you understand the basics about Linux. Alternatively, find out if there is a Linux User Group near you.
There are two kernels to consider. The new code is already in the development Linux Kernel. It was introduced in 2.5.11.
The stable Linux Kernel, currently 2.4.20, still has the old driver. We are happy with the state of the code, but we still have to convince the Kernel Gods that it's good.
Until it is incorporated, we will make frequent releases in patch form.
It sounds like a great idea, to start with, but there are numerous problems.
The largest technical problem is joining the Windows system DLL to the Linux VFS. It could be done, but it wouldn't be pretty. It would have to run as part of the kernel which would mean that if it went wrong it could crash the machine. With no source, we might not be able to work around the problem.
The next major problem is compatability. Which version of the Windows system file would we use? Picking one would limit its use, making the wrapper versatile for all of them would be a programming nightmare.
And it gets worse. The legal implications of distributing Windows systems files would cause problems. Also the proprietary nature of the driver would mean that the other kernel coders would not investigate any problems if someone had used the NTFS wrapper.
Copyright © flatcap (Richard Russon) | ![]() |
![]() |