2 Attachment(s)
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)
@Poka64 & Domino :
EDIT : Scroll down to post 137 to see our last improvement
Ok guys, here it is :D.
I finaly manage to mount my NTFS partition with pmount (using /etc/allow.pmount) so i could test it a bit. And as far as i go, it works.
What changed :
- For the non empty directory problem, i add the option nonempty. This is safe because pmount already test if the directory is empty or not. But i really don't no why fuse see it as non empty :-k
- I manage to set the locale correctly. I pass lot of time on it, because i first didn't know how to get the entire locale (en_US.UTF8 instead of UTF8 ) but google is definitly my fiend 8)
- I made 2 packages :
* The first one, givre3.deb force all ntfs partition to use ntfs-3g instead, and to use ntfs, you have to set '-t ntfs-old' to pmount. This way, when you plug an NTFS device, gnome-volume-manager will use ntfs-3g directly and mount it with full w/r access automaticly. This has to be test (see below)
* The second one, givre4.deb don't force ntfs-3g, so you will have to mount it manually to use ntfs-3g. This will permit to make a nautilus script to mount it with w/r access (not done already)
- pmount didn't allow to unmount other things than device block. I made an exception to /dev/fuse, cause it's the only way to unmount it.
So be carefull, to unmount one, you will have to unmount all. With the nautilus script, we will be able to remount the other partition.
But it still needs some test:
TEST for *givre3.deb:
- Before installing the package, Plug your device and unmount it (with pumount). Be sure of that by checking /etc/mtab.
- Install the package (*givre3.deb).
- Test if it mount correctly without option:
it should stop for ntfs-3g (i remove the output 'filesystem:*' but you still can see the driver use). Note the option pass to mount. You should have the option locale='*.UTF8'
- unmount it:
- try to mount it with the old driver
Code:
pmount -d -t ntfs-old /dev/sd*
- unmount it again
If all work, let's try gnome-volume-manager:
- unplug your device.
- start gnome-volume-manager in debug mode
Code:
killall gnome-volume-manager
gnome-volume-manager -d no
- plug your device. see if it mount it correctly, and when it's done, check in /etc/mtab that the driver has been mount with fuse. Check that you have write access
- If it's work. Great :D
TEST for *givre4.deb:
- install the package
- plug and unmount everything
- try to mount it without any option
- unmount it
- try to mount it with the ntfs driver
Code:
pmount -d -t ntfs /dev/sd*
- If it works we are ready for a nautilus sript. ;)
Say me what option do you prefer.
@all_other: sorry, i don't have time for the moment, i'll see that after ;)
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)
givré, I am having some problems with the USB devices when I unplug them. mainly when i unplug the ext drive, I loose my USB wlan stick or the system freezes when I unplug my USb wlan stick. I think I'll be able to fix the problem in an hour os so. Until you get more testers, enjoy you little rest. I assure you I'll continue when my damn computer quits locking when I unplugging the usb devices.
Thanks.
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)
TEST for *givre3.deb = Success.
Everything pmounts/umounts as it should (ntfs-3g) :)
TEST for *givre4.deb = Success.
Works perfectly
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)
test for givre3.deb:
~$ pmount -d /dev/sda1
Code:
resolved /dev/sda1 to device /dev/sda1
mount point to be used: /media/sda1
no iocharset given, current locale encoding is UTF-8
locale encoding uses UTF-8, setting iocharset to 'utf8'
Cleaning lock directory /var/lock/pmount/_dev_sda1
device_whitelist: checking /etc/pmount.allow...
device_whitlisted(): nothing matched, returning 0
find_sysfs_device: looking for sysfs directory for device 8:1
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/sda (8:0)
find_sysfs_device: major device numbers match
find_sysfs_device: minor device numbers do not match, checking partitions...
find_sysfs_device: checking whether device /dev/sda1 matches partition 8:0
find_sysfs_device: checking whether device /dev/sda1 matches partition 8:1
find_sysfs_device: -> partition matches, belongs to block device /sys/block/sda
device_removable: corresponding block device for /dev/sda1 is /sys/block/sda
get_blockdev_attr: value of /sys/block/sda/removable == 0
find_bus_ancestry: device 0:0:0:0 (path /sys/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/host0/target0:0:0/0:0:0:0, bus scsi) does not match, trying parentfind_bus_ancestry: device target0:0:0 (path /sys/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/host0/target0:0:0, bus ) does not match, trying parent
find_bus_ancestry: device host0 (path /sys/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/host0, bus ) does not match, trying parent
find_bus_ancestry: device 5-2:1.0 (path /sys/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0, bus usb) matches query, success
policy check passed
spawnv(): executing /sbin/cryptsetup '/sbin/cryptsetup' 'isLuks' '/dev/sda1'
spawn(): /sbin/cryptsetup terminated with status 255
device is not LUKS encrypted, or cryptsetup with LUKS support is not installed
locking mount point directory
mount point directory locked
spawnv(): executing /bin/mount '/bin/mount' '-t' 'udf' '-o' 'nosuid,nodev,user,async,atime,noexec,uid=1000,gid=1000,umask=007,iocharset=utf8' '/dev/sda1' '/media/sda1'
spawn(): /bin/mount terminated with status 32
spawnv(): executing /bin/mount '/bin/mount' '-t' 'udf' '-o' 'nosuid,nodev,user,async,atime,noexec,uid=1000,gid=1000,umask=007' '/dev/sda1' '/media/sda1'
spawn(): /bin/mount terminated with status 32
spawnv(): executing /bin/mount '/bin/mount' '-t' 'iso9660' '-o' 'nosuid,nodev,user,async,atime,noexec,uid=1000,gid=1000,iocharset=utf8' '/dev/sda1' '/media/sda1'
spawn(): /bin/mount terminated with status 32
spawnv(): executing /bin/mount '/bin/mount' '-t' 'iso9660' '-o' 'nosuid,nodev,user,async,atime,noexec,uid=1000,gid=1000' '/dev/sda1' '/media/sda1'
spawn(): /bin/mount terminated with status 32
spawnv(): executing /bin/mount '/bin/mount' '-t' 'vfat' '-o' 'nosuid,nodev,user,quiet,shortname=mixed,async,atime,noexec,uid=1000,gid=1000,umask=007,iocharset=utf8' '/dev/sda1' '/media/sda1'
spawn(): /bin/mount terminated with status 32
spawnv(): executing /bin/mount '/bin/mount' '-t' 'vfat' '-o' 'nosuid,nodev,user,quiet,shortname=mixed,async,atime,noexec,uid=1000,gid=1000,umask=007' '/dev/sda1' '/media/sda1'
spawn(): /bin/mount terminated with status 32
filesystem is ntfs-3g. Setting locale to en_US.UTF-8
spawnv(): executing /bin/mount '/bin/mount' '-t' 'ntfs-3g' '-o' 'silent,nonempty,async,atime,noexec,uid=1000,gid=1000,umask=007,locale=en_US.UTF-8' '/dev/sda1' '/media/sda1'
spawn(): /bin/mount terminated with status 0
unlocking mount point directory
mount point directory unlocked
Success! Mounted wit full access. sda1 drive icon on the desktop and natilus.
Code:
~$ pmount -d -t ntfs-old /dev/sda1
resolved /dev/sda1 to device /dev/sda1
Filesystem is now: 'ntfs'
mount point to be used: /media/sda1
no iocharset given, current locale encoding is UTF-8
locale encoding uses UTF-8, setting iocharset to 'utf8'
Cleaning lock directory /var/lock/pmount/_dev_sda1
device_whitelist: checking /etc/pmount.allow...
device_whitlisted(): nothing matched, returning 0
find_sysfs_device: looking for sysfs directory for device 8:1
find_sysfs_device: checking whether /dev/sda1 is on /sys/block/sda (8:0)
find_sysfs_device: major device numbers match
find_sysfs_device: minor device numbers do not match, checking partitions...
find_sysfs_device: checking whether device /dev/sda1 matches partition 8:0
find_sysfs_device: checking whether device /dev/sda1 matches partition 8:1
find_sysfs_device: -> partition matches, belongs to block device /sys/block/sda
device_removable: corresponding block device for /dev/sda1 is /sys/block/sda
get_blockdev_attr: value of /sys/block/sda/removable == 0
find_bus_ancestry: device 0:0:0:0 (path /sys/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/host0/target0:0:0/0:0:0:0, bus scsi) does not match, trying parentfind_bus_ancestry: device target0:0:0 (path /sys/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/host0/target0:0:0, bus ) does not match, trying parent
find_bus_ancestry: device host0 (path /sys/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/host0, bus ) does not match, trying parent
find_bus_ancestry: device 5-2:1.0 (path /sys/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0, bus usb) matches query, success
policy check passed
spawnv(): executing /sbin/cryptsetup '/sbin/cryptsetup' 'isLuks' '/dev/sda1'
spawn(): /sbin/cryptsetup terminated with status 255
device is not LUKS encrypted, or cryptsetup with LUKS support is not installed
locking mount point directory
mount point directory locked
spawnv(): executing /bin/mount '/bin/mount' '-t' 'ntfs' '-o' 'nosuid,nodev,user,async,atime,noexec,uid=1000,gid=1000,umask=077,iocharset=utf8' '/dev/sda1' '/media/sda1'
spawn(): /bin/mount terminated with status 0
unlocking mount point directory
mount point directory unlocked
Success! External drive icon on the dektop and nautilus with no write access.
test for givre4.deb:
~$ gnome-volume-manager -d no
Code:
manager.c/751: setting[0]: bool: autobrowse = 0
manager.c/751: setting[1]: bool: autoburn = 1
manager.c/746: setting[2]: string: autoburn_audio_cd_command = serpentine
manager.c/746: setting[3]: string: autoburn_data_cd_command = nautilus --no-desktop burn:
manager.c/751: setting[4]: bool: autoipod = 1
manager.c/746: setting[5]: string: autoipod_command = rhythmbox
manager.c/751: setting[6]: bool: autokeyboard = 0
manager.c/746: setting[7]: string: autokeyboard_command =
manager.c/751: setting[8]: bool: automount_drives = 1
manager.c/751: setting[9]: bool: automount_media = 1
manager.c/751: setting[10]: bool: automouse = 0
manager.c/746: setting[11]: string: automouse_command =
manager.c/751: setting[12]: bool: autophoto = 1
manager.c/746: setting[13]: string: autophoto_command = gnome-volume-manager-gthumb %h
manager.c/751: setting[14]: bool: autopalmsync = 0
manager.c/746: setting[15]: string: autopalmsync_command = gpilotd-control-applet
manager.c/751: setting[16]: bool: autoplay_cda = 1
manager.c/746: setting[17]: string: autoplay_cda_command = sound-juicer -d %d
manager.c/751: setting[18]: bool: autoplay_dvd = 1
manager.c/746: setting[19]: string: autoplay_dvd_command = totem %m
manager.c/751: setting[20]: bool: autoplay_vcd = 1
manager.c/746: setting[21]: string: autoplay_vcd_command = totem %m
manager.c/751: setting[22]: bool: autopocketpc = 0
manager.c/746: setting[23]: string: autopocketpc_command = multisync
manager.c/751: setting[24]: bool: autoprinter = 0
manager.c/746: setting[25]: string: autoprinter_command = gnome-cups-add hal://%h
manager.c/751: setting[26]: bool: autorun = 0
manager.c/746: setting[27]: string: autorun_path = .autorun:autorun:autorun.sh
manager.c/751: setting[28]: bool: autotablet = 0
manager.c/746: setting[29]: string: autotablet_command =
manager.c/760: settings[30]: float: percent_threshold = 0.050000
manager.c/760: settings[31]: float: percent_used = 0.010000
manager.c/3458: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2630: Device added: /org/freedesktop/Hal/devices/usb_device_67b_2507_0manager.c/3458: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2630: Device added: /org/freedesktop/Hal/devices/usb_device_67b_2507_0_if0
manager.c/3458: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2630: Device added: /org/freedesktop/Hal/devices/usb_device_67b_2507_0_if0_scsi_host
manager.c/3458: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2630: Device added: /org/freedesktop/Hal/devices/usb_device_67b_2507_0_usbraw
manager.c/3458: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2630: Device added: /org/freedesktop/Hal/devices/usb_device_67b_2507_0_if0_scsi_host_scsi_device_lun0
manager.c/3458: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2630: Device added: /org/freedesktop/Hal/devices/usb_device_67b_2507_0_if0_scsi_host_scsi_device_lun0_scsi_generic
manager.c/3458: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2630: Device added: /org/freedesktop/Hal/devices/storage_serial_ST380021_A_0
manager.c/2376: not a mountable volume: /org/freedesktop/Hal/devices/storage_serial_ST380021_A_0
manager.c/3458: gvm_user_active_at_console: check-foreground-console returned with 0
manager.c/2630: Device added: /org/freedesktop/Hal/devices/volume_uuid_D828663D28661AB0
manager.c/1841: mounting /org/freedesktop/Hal/devices/volume_uuid_D828663D28661AB0...
Filesystem is now: 'ntfs-3g'
Mounts the ext drive named "External" both on dektop and nautilus. I have full access to the drive.
Quote:
TEST for *givre4.deb:
- install the package
- plug and unmount everything
- try to mount it without any option
Code:
---------
pmount -d /dev/sd*
---------
- unmount it
Code:
---------
pumount /dev/fuse
---------
- try to mount it with the ntfs driver
Code:
---------
pmount -d -t ntfs /dev/sd*
---------
Success! no problem with either drivers. Thanks the support givre3 :KS :KS :KS :KS . Note to new testers, you need to refresh the folder on the external drives after mouting and unmounting the external drive.
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)
Hey, I'm running ntfs-3g on my dad's computer, I set it up in the original manner (compiled latest fuse and ntfs-3g beta packages, but with checkinstall to make debs). So far the /dev/hda1 mounts perfectly with ntfs-3g and I can read/write to the drive...
Except when I did a symlink from the firefox and thunderbird profiles from the documents and settings user on windows into $HOME/.Mozilla/* & $HOME/.Mozilla-Thunderbird/*, it adds to the files inside instead of appending to them. From a week of using firefox under ubuntu, the bookmarks.html file has made a whole bunch of them from every edit up to bookmarks-211.html as well as the cookies and prefs files, with a similar story for thunderbird. The sharing of resources like this was working fine when using firefox & thunderbird directly, but it isn't writing to the drive properly.
Now when I went inside these directories, I was able to delete bookmarks-1 to bookmarks-148 easily, but any after that, nautilus reports that they don't exist for deleting...
So I'm not sure what is going on, I'll try to delete these files in XP and/or try a chkdsk /f. For now I've just copied over the main details from the profile into a fresh ubuntu-based one (I found mime types and extensions carried over from windows which didn't work at all under ubuntu, not an ntfs-3g issue btw but a warning for anyone who wants to share profiles this way).
My fstab:
Quote:
/dev/hda1 /media/windows-c ntfs-3g silent,umask=0,locale=en_US.utf8 0 0
-Alex
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)
Ok, if there's any other 64-bit user, who wants to try this, let me just say it was a bad idea :(
I finally booted into NT, and found the files I transferred to be corrupted. I booted back to Kubuntu, but now ntfs-3g won't let me mount! It says "Volume is dirty. Run chkdsk and try again, or use force option." So I did try the force option, but my transferred files all showed empty.
I know, I was duly warned not to try this. Hope the developers come out with a native 64-bit version soon...
So, in summary, read seems to be ok, but write seems to be a problem. Or maybe when I boot to 32-bit Windows, something gets corrupted.
Quote:
Originally Posted by
jixun
I've tried it, and it seems to work :D
I followed your instructions almost to the letter. The only difference for chroot environment are as follows:
A) Steps 1 to 3 (install FUSE, install ntfs-3g, and fstab/mount point) must be done in 32-bit chroot environment
B) Step 4 (modprobe fuse or edit /etc/modules) must be done in the normal (64-bit) environment
So actually, a shorter way to say it is that loading FUSE into kernel should be done in 64-bit environment, and everything else should be in 32-bit chroot :mrgreen:
I've done some simple testing, and it seems to work so far. Haven't booted to NT yet though to check integrity. Will post updates if I encounter anything.
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)
@jixun: never using the force option.
@MistaED: yeah good to know.
Ok guys, we have some new stuff :D .
First i begin to made the nautilus scripts. And for the moment it's work well. It's consist of two script:
- The first one, mount_with_ntfs-3g, will unmount the device and mount it agin using ntfs-3g. Basicly, you just have to right click on the device on the desktop or in place>computer and select 'scripts > mount_with_ntfs-3g'. The thing is i test that only on an usb stick that i format in NTFS, and the infomation i had with it could be different than for an USB disk. Anyway, i let a debuging output in case it don't find the device. Tell me how it's work.
- The second one, unmount_ntfs-3g, will simply unmount your device.
What need to be done : as said a multitude of time, the system see every ntfs-3g device as /dev/fuse, so if we unmount one, all the other will be unmounted. My plan is to remount all the others, but i don't know how that will react. Need some times.
I also update pmount to be able to unmount safely /dev/fuse. And i think we will stay with the givre4 branch (don't use ntfs-3g automaticly) because it's safer, for the moment. When the stable version will be release, it will always be time to change that.
And the best for the end. I finaly put all that in a repo so it will be easier to install & to upgrade.
EDIT: If you are not sure of what you are doing, don't use it right now. Wait at least for the 0.2 version. Thanks.
Here it is:
Code:
deb http://flomertens.keo.in/ubuntu/ dapper main
deb-src http://flomertens.keo.in/ubuntu/ dapper main
The nautilus script are : ntfs-3g-nautilus-tools.
Code:
sudo apt-get install ntfs-3g-nautilus-tools libnotify-bin
To enable them, you have to do it manually:
Code:
nautilus-script-manager enable unmount_ntfs-3g
nautilus-script-manager enable mount_with_ntfs-3g
Happy testing !!! :cool: ;)
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)
Thanks for the work givré.
I'm a bit confused with this statement.
Quote:
What need to be done : as said a multitude of time, the system see every ntfs-3g device as /dev/fuse, so if we unmount one, all the other will be unmounted.
I have fstab configure to use ntfs-3g drivers on 2 internal partiton. When I was testing the ext drive in terminal yesterday, it didn't unmount the other internal ntfs partitions. Maybe things have changed after this update, but i'll try to replicate after I apt-get the new packages.
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)
Quote:
Originally Posted by
givré
so if we unmount one, all the other will be unmounted.
After some more test, it's not actually what's happens. In fact, fusermount will unmount the last mounted. So if the USB disk is not the last one mount with ntfs-3g, we will have a problem. This kind of case happens really rarely, but we can't say 'USB device unmounted' if it's nor really the case. Really needs some work.
EDIT : One last thing. Unmount_ntfs-3g use notify-send to tell the user that the device is unmounted. Since i use it a lot, i believed it was install by default. Actually not, and worse than that, it's in universe. I forgot to put it as a dependency so you'll have to install it manually until the next release :
Code:
sudo apt-get libnotify-bin
Re: HOWTO: NTFS with read/write support using ntfs-3g (easy method)
:) I had to use Synaptic in order to download and install libnotify-bin & nautilus-script-manager. Once both are installed I tried running either of the 2 scripts nd no go.
~$ nautilus-script-manager enable unmount_ntfs-3g
Error: No script with that name available
~$ nautilus-script-manager enable mount_with_ntfs-3g
Error: No script with that name available
Maybe i'm confused??