Linux Mint screwed up my memory card

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Linux Mint screwed up my memory card

Postby the_punisher on Fri Sep 05, 2008 2:19 am

I connected my 1 gb memory card which i use in my nokia e61 to linux mint, it read all the files properly, but it screwed up all my data.

i created a folder there named 2, when i opened that folder in my phone it had another folder of the same name in it, and inside that another folder of the same name and the cycle goes on forever.

also it deleted everything in my card, all the images, videos and songs, it just got deleted without any warning :( :'( :x
User avatar
the_punisher
Level 2
Level 2
 
Posts: 71
Joined: Tue Aug 26, 2008 2:28 am

Linux Mint is funded by ads and donations.
 

Re: Linux Mint screwed up my memory card

Postby Husse on Fri Sep 05, 2008 8:32 am

Fiorst off - don't do anything that can change the content....
Second - search for programs that can save deleted files - there is a bunch and they can mostly take care of such units
The risk is that it has been overwritten..
Not sure what happened, but the name 2 might play a part....
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Linux Mint screwed up my memory card

Postby AK Dave on Fri Sep 05, 2008 12:30 pm

the_punisher wrote:I connected my 1 gb memory card which i use in my nokia e61 to linux mint, it read all the files properly, but it screwed up all my data.


Did you properly UNMOUNT the memory card before you yanked it from your computer?

Here's the thing. You crammed the memory card into the multi-slot of your computer and Mint says "ooooh, new hard drive! lets mount it!" and proceeds to mount the memory card as a hard drive. So when it read files, it modified said files as having been "read". Which requires writing to the card. So its doing a lot of read/write activity. Except that the reads and the writes are being caches. So unless you UNMOUNTed the card before pulling out, the cache got dumped randomly.

Here's the good news:
1. It was only 1gb.
2. You had a backup, right?
3. You can get a 16gb card for cheap.
User avatar
AK Dave
Level 6
Level 6
 
Posts: 1042
Joined: Wed May 14, 2008 3:39 pm
Location: Anchorage, AK USA

Re: Linux Mint screwed up my memory card

Postby the_punisher on Fri Sep 05, 2008 2:05 pm

No i did not have any backup, but the thing that disturbed me more than my data being lost was the strange behavior of linuxmint, like why did it do this?

Dave, you are right, i did not unmount the drive, i just pulled it out.

I always do this in windows and knowing that card readers have the ability of hot swapping as many new phones, you do not have to select safely remove the cards in windows before removing them. this is how i always did in my windows.

so what i can gather is the reason, mint acted this way was because i did not unmount? and if i unmount in the future it will not do this again?
User avatar
the_punisher
Level 2
Level 2
 
Posts: 71
Joined: Tue Aug 26, 2008 2:28 am

Re: Linux Mint screwed up my memory card

Postby GrayWizardLinux on Fri Sep 05, 2008 2:32 pm

i do it all the time transfer stuff between my macs and the linux thinkpad. Never an issue.
Linux Mint - Pure Bliss!
User avatar
GrayWizardLinux
Level 6
Level 6
 
Posts: 1240
Joined: Wed Sep 12, 2007 5:47 pm
Location: Anywhere I Am!

Re: Linux Mint screwed up my memory card

Postby AK Dave on Fri Sep 05, 2008 4:21 pm

I've had SD cards and flash drives both go bonkers in BOTH linux and windows for failure to properly eject/unmount the device before pulling out. I even once corrupted an ipod that I was using as a large file storage device. Not every time. Only when it was important and I was in a hurry. But in a hurry is the time to worry about this the most, because depending on system load it can take agonizing seconds-to-minutes for cache to flush on its own.
User avatar
AK Dave
Level 6
Level 6
 
Posts: 1042
Joined: Wed May 14, 2008 3:39 pm
Location: Anchorage, AK USA

Re: Linux Mint screwed up my memory card

Postby Linux n00b on Sat Sep 06, 2008 8:37 am

the_punisher wrote:Dave, you are right, i did not unmount the drive, i just pulled it out.

I always do this in windows and knowing that card readers have the ability of hot swapping as many new phones, you do not have to select safely remove the cards in windows before removing them. this is how i always did in my windows.

so what i can gather is the reason, mint acted this way was because i did not unmount? and if i unmount in the future it will not do this again?


Well, it is not true that it is fine to do it under windows. You will run to problem soon or later if you don't "safely remove" USB/SD card/etc. The issue is not Linux specified, but I will try to explain it as best as I know.

If you only read data from removable source (eg. external hard drive, sd card), it does not matter since no data has been changed. However, if you write data on it, you will need to make sure the data has been written properly. The reason is as AK Dave stated, sometimes the data was cached before written and it may not finalise the operation until the time you 'safely remove" (windows) or unmount (Linux). If you use Vista, it specified to ask you always "safely remove", otherwise it will try to run a scan everytime you connect the removable device (it even does this if you've used the same device under XP, Vista doesn't trust anything, not even its "old bro").

I'm not expert on how exactly Linux cache the data, but I did noticed that Linux does data transfer much faster than Windows (based on my personal experience only). I suspect Linux handles data cache much more efficient but relays on more data write back. Vista may not cache data as the same as Linux, but you will lose your data if you don't "safely remove" first. I know people who learned this hard way.
The difference between genius and stupidity is that genius has its limits.
-- Albert Einstein
User avatar
Linux n00b
Level 3
Level 3
 
Posts: 144
Joined: Sat Jul 05, 2008 9:55 am

Re: Linux Mint screwed up my memory card

Postby Husse on Sat Sep 06, 2008 10:37 am

Yes you are right - you must unmount/do safe remove (depending on OS)
I assumed this was done....
Concerning the folder name as I mentioned it before - a long time ago (in windows) someone had a funny result from naming a folder this way - can't remember what as I've done support for Windows and seen a lot of oddities
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], chetvaldes, Dt31, Google [Bot], Lemuel111, mjurban and 42 guests