PDA

View Full Version : Knoppix NTFS Write is/is not available ?!?



bluewhale
02-16-2004, 02:26 AM
Here is yet another Linux Newbie trying to get around a problem M$ created with open source tools. The problem is in creating a bootable OS which allows for modification of M$ NTFS partitions. I've been reading KNOPPIX FAQ's, posts, notes for two dayz now and believe it will allow me to boot from a CD and either modifiy text files on an NTFS partition or copy/add files to that partition. However the official FAQ's for Knoppix say either that writting to NTFS is not supported or that it is 'experimental'.

Googling provided other opinions which were not limited to the Knoppix distribution.

I AM a semi-virgin with respect to Linux: can barely wade into chest deep water at this point. And am hoping to give myself a crash course on Linux with this project ( yes, I know: Windows crashes, not Linux :P ) I have found info on this at

http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html#write
and
http://www.jankratochvil.net/project/captive/CVS.html.pl#debian

amongst others, but am becoming a little overwhelmed trying to keep track of which programs work with which versions of which distro, etc. Especially in that I still have to translate simple functinality terms in Knoppix/Linux into their Windows counterparts.

For some reason I get the impression one CAN write to NTFS using the latest Knoppix stable release either with an ad-in or not... I'd like to be able to create a new master of Knoppix which would allow me to provide triage to damaged W2K and XP systems, but have not been able to find anything like that here on the forum. Has Knoppix progressed this far, or is this ability still considered ' bleeding edge ' ?

Many Thanks for all of your advice


Paul

softwaretester
02-16-2004, 09:06 AM
There's a couple of knoppix variants which have NTFS write support.

One is bitdefender's linux disk www.bitdefender.com
http://www.distrowatch.com/table.php?distribution=defender

One is called Insert, it's a mini variant (business card size)
http://www.distrowatch.com/table.php?distribution=insert


Mandrake Move might have NTFS writing on their live CD, because they have NTFS resizing tools in their Mandrake Distro.
http://www.distrowatch.com/dwres.php?resource=review-mandrake

bluewhale
02-16-2004, 08:14 PM
I'll check them out.
I've read that Knoppix 3.4 might support NTFS writes, and that it was due out about now. Anyone have any thoughts on this? Would it write to all versions of NTFS ( I believe Win 2003 Server introduced a new version but am not certain ).

Razor-X
02-16-2004, 09:45 PM
Knoppix 3.4 can write on NTFS. I haven't tried it (don't wanna take a chance on this comp) but on a damaged system, go ahead. It uses captive which works on all W2k and XP drives ONLY. These contain special system files which define the NTFS partition scheme and such. Captive uses these to write to the disk. Good luck aquiring v 3.4

arkaine23
02-16-2004, 10:06 PM
You should be able to get a modified 3.4 version from me tomorrow. I'll be sure to post a link for you when its available.

Getting ahold of 3.4 can be kind of difficult, but my host has alloted me plenty of bandwidth, so you should have no trouble once I get my iso uploaded.

bluewhale
02-16-2004, 11:29 PM
Thanx Razor, Arkaine. I'll try it first on a couple of standby Educational PC's we keep for occasional classroom type instruction, then see what it does to an XP installation.

You said it uses 'captive'... is that a variation of the Wine software mentioned above?

And as it was not listed I presume the version of NTFS in W2003 is out. Not that we run it ( tho I have a test server set up at home: hmmmm :twisted: )


Paul

arkaine23
02-16-2004, 11:55 PM
Captive will let you import the needed windows kernel and drivers for windows filesystems and wrap them so that Linux can use them. If you can't import them, it will download them from windowsupdate.com out of the XP service pack 1.

Once captive drivers are aquired, you just have to mount your NTFS partition-

mount -t captive-ntfs /dev/hdXX /mnt/hdXX

I'm pretty sure it would work on Win2003 since that's essentially winXP server edition.

Razor-X
02-17-2004, 12:33 AM
It works for W2k3 Server.

bluewhale
02-17-2004, 03:13 AM
Pardon me for being totally dense ( LINUX?? )
Is ' Captive ' a program... er RPM ... or something built into the LINUX Kernel?

In Knoppix ( what is the appropriate abbreviation for Knoppix? K? Kn? ) 3.3 I presume (?) Captive does not exist. Could one of you point me/us toward a URL which explains where this ' new ' ability comes from? If its third party and they make a living from it I generalliy like to pay for my shareware. IF not, then Linus T. must have blessed it, thus I can ignore it as it will probably work as planned. :lol:



