|
Homepage: webng.com/linuxhelp from Linux using Captive-FUSE (Update). We should all thank Jan Kratochvil for the time and effort he has put into making Captive work. Captive is software that allows you to read from, and write to, Windows partitions formatted with Microsoft's New Technologies File System (NTFS). Visit his site. Send him email. Offer him work. Read more about Captive. A big thanks should also go to those developing FUSE (Filesystem in User Space). This is an updated version of this article. Novell SuSE 10.0 is a free download from one of the mirrors listed here (5 CDs or 1 DVD). Although labeled evaluation, this is a fully functional version (identical to that sold packaged with manuals and limited installation support) which does not expire. OpenSuSE 10.0, is a subset of Novell SuSE 10.0 (it is missing various commercial packages like Acrobat Reader). For a review of SuSE 10.0, see tuxmachines.org. We assume this setup. You have Windows XP/2000/NT installed on a partition that has been formatted with Microsoft's New Technologies File System (NTFS). You have Novell SuSE 10.0 Linux installed on one of the other partitions. You wish to be able to read and write to Windows XP/2000/NT from your SuSE 10.0 partition. You should update your Windows XP partitions with service pack 2, as Captive needs to find recent versions of the following files (the MD5s of the service pack 2 versions of the files are included to uniquely identify them): cdfs.sys cd7d5152df32b47f4e36f710b35aae02 ext2fsd.sys 39af1cc9b68c662d29b05547342546c7 fastfat.sys 3117f595e9615e04f05a54fc15a03b20 ntfs.sys b78be402c3f63dd55521f73876951cdd ntoskrnl.exe ce218bc7088681faa06633e218596ca7 If you have a Windows 2000 or NT partition you may have to borrow these files from a friend. As always: USE THESE INSTRUCTIONS AT OWN RISK. After compiling FUSE and running Jan's script to install his pre-compiled Captive binaries, I was able to mount/unmount my Windows XP (service pack 2) NTFS partition read/write. However, on rebooting, the NTFS partition was not automatically mounted (or unmounted on shutdown). Since the boot init script was written for Fedora Core 4, it was not surprising that it did not work for SuSE. I dug around to see why the init script did not work and rewrote it. Consequently, it was necessary to make adjustments to Jan's install and uninstall scripts. The adjusted scripts are named install-SuSE-1.1.7.txt and uninstall-SuSE-1.1.7.txt. The .txt suffix of the scripts is only necessary to upload the files to the server. So, let's begin: Download fuse-2.5.2.tar.gz from http://fuse.sourceforge.net/ captive-static-1.1.7.tar.gz from http://www.jankratochvil.net/ install-SuSE-1.1.7.txt uninstall-SuSE-1.1.7.txt and save them in a directory of your choice. I chose to save them in /tmp For general compilation, make sure you have at least the following SuSE packages installed. gcc (4.0.2_20050901-3) libgcc (4.0.2_20050901-3) glibc (2.3.5-40) glibc-devel (2.3.5-40) glib2 (2.8.1-3) glib2-devel (2.8.1-3) gcc-c++ (4.0.2_20050901-3) libstdc++-devel (4.0.2_20050901-3) kernel-source (2.6.13-15) The above are sufficient to compile the FUSE programs. Continuing,... cd /tmp tar -xf fuse-2.5.2.tar.gz cd fuse-2.5.2 ./configure The configuration script finds that a FUSE module is already present and that it is from the official kernel. Hence, it does not build (another) kernel module. make make install Configure and make can be run as a user, but you need to be root to install the FUSE programs. cd /tmp tar -xf captive-static-1.1.7.tar.gz mv install-SuSE-1.1.7.txt uninstall-SuSE-1.1.7.txt captive-static-1.1.7 cd captive-static-1.1.7 ./install-SuSE-1.1.7.txt During the installation, the script install-SuSE-1.1.7.txt mounts your NTFS partitions and searches for the above mentioned Microsoft Windows files. On finding them it saves them to /var/lib/captive (if the script does not find them, as in the case of Windows 2000/NT, it is possible to just copy them to /var/lib/captive): Now you can mount your Windows NTFS partition with: modprobe fuse mount -t captive-ntfs /dev/hda1 /C or just mount /C The script install-SuSE-1.1.7.txt installs a boot init script /etc/init.d/captive. It also creates a directory for each NTFS partition (/C, /D, /E,... etc) and entries in /etc/fstab that are read by captive when mounting your NTFS partitions at boot. Captive can also be used to mount or unmount your NTFS partitions manually, by entering: /etc/init.d/captive start /etc/init.d/captive stop On rebooting, your Windows NTFS partitions should be mounted automatically, and unmounted on shutdown. If, as is likely, your NTFS partitions are being automatically mounted using the old ntfs kernel module, see the comment below. To see whether the above setup with Windows XP, would also allow writing to a stock Windows 2000 installation, I installed Windows 2000 on a spare partition (after this, I had Windows XP, Windows 2000 and SuSE 10.0 all on the same hard-drive). I found that, as expected, Captive worked with Windows 2000 just as it worked with Windows XP. To see if Captive would install with Windows 2000 (that is, to see if the Windows 2000 variants of the above files would suffice to get Captive working) I deleted the Windows XP partition (so that the install program could not find the XP-versions of these files) and repeated the above installation procedure, with Windows 2000 replacing Windows XP. The installation failed (as Jan's web site had led me to believe it would). But it only failed because it could not find sufficiently recent editions of the above mentioned files. After copying the XP (service pack 2) files to /var/lib/captive and rebooting, everything worked fine. A capable alternative to Captive-FUSE is the NTFS-FUSE collection of programs. You can find out more about it here: http://linuxhelp.150m.com/win/ntfs.htm During the installation of SuSE 10.0, it is arranged that your Windows NTFS partitions will be mounted at boot and unmounted on shutdown. The interaction with NTFS is by the kernel module ntfs. The kernel module ntfs reads NTFS partitions fine and is supposed to have a limited write capability, however, I have never seen anyone actually using it for writing. The mounting is determined by entries in, /etc/fstab, something like: /dev/hda1 /windows/C ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0 /dev/hda2 /windows/D ntfs ro,users,gid=users,umask=0002,nls=utf8 0 0 If your NTFS partitions are mounted at boot with the (essentially read only) ntfs kernel module, then comment them out (add a # at the beginning of the line), or delete them, so that they will not be mounted at boot. If they are already mounted, then unmount them with the command # umount /windows/C /windows/D You can mount NTFS partitions manually using the ntfs kernel module by entering: # mount -rw -t ntfs /dev/hda1 /1 In any case, if you wish to write to your NTFS partitions, forget about the kernel module ntfs. It is useless (for that). Of course, there is yet another (somewhat circuitous) way of writing to an NTFS partition. You simply create an extra windows partition formatted with the Windows VFAT file system (you can install a copy of Windows 98 (or 2000/XP) on this partition if you wish). Linux has good read/write access to VFAT partitions. You copy your files from Linux to the VFAT partition and then use Windows to copy them from there to the NTFS partition. Some MD5's: fuse-2.5.2.tar.gz ea565debe6c7486963bef05c45c50361 captive-1.1.7.tar.gz 34312cd854ca992f0daf0a8faabaae9a install-SuSE-1.1.7.txt e32e74e6fccfbcec3218e3159cc8dbd1 uninstall-SuSE-1.1.7.txt 847b34f4699e82e71110ad031cfffb55 |