PDA

View Full Version : Can Knoppix write to NTFS?



Arrummzen
07-02-2004, 11:23 AM
My WindowsXP Pro system died. I know that if I can just overwrite ONE file in ONE location with ONE other file everything will be fine. The problem is, I can't boot Windows. The system recovery console will only let me access the system directorys (I need to overwrite something in the My Documents folder) and all the other tools I have seen will only allow me to read NTFS.

Can I use Knoppix to overrwrite this file?

Thank you for your time,
Arrummzen

arkaine23
07-02-2004, 04:01 PM
Yes, 3.4 version of Knoppix have captive-ntfs which allows for writing to NTFS using a windows kernel and ntfs.sys driver. The captive utility will search your hard d4rive for the windows components it needs or download them out of a windows XP service pack if it can't find them.

Once appropriate files are aquired, to use:

open a terminal and type "su"

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

where x and # are identifiers for the partition you want to mount (odds are its hda1 for the first partition on the primary master drive).

Then you can access the files for reading and writing. Wriiting will actually be queued, and will be done when you unmount the drive with the command-

umount /mnt/hdx#

where x and # are identifiers for the partition you want to mount (odds are its hda1 for the first partition on the primary master drive).

Arrummzen
07-02-2004, 08:13 PM
Will it be able to read an NTFS drive to find and load the files it needs to write?

Thank you for your time,
Arrummzen

champagnemojo
07-02-2004, 09:08 PM
Yes, the captive drivers will read and write.

Arrummzen
07-02-2004, 09:28 PM
How safe is writing NTFS using this method? I heard a while back the the NTFS driver in the 2.6 kernel had a tendency to corrupt NTFS partitions. Is this ture? If so has it been fixed?

Thank you for your time,
Arrummzen

champagnemojo
07-02-2004, 09:59 PM
The NTFS drivers that come with the kernel are not safe for writing. But the captive drivers actually use the same stuff that windows uses I believe...when you run the acquire script it will get the windows drivers if I recall correctly. They are perfectly safe to write with...I've used them before.

Arrummzen
07-02-2004, 10:38 PM
ok, so the procedure is this

0: boot knoppix
1: mount -t captive-ntfs /dev/hdx# /mnt/hdx#
2: Make needed changes, using stanard Linux methods, like cp, rm, mv, vim etc.
3: umount /mnt/hdx#
4: turn computer of
5: remove knoppix CD
6: start Windows.

Is that correct?

EDIT: By the way, do you have any idea what the proper value for x and # would be for the only partition on the only harddrive on a laptop computer?

Thank you for your time,
Arrummzen

j.drake
07-02-2004, 11:40 PM
EDIT: By the way, do you have any idea what the proper value for x and # would be for the only partition on the only harddrive on a laptop computer?

If you are SURE that this is the case, convention would dictate that it should be hda1.

HOWEVER, be aware that many manufacturers (e.g., HP/Compaq) put a hidden recovery partition on the HD, that you may not see in Windows Explorer. On my HP, the recovery partition is hda1 and the "C: drive partition" is hda2. If I were you, I would boot the CD first and look around for drives on the Knoppix desktop, open them, and look around to verify that they are what you think they are. :wink:

jd

j.drake
07-03-2004, 12:00 AM
ok, so the procedure is this

0: boot knoppix
1: mount -t captive-ntfs /dev/hdx# /mnt/hdx#
2: Make needed changes, using stanard Linux methods, like cp, rm, mv, vim etc.
3: umount /mnt/hdx#
4: turn computer of
5: remove knoppix CD
6: start Windows.

Is that correct?

Well, step #2 is pretty broad, and assumes that you have a comfort level with BASH. From what you are saying, I don't know if that's the case or not. There's a link on the forum: http://www.knoppix.net/forum/viewtopic.php?t=2398 ) to a site with a good summary of Linux shell commands - from O'Reilly's Linux in a Nutshell, IIRC. If you get stuck, you can sometimes fake it by sticking the letter "m" in front of a DOS command (if you know DOS).

One other option - if you have your XP disk and another computer that runs, you can go here www.nu2.nu/pebuilder/ and put together a bootable live CD of Win XP. DOn't get me wrong, I love Knoppix, and I don't mean to insult if you are comfortable with *nix shell commands, but given that you are messing around with your core OS in a different file system, if you are new, you might feel a lot more confident using a familiar interface for rescue, and then learning Linux when the pressure is off later.

Oh, and one last option, if you have a floppy drive, get an old DOS boot floppy and boot DOS. If you don't have one, google around to download one. I think www.bootdisk.com has them for free download, but I'm not positive of the site.

jd

Arrummzen
07-03-2004, 12:18 AM
Well, step #2 is pretty broad, and assumes that you have a comfort level with BASH. From what you are saying, I don't know if that's the case or not. There's a link on the forum: http://www.knoppix.net/forum/viewtopic.php?t=2398 ) to a site with a good summary of Linux shell commands - from O'Reilly's Linux in a Nutshell, IIRC. If you get stuck, you can sometimes fake it by sticking the letter "m" in front of a DOS command (if you know DOS).


I run Linux on my two of my workstatiosn and on my handheld orginizer. I use BASH on Windows via Cygwin in place of cmd. So I BASH will be no problem.

I would actualy perfer to use the Preinstall Environment, however I already have knoppix loaded and I have just copyed the files. So its a little late. The only thing I fear is that the captive NTFS driver will mess up and corrupt my data...

NOTE: Do I have to unmount by hand before rebooting or can I just reboot?

Thank you for your time,
Arrummzen

Arrummzen
07-03-2004, 12:45 AM
Thanks for all your help everyone. It worked great. Its all working correctly now!