Paul, a'waiting the 3.4 download with baited breath

softwaretester
02-17-2004, 08:29 AM
Pardon me for being totally dense ( LINUX?? )
Is ' Captive ' a program... er RPM ... or something built into the LINUX Kernel?

In Knoppix ( what is the appropriate abbreviation for Knoppix? K? Kn? ) 3.3 I presume (?) Captive does not exist. Could one of you point me/us toward a URL which explains where this ' new ' ability comes from? If its third party and they make a living from it I generalliy like to pay for my shareware. IF not, then Linus T. must have blessed it, thus I can ignore it as it will probably work as planned. :lol:



Paul, a'waiting the 3.4 download with baited breath

Here's how it works on BitDefender.
Click on the 'Captive NTFS' icon on the desktop.
An application runs, scans your drives, or in my case, my USB storage key. It gets the cdfs.sys ntfs.sys ntoskrnl.exe and a coule of other .sys files. Then, when I mount /mnt/hda1 it can read and write that NTFS drive.

You can also use QTparted to resize the NTFS partitions as well.

Razor-X
02-17-2004, 06:21 PM
On v3.3 of Knoppix(Knx for short) captive (a program) is not included. Only the experimental 3.4 edition has it. I don't know whether I should just go back to v3.3 since this one has no gtk-qt theme, and the v2.6 kernel does not have a tulip module.

bitey
02-17-2004, 06:39 PM
I've been trying captive NTFS with the new c't Knoppix 3.4. So far, no luck.

I finally got the search routine to find the ntfs.sys and ntoskrnl.exe files by manually copying them into /var/lib/captive, and I was able to mount the drive using the "mount" command in a root shell. I specified the captive ntfs file type in the mount command. I could then read the drive, but couldn't write to it.

Has anyone else had experience with this? If I can get captive working when running from the CD, it will be great for fixing crashed XP boxes.

bluewhale
02-19-2004, 06:25 PM
Arkaine23, or anyone else :D

Has anyone been able to get a copy of 3.4 yet? From what I can find it may not be out for another month or more. ??

Thanks again

Paul

garyng
02-19-2004, 07:19 PM
the captive system sounds interesting but just keep an eye on the license issue as it makes use of Microsoft stuff. So, the ntfs.sys etc. should never be in any distribution and in order to use it(say for rescue), the distribution would need the linux ntfs driver(in order to read NTFS) then find the necessary files on the harddisk and mount again with capture using the MS drivers.

arkaine23
02-19-2004, 08:51 PM
Modified 3.4 cebit version is going up on the overclockix site today and will be finished uploading tonight. I have not tested captive NTFS yet. At first I included the drivers on the CD, but then thought better of it and removed them. You can import them, or download them using the captive-NTFS tool.

http://overclockix.octeams.com

Announcement will go on the site later tonight and download link will appear around 8 or 9 pm CST. This is still a beta version.

bluewhale
02-19-2004, 09:49 PM
Thanks for the link! I'll get in line tonight.


Paul

bluewhale
02-20-2004, 04:49 PM
I've no doubt you are swamped now, but thought to ask if you get a momemt free :?

I've been unable to download from the link on your web site, tho the other two files there will download thus I don't believe it's a bandwidth or cumlative byte limitation. Is the link really down?

Also you indicated you were going to remove the NTFS write components but that we could download them seperately. Would I just go to the Captive web site and grab that offering? I'm trying to ( of course :roll: ) get as stable a product as I can to play with and wanted to get the same component which Knx 3.4 will have when it comes out next month.

Thanks for all your help.

Paul

arkaine23
02-21-2004, 02:48 AM
There was a typo in my link, and it's been fixed. However I did catch a few bugs with the kmenu and kicker icons, so I'm uploading another iso overnight and will change the link around noon CST. If you prefer using KDE, then you might want to wait until tomorrow.

The way captive works is- click on the link for Captive NTFS from the menu. It searches your filesystem for the windows drivers and kernel, and if it does not find them prompts you to import them from a removable media or download them out of Win XP service pack1. it will do this connection automatically and grab the files, saving them to ramdisk (where they take up about 3.5 mb).

Then you'd need to manually mount your NTFS partition using -t captive-ntfs as in this example command-

mount -t captive-ntfs /dev/hda1 /mnt/hda1

bluewhale
02-23-2004, 02:13 AM
Arkaine:

I was able to get the image however see today that all downloads are off line. Were you the only one who offered this BETA? Even if only the 600 or so who have viewed this thread went to grab the file it still would be a strain... if you accept donations to help with the overhead of your site send me a private email and I'll do my small bit ( no, not song and dance :lol: ). I appreciate your efforts and the time spent..

Paul

arkaine23
02-23-2004, 06:38 PM
My host maxed out after just 24 hours. We are now sharing the files on Bittorrent. However the latest iso's have not been seeded yet.

My dev team is helping me out to get these things out there. I am moving this week so I'll try to get a bugfix release up tonight, but there may be some delays for the rest of the week.

I will try to get the links on my site changed today and post a notice about the use of bittorrent.

bluewhale
03-01-2004, 01:34 AM
Hello to anyone still listening <g>

While my copy is the original one Arkaine23 released ( am downloading the latest from Planet Mirror as we, er, type ) once up and onto the web I ran the Captive NTFS program. It performed a search for usable files both in the Knoppix virtual HD as well as the W2K Server partition on this machine. It appeared to come up empty, however shut that program down immediately and said nothing further thus I'm unsure what it found and also about the programs status.
I don't know if the fact that I have to assign the IP info manually is part of the problem or not ( i don't believe in DHCP, which works out well as I work only on small networks... > 50 users usually ) I tried removing the ' read only ' check mark from the hard drive mount both before and after running Captive NTFS, and still am unable to copy a text file onto the NTFS partition.
Am I missing a step? 100 steps? A helicopter ride?
I am writing a tiny, intro SANS practical on this topic, and was hoping to be able to provide cutting ( NOT bleeding! ) edge info of use to others who maintain MS boxes, but have only a week left. I would like to be able to boot to three different MS boxes and interact with NTFS ' cleanly ' and report the same tho without any warranty that NO damage was done to the NTFS tables..... But perhaps my timing is just a little premature. < gasp! Sob... :} >
Any info on getting this pre-release, semi solid BETA to function for this purpose : I'll wish pizza at you daily for a month. It just doesn't get much better than that.

Thanks again for any assistance


Paul

arkaine23
03-01-2004, 07:54 PM
If it does not find the files locally, it should grab them from an XP SP1 download. So verify that you are connected to the internet from the CD.

bluewhale
03-02-2004, 04:10 AM
verified each time by going to a web site I knew then one I guessed up ( like www.bark.com or something silly but likely to exist ).

Today I burned the ' latest ' copy of the software from Planet Mirror. The file name was the same as the version I downloaded the first day from your own site, but I burned it anyway and tried it. Same result: after manually setting the NIC I browsed the web, then tried Captive NTFS. Same result: it found nothing then closed with no messages of any kind. Then I tried placing an XP Pro SP1 into the other CD Drive. Captive NTFS then found all files save the second one: a LINUX file extension control (?) file which it stated was optional. ( for some reason I had presumed Captive NTFS would fine the files it wanted on the W2K Server ( or advanced server ) partition on the PC... or is it set to ONLY accept the latest NTFS as used on XP and W2003 Server?? )

Once it was done searching it again closed the box without saying anything. I again copied a text file out of the W2K Server partition, to the desktop, then tried to copy it back to HDA1. Could not write it.

I was able to pull up a MAN page for the program. However to me MAN pages show you how to add command line switches to make a program do certain things. I looked for instructions in the MAN page: perhaps there are parameters I need to change in the GUI before actually telling Captive NTFS to run? But did not see anything that registered that way to me.

I THINK Captive NTFS might be working, but that I do not have sufficient knowledge about LINUX to use it. If so, could you briefly advise what baby steps I'm missing? I will have to fill in all of the blanks when I start work on making my own version for our office with Captive NTFS as well as other presets configured to allow people to pop a CD we create into any PC with access to DHCP and the web and work securely from that location. For now I want to see it work, and say ' see, it worketh! '. :}

Thanks

Paul

arkaine23
03-02-2004, 06:19 AM
you can

ls /var/lib/captive and see if the drivers are there

I think in that first beta, I may have included them on the CD.

In which case what should work is-

mount -t captive-ntfs /dev/hdx# /mnt/hdx#

