LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 02-03-2012, 11:24 AM   #1
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware (current), Mepis on the wifes lappy
Posts: 580

Rep: Reputation: 61
Why does saving downloads to a Windows partition cause them to become corrupt?


Hi all,

I have been struggling to set up a chat room server on the ISP's server that I use. Have succeeded now, but during the many failed attempts, it transpired that downloading the PHP scripts to my Windows partition, and then Ftping them up to the server caused lots of corruption within a lot of the php files. Only found out by chance really as it was the only reason I could think of that was causing so many PHP scripts to fail with consistent errors. At first I though it may have been gFtp causing it, but previous uploads have been fine.
Anyway, I downloaded the PHP script I wanted to use for a chat room, saving to my Linux partition, Ftp'd them to the ISP and it worked first time.
Now bothered as I have loads of downloaded programs of one way, shape or form saved in a Windows partition, including loads from SBOPKG, and loads of self compiled stuff.
So finally to the question then, just how corrupt might these programs be, and if they are does it mean downloading and compiling them all again, or is there a way to repair the damage?

Cheers
 
Old 02-03-2012, 12:16 PM   #2
millgates
Member
 
Registered: Feb 2009
Location: 192.168.x.x
Distribution: Slackware
Posts: 332

Rep: Reputation: 118Reputation: 118
It's just a guess, but cannot the reason be that ftp is trying to automatically convert the newlines between windows/unix formats? Does the same happen if you download the files as binary?
 
Old 02-03-2012, 12:49 PM   #3
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware (current), Mepis on the wifes lappy
Posts: 580

Original Poster
Rep: Reputation: 61
I suppose that might be possible. I have checked some of the files on the Windows partition, and there is definitely a suspicion of corruption in them. Looks like I'm going back to my Linux partition in future.
 
Old 02-04-2012, 01:13 AM   #4
wainamoinen
LQ Newbie
 
Registered: Sep 2009
Posts: 1

Rep: Reputation: 0
The reason could be that the last time you used Windows you hibernated it. Windows keeps a in memory some parts of the state of the filesystem, diretories, open files, etc. If you boot Linux and write on that filesystem and then reboot with Windows, the state of the filesyste will be corrupted.

This could happen in the other way, you hibernate on Linux and after that you boot with Windows and write on the partition.

The solution is never to use hibernation if you are rebooting with a different OS.
 
Old 02-04-2012, 01:06 PM   #5
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware (current), Mepis on the wifes lappy
Posts: 580

Original Poster
Rep: Reputation: 61
Haven't used Windows for about 6 months, and never hibernated it. Just happen to have a windows partition as the laptop has 2 drives and never got around to doing anything with the second one except use it to store downloads on, hence the use of that particular partition type.
 
Old 02-04-2012, 06:02 PM   #6
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 168

Rep: Reputation: 10
What FS do you have on your file partition? I don't think FS kernel driver corrupts any data, but for just in case. Only source and software which is created those scripts can be guilty.
Quote:
and there is definitely a suspicion of corruption in them.
Can you describe what so suspicious you saw?
Line ending style doesn't influence work of PHP.(it was long time ago and it is so now I hope).
 
Old 02-04-2012, 07:38 PM   #7
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-current
Posts: 325

Rep: Reputation: 117Reputation: 117
Quote:
Originally Posted by wainamoinen View Post
The solution is never to use hibernation if you are rebooting with a different OS.
This should not be a problem, Windows stores the system state in C:\Hiberfil.sys and only if this file is modified would anything go wrong.
 
Old 02-06-2012, 02:17 AM   #8
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,486

Rep: Reputation: 62
Actually earlier version of the ntfs-3g driver wouldn't even mount a windows drive if it were hibernated due to corruption.

But we don't know what version of Slack he's using. We don't know if he's using ntfs-3g or just ntfs support.

There's simply not enough info to know why he has corruption.

But I can confirm that *yes* indeed you can write to a hibernated winxp machine, and have data corruption with ntfs-3g with a version released as little as a year ago in my experience.
 
Old 02-07-2012, 02:46 PM   #9
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 161

Rep: Reputation: 11
Quote:
Originally Posted by Old_Fogie View Post
There's simply not enough info to know why he has corruption.
There is not even enough info to know THAT he has corruption. He just has a suspicion. I mean, how hard can it be to compare three version of the same file and ascertain precisely which ones are different???

If you don't know with which file to start, start by fingerprinting whole directories using md5sum.
 
Old 02-07-2012, 05:26 PM   #10
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,575

Rep: Reputation: 97
NTFS is a proprietary filesystem.

While support for it has come a long way over the past few years, I would try to avoid writing to it from within Linux if you need the result to be 100% free of corruption.

FAT is a better option if you want to be able to write to it from Linux, but I don't think Windows provides this option any more.
 
Old 02-07-2012, 06:08 PM   #11
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 1,376

Rep: Reputation: 128Reputation: 128
so far, i've been writing and copying data from NTFS and no problem at all using ntfs-3g
 
Old 02-07-2012, 07:31 PM   #12
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,575

Rep: Reputation: 97
Quote:
Originally Posted by willysr View Post
so far, i've been writing and copying data from NTFS and no problem at all using ntfs-3g
Me too, but I wouldn't bet the farm on it.

The specifications of NTFS are closed, so all development in this area is the result of 'reverse-engineering' and figuring out what works by trial and error. The results are pretty good, but nowhere near as safe (from a mission-critical standpoint) as a native Linux filesystem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Why would privoxy corrupt software downloads? Ulysses_ Linux - Networking 1 06-14-2011 02:35 PM
Saving Update Downloads rnturn Suse/Novell 2 08-15-2007 09:29 AM
Saving files to windows partition tinfalco Ubuntu 3 07-03-2007 07:32 PM
After reformatting Windows partition, Linux is corrupt and won't boot. JakeMH Linux - Software 3 05-31-2005 05:35 PM
Will I corrupt my Windows partition... nostrum Linux - Newbie 3 06-22-2004 09:21 PM


All times are GMT -5. The time now is 07:00 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration