# Replace NTFS module with NTFS-3G?

## ToeiRei

Is it possible to use the ntfs-3g driver (fuse!) instead of the build in ntfs kernel with HAL/ivman and all that automounting jazz?

Rei

----------

## Dagger

yep. I have ntfs-3g installed and my HAL is using ntfs-3g drivers rather than kernel ones.

----------

## ToeiRei

Is there anything special to watch out for? So I'll rip out the current ntfs kernel module...

Rei

----------

## Dagger

ntfs-3g works like a charm! Transfers are similar to native ntfs, and never had problems with corrupted files.

----------

## padoor

how do i use ntfs3g in place of kernel ntfs?

i dont know if i made module for ntfs or built in kernel.

some step by step instruction is necessary. i am not able to write into ntfs partition even after slected writing ntfs in kernel menu.

----------

## Januszzz

padoor:

please read help about the NTFS kernel module! AFAIK you can only write to a file which is already there and only to its size, so in fact writing is close to nothing in Linux kernel.

To use fuse (and ntf3g) please do the following:

1. emerge fuse ntfs3g. If you have fuse already compiled into kernel or module from kernel, then you got it. If don't - wait for emerge to complete.

2. load module by: modprobe fuse

3. simply mount your filesystem: mount -t ntfs-3g /dev/hda1 /mnt/windows

4. man ntfs-3g  :Wink: 

I do not use any NTFS, but I remember that one of the cons is that one cannot CREATE WHOLE FILESYSTEM with that (but I'm not sure).

Regards.

----------

## padoor

i have ntfs3g emerged ,  fuse is present.

in the fstab  i am mounting the ntfs partition rw in /mnt

it reads ok. but refuses to write saying cannot write.

mount -t ntfs-3g /dev/hda1 /mnt/hda1 i have tried but still no write possible.

i just wanted to copy some data to ntfs partition.

" you can only write to a file which is already there and only to its size, so in fact writing is close to nothing in Linux kernel. "

i do not understand the meaning of the above . can you tell me in simple english?

does this mean i cannot mv cp new files into ntfs partition from gentoo / linux ?

thanks for reply

----------

## matze_na

he probably means that you can't format a partition with ntfs-filesystem using only ntfs-3g.

don't know if that's true or if it's even what he meant to say, but moving oder copying your files will work just fine, i can assure you  :Wink: 

----------

## Januszzz

make menuconfig, navigate to File systems->DOS/FAT/N/Filesystem->NTFS write support and press HELP button:

```

CONFIG_NTFS_RW:                                                                                                                      │

  │                                                                                                                                      │

  │ This enables the partial, but safe, write support in the NTFS driver.                                                                │

  │                                                                                                                                      │

  │ The only supported operation is overwriting existing files, without                                                                  │

  │ changing the file length.  No file or directory creation, deletion or                                                                │

  │ renaming is possible.  Note only non-resident files can be written to                                                                │

  │ so you may find that some very small files (<500 bytes or so) cannot                                                                 │

  │ be written to.                                                                                                                       │

  │                                                                                                                                      │

  │ While we cannot guarantee that it will not damage any data, we have                                                                  │

  │ so far not received a single report where the driver would have                                                                      │

  │ damaged someones data so we assume it is perfectly safe to use.                                                                      │

  │                                                                                                                                      │

  │ Note:  While write support is safe in this version (a rewrite from                                                                   │

  │ scratch of the NTFS support), it should be noted that the old NTFS                                                                   │

  │ write support, included in Linux 2.5.10 and before (since 1997),                                                                     │

  │ is not safe.                                                                                                                         │

  │                                                                                                                                      │

  │ This is currently useful with TopologiLinux.  TopologiLinux is run                                                                   │

  │ on top of any DOS/Microsoft Windows system without partitioning your                                                                 │

  │ hard disk.  Unlike other Linux distributions TopologiLinux does not                                                                  │

  │ need its own partition.  For more information see                                                                                    │

  │ <http://topologi-linux.sourceforge.net/>                                                                                             │

  │                                                                                                                                      │

```

This is all about NTFS write support in kernel. You can simply throw it away (do NOT compile NTFS support in kernel) and use ntfs-3g instead.

----------

## ToeiRei

Well... I currently replaced the ntfs support with ntfs-3g - but the main issue I am fighting here remains;

I want to mount ntfs partitions using KDE media:/ stuff which now reports 'unknown partition'.

Is there a way to make it use ntfs-3g?

Rei

----------

## dpshak

This is how I have ntfs3g setup.  In kernel configuration -> file systems -> filesystems in userspace support is NOT installed.  In kernel configuration -> file systems -> DOS/FAT/NT filesystems -> NTFS file system support built-in and -> NTFS write support built in.  These two MAY work as modules, but I just build them right into the kernel.  Now, emerge 'sys-fs/fuse' and ntfs3g.  My kernels are built to automatically load kernel modules.  So fuse is automatically loaded when I boot into Gentoo.  If your kernel is not, you will probably have to add fuse to /etc/modules.autoload.d/<kernel-version>.  When I first installed ntfs3g, the in-kernel version of fuse was not compatible with ntfs3g.  This may have changed, but it still works for me in 2.6.22-r8 - and I hate to fiddle with something that works!  :Laughing:   FYI, running 'emerge fuse' will confuse portage, so do emerge sys-fs/fuse!

Here's the relevant portion of my /etc/fstab:

```
# Other partitions

/dev/sda4               /mnt/WinXP      ntfs-3g         defaults,noatime        0 0

/dev/sdb1               /mnt/Main02     ntfs-3g         defaults,noatime        0 0

/dev/hda1               /mnt/Home01     ntfs-3g         defaults,noatime        0 0

/dev/hdb1               /mnt/Home02     ntfs-3g         defaults,noatime        0 0

/dev/sdb2               /mnt/OSSwap     vfat            defaults,noatime        0 0

/
```

You should find something similar to this in dmesg:

```
fuse init (API version 7.8)

fuse distribution version: 2.7.0
```

and fuse should show up in lsmod.

Keep in mind, when you upgrade the kernel, you will have to rebuild sys-fs/fuse against the new kernel!  If you watch the boot process after upgrading a kernel and before rebuilding sys-fs/fuse, you will see a bunch of 'Could not mount' type errors for the items in fstab that use fuse. 

When I start KDE, I can go to Konqueror and transfer files back and forth between Gentoo and the NFTS partitions with no problems!

Hope this was a little helpful!  :Smile: 

----------

## ToeiRei

Well... This is one possibility. What about making use of ivman regarding removeable devices?

Rei

----------

## dpshak

 *Quote:*   

> Well... This is one possibility. What about making use of ivman regarding removeable devices?

 

Sorry, Rei!  I don't know anything about ivman!

----------

