Page 1 of 1

File corruption problem - serious one

Posted: 13 Mar 2014, 21:02
by chosenbygrace
To my horror I noticed that after having moved some webpages I downloaded and few images to an SD card, that they disappeared or never made it to the card even though they were no longer on the desktop (I'm using Port live 32 bit with KDE). Then I noticed a very important text file I made, since it involved police harassment and an unlawful condemnation of my house, had become corrupted. Port. couldn't fig out what to open it with and when I used the typical Kwrite or whatever it was it opened up as a bunch of bizarre characters. This has only happened to me maybe once or twice in windows since using it all the way back in 98, and I noticed when using Ubuntu, that an entire back up folder to an external drive became unreadable, and using gnuddrescue is an incredibly difficult task, and despite me watching a (inadequate) tutorial on youtube, so I still have not been able to access that folder, and since windows keeps getting messed up on me (not due to windows being at fault entirely) I can't repair the folder. Just trying to install ddrescue is a pain btw, because there's only one source and it's somewhat hard to find and you have to learn that it's now "gnurescue" or whatever and then find that.

So what's with that? That is a serious flaw if Linux is much more likely to cause file corruption than Windows and makes me want to get back to using Windows asap before some serious data corruption happens again, that may even ruin me since at the moment, I only have one back up of all my precious years of work.

Re: File corruption problem - serious one

Posted: 14 Mar 2014, 00:01
by brokenman
If you need help you're going to need to provide more information. How did you copy the files? What was the file format copying to and from? Can you provide a sample of the corrupt file?

For the record I have been using linux for MANY years and have never experienced corruption of files.

Re: File corruption problem - serious one

Posted: 14 Mar 2014, 03:50
by chosenbygrace
brokenman wrote:If you need help you're going to need to provide more information. How did you copy the fi[l]es? What was the file format copying to and from? Can you provide a sample of the corrupt file?

For the record I have been using linux for MANY years and have never experienced corruption of files.
How did I copy them lol? What other way is there? Right click blah blah! The file format??????? A TEXT FILE! And the other folder when using ubuntu contained files made on ubuntu, no special magic files, just ordinary stuff, images and htm stuff.

And no I can't provide a sample, I overwrote it with the back up.

Re: File corruption problem - serious one

Posted: 14 Mar 2014, 03:53
by chosenbygrace
There is another possibility about the SD card, I remember some people on Amazon complaining about bad SD cards, perhaps something went wrong in the card itself. But on Ubuntu, the problem folder was a seagate harddrive.

I was wrong about windows not corrupting stuff often, I remember now that if you get a bad copy of windows or use a pirate version or have bad hardware that causes sudden shut downs, it can cause drive errors, as in mess up the data on it or mess up windows itself so that it won't start, as happened to me a many times.

Re: File corruption problem - serious one

Posted: 14 Mar 2014, 11:20
by brokenman
How did I copy them lol? What other way is there? Right click blah blah!
I can think of 5 ways to copy a file. "Blah blah" was not the more specific information i was hoping for. I don't think this is going anywhere.

The file format??????? A TEXT FILE!
I should have said the file system.

Re: File corruption problem - serious one

Posted: 14 Mar 2014, 11:36
by fanthom
could be due to delayed writes we have enabled by default (Porteus is commonly installed on flash devices). our default flags are:

Code: Select all

user,noatime,nodiratime,suid,dev,exec,async
so you may try mopt cheatcode to change them:

Code: Select all

mopt=user,atime,diratime,suid,dev,exec,sync
mind this:
click
and this:

Code: Select all

sync   All I/O to the filesystem should be done synchronously. In case of media with limited number of write cycles (e.g. some flash drives) "sync" may cause life-cycle shortening.
more info:

Code: Select all

man mount
if you dont want to change default flags then do not unplug device till everything is dumped on it, or run 'sync' command as root, or use 'safe unmount' offered for example by KDE4.