Thank you for your time,
Arrummzen

07-06-2004, 03:02 PM
You have to manually mount because the action taken when you mount by right-clickng the drive icon on the KDE desktop is to mount with the Linux read-only NTFS driver.

You can just reboot when done and it will unmount the drive. You could also do the right-click method to unmount if you want to continue operating in Linux while the changes are written to the drive.

I have never had any trouble with captive-NTFS. It is using windows' ntfs driver and kernel to do the operations so it seems like it would be perfectly safe. It is a little slow at writing, but slowness is a small price to pay IMO.

Jeff4505
10-10-2004, 05:32 PM
Hi, would someone be able to give me the lines of code needed to do this task ?

I believe I am dealing with the same problem that Arrummzen had. My mup.sys is corrupt from turning the the power off before it had fully shut down, so don't gimme that USB rubbish I have found on google please.

I have fixed this once before (I had another computer with similar specs thank god). But this time I am not so lucky.

I have a working version of mup.sys that I need to copy to my HDD (NTFS partition on a SATA cable). My devices are as follows, sda1 (C Drive), sda5 (My media drive, not needed in this scenario), sda6 (My backup drive, again not needed at this time) and sdb1 (My memory stick that has mup.sys on it).

I have downloaded the needed files from the Captive NTFS program, however, I can't use Konqueror to write, and from reading this topic, it seems I must use a shell.

I am begging someone to tell me what the commands are that I will need to copy from /mnt/sdb1/mup.sys to /mnt/sda1/windows/system32/drivers/

Many many thanks to anyone that writes anything helpful now...

Jeff4505
10-10-2004, 06:24 PM
ok extra bit, I have tried mounting the drive, with the "mount -t captive-ntfs /dev/sda1 /mnt/sda1"

But it just says "Captive NTFS v1.1.5. Check a new version at http://www.jankratochvil.net/"

And then doesn't do anything, I can type extra junk but it doesn't do anything, the drive hasn't been mounted either.

HELP !!!

firebyrd10
10-10-2004, 08:43 PM
ok extra bit, I have tried mounting the drive, with the "mount -t captive-ntfs /dev/sda1 /mnt/sda1"

But it just says "Captive NTFS v1.1.5. Check a new version at http://www.jankratochvil.net/"

And then doesn't do anything, I can type extra junk but it doesn't do anything, the drive hasn't been mounted either.

HELP !!!

First you need to run the captive script, then try and mount it.
To copy issue this

cp /mnt/sdb1/mup.sys /mnt/sda1/windows/system32/drivers/mup.sys

Jeff4505
10-12-2004, 07:21 PM
By captive script do you mean the line that i wrote ?

Or the simple "mount -w /dev/sda1 /mnt/sda1"

Because I've read that that is not the safest thing to do (not use the windows sys files to write to ntfs).

Thanks

firebyrd10
10-12-2004, 10:53 PM
By captive script do you mean the line that i wrote ?

Or the simple "mount -w /dev/sda1 /mnt/sda1"

Because I've read that that is not the safest thing to do (not use the windows sys files to write to ntfs).

Thanks

try apropos captive
and find the captive script that finds the needed files.

vivil
10-23-2004, 03:25 PM
[quote="Arrummzen"]ok, so the procedure is this

0: boot knoppix

ok it's easy ;)

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

hum... and you don't use "captive-install-acquire" ???
in my case

1) i boot with "fb800x600"
2) i click on HDA1 icon to mount my NTFS partition
2) i type "su" to be root
3) i launch "captive-install-acquire" (with root privilieges ;)
4) when drivers is found, i open a new console and i type "su"
5) i type "mkdir /mnt/captive-LABEL_C" (no syntax error because
it's a copy/paste eheheh ;)
6) i type "mount -t captive-ntfs /dev/hda1 /mnt/captive-LABEL_C"
but soft ask me "/dev/hda1/ already mounted" and i can to use "-o force",

and after ?
a) must i use "-o force" switch ?
b) i can use a graphical GUI to do it to navigate in /mnt/ and modify my
or must i type in commandline batch mode "cp, copy, rd and more and more ???"

2: Make needed changes, using stanard Linux methods, like cp, rm, mv, vim etc.

one day i hope to be at this step :X

rickac
12-15-2004, 03:40 AM
I ran

captive-install-acquire

it ran the scan the went away then I ran

root@ttyp0[knoppix]# mount -t captive-ntfs /dev/hda1 /mnt/hda1

and I got this

Captive NTFS v1.1.5. Check a new version at: http://www.jankratochvil.net/

and it just sits there

jjmac
12-22-2004, 08:53 AM
firebyrd10

>>
>> ... captive-ntfs ...
>>

Facinating, am i getting the right drift here,
that this facility will actually safley write to
a mounted NTFS partition under Linux ?

The last time i looked, the kernel only had limited
support for this. An that is in v2.6.9.

The support being limited, to being able to write, but
only as long as the original file size wasn't changed.
So as not to corrupt the multiple meta-data records
that a NTFS maintains in respect to a file entry
in its' system.

As the details of the fs were secret, the
actual number and location of these multiple records
was unknown. Being the main thing holding back
its' open use in Linux.

If this is the case though, is is very "radicle" ...

Could you elaborate a little on it. Iv'e had a
look at:

http://www.jankratochvil.net/project.html

but the info seems a bit scant on this there :)

jm

mike engles
01-06-2005, 01:35 AM
Hello

I have tried all this. Captive NTFS just does not work. I actually put all the searched for files on the Knoppix desktop as well as in the Windows root folder. Knoppix could not find them, or use them.

Mike Engles