‽
|
|
quote |
Travels via TARDIS
Join Date: Aug 2005
Location: Earthsea
|
Here's a better way to do the probe, that mimics how Apple's ntfs.util behaves:
Code:
function Probe() {
DEVICE="/dev/$2"
LABEL=`/usr/local/sbin/ntfslabel -n ${DEVICE}`
RESULT=$?
if [ $RESULT -ne 0 ]; then
# Reading the label failed, so it's not NTFS
exit -2 # FSUR_UNRECOGNIZED
else
# Reading label succeeded, so it's NTFS
echo -n "${LABEL}"
exit -1
fi
} Run Apple's ntfs.util on an unmounted, but present NTFS volume, and see how it's output acts. This mimics it exactly, and might perhaps get name detection down.Apparently I call the cops when I see people litter. |
quote |
‽
|
Quote:
1) It needs to go into /System/Library/Filesystems. I couldn't get DiskArb to care about /Library/Filesystems at all. 2) I didn't check if the symlinks are okay. Even if they are, you need one more. Code:
/sbin/mount_ntfs-3g -> /System/Library/Filesystems/ntfs-3g.fs/ntfs.util
ntfs.format -> ntfs.util
ntfs.mount -> ntfs.util
ntfs.probe -> ntfs.util
ntfs.repair -> ntfs.util
ntfs.verify -> ntfs.util The reason these symlinks exist is because DiskArb is rather irrational and random about how it calls the utility. Sometimes it respects some of the Info.plist, sometimes it doesn't. To give a bizarre example, it doesn't care about FSFormatExecutable (it calls ../../ntfs.util when it's supposed to call ../../ntfs.format), but it does care about FSFormatArguments. On the other hand, it doesn't care about FSVerificationArguments (it'll always pass "-q" no matter what), yet it does about FSVerificationExecutable. The symlinks allow me to use 'basename' to gather what DiskArb is really trying to do. I initially made some of these separate shell scripts, but that turned out to be wasteful in terms of code reuse. This is an okay solution.3) I removed my excessive debug code, which means I might have broken a thing or two by accidentally removing too much. You'll see, I guess. 4) I know. It's ugly. But for the most part, it actually works. |
|
quote |
‽
|
Quote:
Quote:
Code:
`/usr/local/sbin/ntfslabel -fq $device 2>/dev/null` I've had that for a while; I just removed it temporarily while other mounting stuff was in the way. |
||
quote |
New Member
Join Date: Jan 2007
|
I Have this error when i compile ntfs-3g versione 20070116
I have installe MacFuse (MacFUSE-0.1.0b006.dmg) I have xcode I have MacOS 10.4.8 on MacBook CDuo 2Ghz Quote:
|
|
quote |
‽
|
Quote:
|
|
quote |
‽
|
Okay, I've changed the appropriate section in ntfs.util accordingly:
Code:
label=`/usr/local/sbin/ntfslabel -fq "$device" 2>/dev/null | sed "s=[ /]=_=g"` # prevent spaces and slashes, as per Apple's ntfs.util
if [ `echo "$label" | wc -c` -eq 0 ]
then
label="Untitled NTFS Volume"
fi
echo -n "$label"$'\0' > /System/Library/Filesystems/ntfs-3g.fs/ntfs-3g.label
echo -n "NTFS-3G"$'\0' > /System/Library/Filesystems/ntfs-3g.fs/ntfs-3g.name
echo -n "$label"$'\0'
exit -1 # FSUR_RECOGNIZED; probe response; mounting implied possible This matches http://darwinsource.opendarwin.org/C...oj/ntfs_util.c rather closely. I don't know if the .label and .name files are actually used any more, especially since the code says /* backwards compatibility */. Oh well. The good news:1) The mount points are now nicer. Instead of /Volumes/Untitled [n], you get the actual name, though with underscores instead of spaces or slashes. 2) Disk Utility now shows the volume names. However, due to the replacing of spaces and slahes, Disk Utility shows it as, e.g., "Some_Volume". I can't really figure out how Apple's ntfs.util avoids this. Also, Disk Utility still considers those volumes unmounted. Last edited by chucker : 2007-01-17 at 00:38. Reason: fixed minor typo-esque bug |
quote |
Travels via TARDIS
Join Date: Aug 2005
Location: Earthsea
|
I actually ravaged your scripts, and after mimicking the behavior of Apple's ntfs.util, the mount points are chosen correctly, and pretty much everything works with auto-mounting. I patched the mount_fusefs binary that MacFUSE ships so that mountpoints no longer have the "@0" nonsense on the end; that really throws off DiskArbitration.
My only problem now is this: every time I automatically mount a volume, I encounter the statfs() race condition without fail, so Finder sees a volume with no size, and that is unwritable. As Amit says on the Wiki, Finder never recovers. Dammit. Everything else works, including read/write access from the command line, mounting and un-mounting as many times as you like, from wherever you like. I tried putting in a compulsory sleep at the end of the Mount() function, but it doesn't help. Unfortunately. There doesn't seem to be anything more I can do. I'm going to upload the new installers I have that take care of symlinks in /sbin, so you can take a look. They'll be up in a few minutes, here: (defunct) Apparently I call the cops when I see people litter. Last edited by ShadowOfGed : 2007-01-17 at 03:20. Reason: Borked builds; find newer ones below. |
quote |
‽
|
Quote:
Quote:
Quote:
|
|||
quote |
Travels via TARDIS
Join Date: Aug 2005
Location: Earthsea
|
Quote:
Apparently I call the cops when I see people litter. |
|
quote |
‽
|
*ahem*
Quote:
|
|
quote |
Travels via TARDIS
Join Date: Aug 2005
Location: Earthsea
|
Quote:
Well, something odd is going on. I changed from symlinks to hardlinks, and the "don't call directly" warning vanished. But then it died because it wasn't getting arguments. So I updated the Info.plist to explicitly pass the -y and -q parameters. Also, I'm going to start keeping revision numbers (-r3) so I don't lose track of this mess I've made. I tested formatting, verification, and mounting/unmounting with this version, through both diskutil and Disk Utility. If anything breaks, let me know! EDIT: Renaming of NTFS volumes is still limited to using ntfslabel on the command line; I cannot find how to integrate support for that. So the fixed revisions are here:Something's still going wrong. File managers open when NTFS mounts happen show the volume as having 0 size. In the screenshot, Finder was already running, but Path Finder was started after mounting. I can reverse the problem by reversing the order. Here's the screenshot: Apparently I call the cops when I see people litter. Last edited by ShadowOfGed : 2007-01-17 at 03:47. Reason: Finally, NTFS sucks less. |
|
quote |
‽
|
Any ideas at all what Finder calls when renaming a drive?
|
quote |
Travels via TARDIS
Join Date: Aug 2005
Location: Earthsea
|
No, but the online help from diskutil states that renaming only works for HFS+ and UFS disks. Sounds like a Private API, perhaps...
At this point, it's pretty darned close to a working solution, minus the zero-size and renaming problems. Especially considering a killall Finder.app will "fix" it. Also, I edited Info.plist so that formatting NTFS is easier, a la: Code:
sudo diskutil eraseVolume 'NTFS-3G' 'VolName' disk5s2 Instead of needing to type 'Windows NT Filesystem 3G', which is contrary to the other shorthand names it lists in the help for eraseVolume. Just a minor change. Apparently I call the cops when I see people litter. |
quote |
‽
|
Quote:
|
|
quote |
Travels via TARDIS
Join Date: Aug 2005
Location: Earthsea
|
Quote:
Just a matter of preference, I suppose. It's not terribly important. Apparently I call the cops when I see people litter. |
|
quote |
‽
|
Quote:
Quote:
As for an actual problem: for some reason, ntfs-3g doesn't always exit properly. |
||
quote |
‽
|
There's also a rare condition where DiskArb thinks a volume is still mounted when it's really not. Perhaps you could put 'disktool -r' at the end of Unmount()?
|
quote |
New Member
Join Date: Jan 2007
|
Quote:
All is ok from pkg-config installed like how to... but nothing change... I try the previous version of dmg package (MacFuse + NTFS-3g) it's ok but when i open a txt file (for example) and modify it (adding text) and save it become "hidden" i cannot find file, i must mount and remount... WHY??? I don't know??? |
|
quote |
|
Thanks for all the detailed information guys! I got my NTFS partition working without problems.
There is one minor thing though: with NTFS write support, shouldn't it be possible to change the icon that shows up in bootcamp? I changed the icon in OS X, and it stays that way (also when I reboot). When I alt-boot though, it shows the regular (HDD) icon. A bit off-topic, but I was wondering if anybody could help. I must be missing something obvious here... |
quote |
‽
|
Quote:
|
|
quote |
|
that's a bummer... Ah well, I'll just stick with the plain icon for now, since I don't want to install rEFIt just for this...
|
quote |
|
The download links don't appear to be working, is there a mirror?
Thanks, Michael |
quote |
‽
|
Quote:
Quote:
http://chucker.mystfans.com/opensour...0_beta6-r3.dmg http://chucker.mystfans.com/opensour...0070116-r3.dmg |
||
quote |
New Member
Join Date: Jan 2007
|
I installed http://idisk.mac.com/shadowofged/Pub...0_beta6-r3.dmg and http://idisk.mac.com/shadowofged/Pub...0070116-r3.dmg
then i unmounted my ntfs partition and did it in terminal: interinvs-Computer:/Users/interinv root# mkdir /volumes/Windows interinvs-Computer:/Users/interinv root# ntfs-3g /dev/disk1s1 /Volumes/Windows -o ping_diskarb,volname=Windows,locale=ru_RU NTFS partition was mounted as read/write and localized. After rebooting Windows partition was mounted automatically as read/write! but not localized (files with not English names are invisible). Other thing: if i write or rename file on ntfs partition - the changes become visible only after finder relaunch (but if i delete - all ok) |
quote |
Travels via TARDIS
Join Date: Aug 2005
Location: Earthsea
|
Quote:
Apparently I call the cops when I see people litter. |
|
quote |
|
Just to inform you guys working hard on this, I have noticed some minor problems:
1. When automounted on login or after restarting the Finder, the NTFS partitions show accurate information on size and free space. However, if you use Disk Utility, it will show the infamous "zero-everything". I have not tried the command-line method, since it's working quite well with Finder. 2. As I am not a real UNIX power-user, I took quite some time to find out that ntfslabel would be in /usr/local/sbin, which was not on my PATH. I recommend adding it to the PATH variable too. My solution is editing ~/.bash_profile and adding the following line: export PATH=/usr/local/bin:/usr/local/sbin:$PATH This way, you don't have to do it manually everytime you close Terminal. 3. My NTFS partition is being shown as a network mount, which seems strange. I've read this whole thread and saw something about this, but I can't find it now... These are the really minor problems I've seen so far. Apart from these, it seems perfect for me! Thanks all of you guys (mainly ShadowOfGed and chucker) for the amazing work. Cheers, _iCeb0x_ |
quote |
|
Quote:
Cheers, _iCeb0x_ |
|
quote |
Travels via TARDIS
Join Date: Aug 2005
Location: Earthsea
|
Quote:
Quote:
If you're annoyed by the network volume icon, you can set the volume icon to be something more appropriate, just like you would for any other volume:
As for the "missing files" issue... Finder sees a network volume, and thus filesystem notifications (that happen on file creation/updates/deletes) are likely disabled. On a regular network filesystem, it's either (a) impossible to implement, or (b) too bandwidth-intensive to justify benefit. Since MacFUSE masquerades as a network filesystem, that's why these things don't work. It also prevents Spotlight from working properly, I think. I'm not sure there's anything we can do about that. If anyone wants to dig around for solutions, feel free. Apparently I call the cops when I see people litter. |
|||
quote |
Travels via TARDIS
Join Date: Aug 2005
Location: Earthsea
|
Quote:
To mount with the correct locale automatically, do the following, where /Volumes/YourVolume is wherever your NTFS volume gets mounted: The updated mount script in -r4 will look for this file and--if found--remount your volume with the correct locale set. So you'll have to mount the volume unlocalized once to create the file, but then it *should* work automatically from then on. If you encounter problems, please let me know. Hope this helps! Apparently I call the cops when I see people litter. Last edited by ShadowOfGed : 2007-01-17 at 15:24. Reason: I'm insane about formatting... |
|
quote |
Posting Rules | Navigation |
Page 4 of 13 Previous 1 2 3 [4] 5 6 7 8 Next Last |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Firefox 2.0 for Mac: User Interface Grievances (Redux!) | Brad | Third-Party Products | 42 | 2006-11-06 13:33 |
Stupid Mac graphics card options | Luca | Third-Party Products | 33 | 2005-07-01 01:34 |
Games specifically for Mac | Banana | General Discussion | 24 | 2005-03-28 14:03 |
Of All Things: PowerMac vs. Mac mini?!?!? | Wraven | Purchasing Advice | 20 | 2005-01-25 21:25 |
Apple releases updated Power Mac G5s | staph | Apple Products | 43 | 2004-06-09 13:20 |