Finally finished moving, so I'm putting a new iso up tonight. I haven't tested it yet so don't go rushing out to download it just yet. It's dated 2_29_2004.

acid_zebra
03-04-2004, 01:09 AM
I got it working like this:

1. find and print out one of the many guides on remastering knoppix out there (I used www.linuxgazette.com/issue87/sunil.html which is pretty old but does the job for me)
2. once you have a KNOPPIX folder and a swap partition on your HD, and have chroot'ed into it, download the .deb packages found on here: http://www.jankratochvil.net/project/captive/CVS.html.pl#debian
3. remove old ntfs tools: apt-get remove libntfs5 ntfstools ntfsprogs and answer yes to any questions
4. install the downloaded captive files: dpkg -i *.deb (from the folder you put them in)
5. I couldn't find a valid kernel source for Knoppix, but it must be because I am lazy... I installed kernel-source-2.4.24 (the vanilla version)
6. edit the Makefile in /usr/src/linux, change EXTRAVERSION = to EXTRAVERSION = -xfs
NOTE: if you really want to compile the kernel or something DO NOT DO THIS, this is only for the module installation
7. make sure the needed windows files are available (ntoskrnl.exe ntfs.sys and (optional) fastfat.sys, grab them from a windows box
8. run captive-install-acquire (you will get some complaints about non-existent /etc/fstab and the program will crash at the end but by then you will already have the drivers)
9. run /usr/share/lufs/prepmod to automatically compile the driver, or mount any NTFS partition to start the building: mount -t captive-ntfs /dev/hdX /mnt/hdX

(OPTIONAL)
10. need to modify the /usr/sbin/rebuildfstab:


case "$fstype" in
ntfs) options="${options},ro,umask=000" ;;
vfat|msdos) options="${options},umask=000" ;;
swap) options="defaults" ;;
esac
case "$fstype" in
ntfs|vfat|msdos)
[ -n "$user" ] && options="$options,uid=$user"
[ -n "$group" ] && options="$options,gid=$group"
;;

should become something like


case "$fstype" in
ntfs) options=" " ;;
vfat|msdos) options="${options},umask=000" ;;
swap) options="defaults" ;;
esac
case "$fstype" in
vfat|msdos)
[ -n "$user" ] && options="$options,uid=$user"
[ -n "$group" ] && options="$options,gid=$group"
;;
case "$fstype" in
ntfs) fstype="captive-ntfs" ;;
esac

NOTE: this is a really ugly hack and will only allow root to mount NTFS partitions read/write... I still need to figure out what mount options this captive thing will support... if anyone knows how to allow mounting as user knoppix you'd make me a happy man :)

(CLEANUP) clean out the kernel sources and the downloaded .deb files

done... granted it's not for the total newbie but then again you are working from a CD (read-only environment) so you can always start over...I know I did ;)

arkaine23
03-04-2004, 01:17 AM
See if this works-

make a mountpoint and run the mount command as knoppix-

like

mkdir /home/knoppix/Desktop/windowsdrive
mount -t captive-ntfs /dev/hdaX /home/knoppix/Desktop/windowsdrive

bluewhale
03-04-2004, 01:58 AM
I've printed out the work around to look at as I learn more of LINUX, but thought to d/l the latest beta today. I found that the file ( Beta 2 ) is still available at Planet Mirror but could not find an updated version. I followed the link to Bittorrent however a user account and PW is required.
I've heard reference to Bittorrent: I thought it was just a protocol for faster downloading? I tried to register at the site the link on overclockix.octeams.com points to however found no way to do so.

Sorry to be a PITA :( : How do I obtain access to the linked site so that I can d/l the latest version?


Paul

arkaine23
03-04-2004, 02:17 AM
The latest one turned out to be broken pretty badly so I have not allowed downloading nor posted it anywhere.

It's been hard for me to work on it the last week because my computers are not hooked up and I have no net connection at home. I moved my remastering box to the place where I work and I can still build iso's, but its difficult for me to test them. I may get another update in tomorrow night, and hopefully it will fix the issues with KDE's menu I've been having.

bluewhale
03-04-2004, 03:03 AM
Yo Dude.

I be a weenie LINUX tech, but grey haired for Billies fabulous windoze world. Can I help in some way? Boring stuff is us/me. You're knocking yourself out and I'm benefitting from it.
How can I halp?

Paul
pt@jaxkneppers.com