LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-14-2014, 05:11 AM   #1
Angelo_d'Cuore
Member
 
Registered: Aug 2014
Location: Johannesburg, South Africa
Distribution: Debian & Mint
Posts: 37

Rep: Reputation: Disabled
USB Storage Device Not "Updating"


Hi, Friends

I'm not sure how to explain this, but I'll give it my best shot.

I am using Debian Wheezy with LXDE on a Compaq 6720s laptop / notebook with 2GiB RAM and a 500GiB HDD.

I carry around a USB thumb-drive / storage device / what have you, and it holds all my vital documents so if my laptop gets "reassigned" to someone of criminal intent, or crashes, I still have all my documents with me.

When I insert the USB device into my laptop, everything goes as normal, I open using PCmanFM, work on the documents and then when I have finished, I unmount and remove.

I then insert different USB storage device and the "directory tree", for what of a better description, of the previous USB storage device reappears, even though there is completely different data on the second USB device.

When I click on the folders on the second USB device, there is an error, telling me that it doesn't exist.

This appearance of the first USB device information also happens to a completely blank and freshly formatted USB device.

I have searched for a solution to this and the only command I've managed to find is "sync", but that doesn't clear the cache, or whatever is storing this information.

The only way to clear the "presence" of the first USB device is to reboot the laptop. Only then can I insert the second USB storage device and do what I need to do.

Any assistance would be appreciated - Thank in advance.
 
Old 08-14-2014, 12:58 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
this rings a bell somewhere - i think you will have to reformat both usb sticks, maybe even create a new partition table.
the usual way is to have a single fat32 partition for the whole stick.

but before you do that, please post ouput of
Code:
mount|grep 'dev/sd'
while the stick is mounted.
and also have a look at it with gparted.

another thing:
i might be completely wrong, but i think i once had a problem that came from having the exact same label for 2 sticks, and having copied files from 2 different machines, but both machines where using the same user name.
you are using the stick as a normal (not super) user?
 
Old 08-14-2014, 01:31 PM   #3
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
I think you are using pcmanfm for your file manager and I am not very familiar with it. Most file managers have a left column with your options in them. Your stick should be in there.

Should be described by file system size or perhaps a name, depending on stick and so forth. If you are running on a fat partition so the data can be read by windows you can't have labels so individual partitions will not show up well. If you use a linux format for your file system you should use a label for all partitions so that they show up in the FM left column.

I use ext4 because there is no way for Windows to read that.

But, back to your problem; when you remove the stick go to your file manager and right click on the stick. Select the "eject" option and click on that. Should remove the entry for your stick. Insert your other stick and you should have no problems with the file system read.

There is also a "safely remove drive" option. This should work too. I seem to have better luck with the eject option for some reason.

As an aside; I have a bit of trouble understanding the limitations on MS systems ability to read usb sticks. I figured that ntfs, being the system files format would be readable or at least detectable. Fat seems to be the only thing those systems can read on a stick. This makes no sense to me at all. Ntfs may be a mediocre file system but it is a modern file system. Fat was great when Columbus was a boy but is a bit dated now.

You can, I assume, put an ISO image on a stick and have the bios boot to the thing. Those are normally hfs and ntfs so that Win and Mac boxes can make sense of them. Why can't data be read from ntfs?
 
Old 08-15-2014, 06:51 AM   #4
Angelo_d'Cuore
Member
 
Registered: Aug 2014
Location: Johannesburg, South Africa
Distribution: Debian & Mint
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
this rings a bell somewhere - i think you will have to reformat both usb sticks, maybe even create a new partition table.
the usual way is to have a single fat32 partition for the whole stick.

but before you do that, please post ouput of
Code:
mount|grep 'dev/sd'
while the stick is mounted.
and also have a look at it with gparted.

another thing:
i might be completely wrong, but i think i once had a problem that came from having the exact same label for 2 sticks, and having copied files from 2 different machines, but both machines where using the same user name.
you are using the stick as a normal (not super) user?
Hi, Friends

Thank you for your replies, I have printed out both your replies and will deal with the simplest solution first.

@ondoho, here's the print from grep:

/dev/sdb1 on /media/usb0 type vfat (rw,nosuid,nodev,noexec,relatime,uid=1000,fmask=0022,dmask=0022,codepage=cp437,iocharset=utf8,shortn ame=mixed,errors=remount-ro,user=AngeloCuore)

I have two devices with the same username. My PC and my laptop. Both are running Debian Wheezy 64 bit. I am using the stick as a normal user as I don't want to mess the permissions on my documents up.

@widget & ondoho

One of the disks is 8GiB, the other is 2GiB. Both are formatted to FAT32. One disk is a Kingston the other is a no-name brand I got as a gift from someone who went overseas. Also, they both have different label names. The Kingston I have a whole lot of music on it so when I drive in my car, I insert that into the radio. In that case, it has to be formatted to FAT otherwise the radio won't be able to read it. But the other device, I could format to EXT3 or EXT4 (I'm given to understand that not all the bugs have been ironed out of EXT4, or was that a problem that only Ubuntu experienced?) whatever the case, I will explore that option if the simplest solutions don't provide me with the results I need.

Last edited by Angelo_d'Cuore; 08-15-2014 at 06:59 AM.
 
Old 08-15-2014, 07:43 AM   #5
Angelo_d'Cuore
Member
 
Registered: Aug 2014
Location: Johannesburg, South Africa
Distribution: Debian & Mint
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by widget View Post
I think you are using pcmanfm for your file manager and I am not very familiar with it. Most file managers have a left column with your options in them. Your stick should be in there.

Should be described by file system size or perhaps a name, depending on stick and so forth. If you are running on a fat partition so the data can be read by windows you can't have labels so individual partitions will not show up well. If you use a linux format for your file system you should use a label for all partitions so that they show up in the FM left column.

I use ext4 because there is no way for Windows to read that.

But, back to your problem; when you remove the stick go to your file manager and right click on the stick. Select the "eject" option and click on that. Should remove the entry for your stick. Insert your other stick and you should have no problems with the file system read.

There is also a "safely remove drive" option. This should work too. I seem to have better luck with the eject option for some reason.

As an aside; I have a bit of trouble understanding the limitations on MS systems ability to read usb sticks. I figured that ntfs, being the system files format would be readable or at least detectable. Fat seems to be the only thing those systems can read on a stick. This makes no sense to me at all. Ntfs may be a mediocre file system but it is a modern file system. Fat was great when Columbus was a boy but is a bit dated now.

You can, I assume, put an ISO image on a stick and have the bios boot to the thing. Those are normally hfs and ntfs so that Win and Mac boxes can make sense of them. Why can't data be read from ntfs?
I am indeed using PCmanFM as it's a lovely and lightweight file manager perfect for my wants and needs. The thumb-drive shows up and the only option I have to unmount is, well, unmount. Sometimes it can take up to 30 seconds to finally release the drive.

Ok, I decided to reformat the thumb-drives to EXT2, then 3 then 4 but, in each case, when I tried to copy my documents to the drives, I ran into a permissions problem. Gparted works in su mode only and the drive was formatted for root permissions only. I decided not to hack away at changing the permissions and decided to reformat them to FAT16 instead of FAT32.

Unfortunately, the problem of the OS remembering what was on the first thumb-drive persists.


Just a litte history of my experience with Linux; I was first exposed to Linux around 2001, but I only went mainstream Linux since Ubuntu Hardy Heron (my first regularly used distro), so I know a little about how things work, it's just that sometimes, I come up against a problem I have no idea how to solve. All of my computers are currently loaded with Debian Wheezy installed off a thumb-drive having used unetbootin to load it up.
 
Old 08-17-2014, 12:38 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
first of all, on my system "mount" shows this about my usb stick:
Code:
/dev/sdc1 on /media/cruzer type vfat (rw,nosuid,nodev,noexec,noatime,uid=1000,gid=100,fmask=0133,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
close enough, i'd say, compared to yours.
the fmask is different but i have no clue what it does.
Quote:
Originally Posted by Angelo_d'Cuore View Post
Gparted works in su mode only and the drive was formatted for root permissions only. I decided not to hack away at changing the permissions and decided to reformat them to FAT16 instead of FAT32.
su or sudo? i think that might make a difference.
are you using a vanilla lubuntu install or what distro?
in any case, i think you should use only fat32 on your sticks.
does gparted throw a warning when opening witht he usb stick mounted?
maybe the partition table is the culprit.
 
Old 08-17-2014, 08:54 PM   #7
Angelo_d'Cuore
Member
 
Registered: Aug 2014
Location: Johannesburg, South Africa
Distribution: Debian & Mint
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
su or sudo? i think that might make a difference.
are you using a vanilla lubuntu install or what distro?
in any case, i think you should use only fat32 on your sticks.
does gparted throw a warning when opening witht he usb stick mounted?
maybe the partition table is the culprit.
Hi, O

The version of Debian I'm using on my four devices was downloaded from the Debian LiveCD website as downloading the entire Debian setup would have taken me weeks and cost me thousands of Rands (hundreds of Dollars or Euro). I decided on the LXDE gui as it is very light on system resources, but I could build what I wanted on top of that instead of being lumbered with a gui full of stuff I don't need and effects I don't like. I recently experimented with Kubuntu and it got to the stage where I was actually hating my computer because of all the extra "baggage" it came with.
My PC consists of the following: AMD Phenom II X6 1055T Processor + 10GiB RAM + 250GiB HDD for the OS + 1TB HDD for all my files, so I'm not lacking any processing power or space to work in, I just see no point in using a GUI that just wastes space and wastes system resources that could well be used for doing something useful.

As it stands, the LiveCD, once installed, has something called "root terminal", but I only use that when running updates and the occasional editing of conf files, like adding the repositories when I installed the system.

When I run gparted off the menu, I am asked for the root password, so I'm not sure if that's a su or sudo function. I just enter the root password and it works.

After I posted my last entry about formatting to FAT16, I discovered that it had some limitations I could't live with, being the maximum size of a partition on the stick not exceeding 4GiB, so I went back to FAT32 and gparted gives no issues when looking at either stick.

And now that I'm thinking about this, the one USB drive is only 2GiB, so maybe I could format that one to FAT16 and the 8GiB drive to FAT32. Would it make a difference? I'll give it a try and report back.
 
Old 08-17-2014, 09:40 PM   #8
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Have you tried to list the thumb drive contents in a terminal window? I mean "ls -l" and all that. I don't know PCmanFM, but I have seen strange things with other GUI file managers.

I would be interesting to know if the directory contents is bash is not synchronized either.

You might want to try the "-o sync" option in your mount command, although it is not something usually done.

jlinkels
 
Old 08-18-2014, 01:12 PM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by jlinkels View Post
Have you tried to list the thumb drive contents in a terminal window? I mean "ls -l" and all that. I don't know PCmanFM, but I have seen strange things with other GUI file managers.
+1 to that.

so, Angelo_d'Cuore, you basically installed LXDE yourself onto a barebones debian install, afaiu.
that's the info i was after; because the last time i tried that, simply installing LXDE was not enough to give me a fully functional desktop.

other things:

i am 97% sure that you want FAT32 and nothing else, trust me.

also, you keep ignoring my hint about the partition table!

Last edited by ondoho; 08-18-2014 at 01:13 PM.
 
Old 08-19-2014, 10:33 AM   #10
Angelo_d'Cuore
Member
 
Registered: Aug 2014
Location: Johannesburg, South Africa
Distribution: Debian & Mint
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jlinkels View Post
Have you tried to list the thumb drive contents in a terminal window? I mean "ls -l" and all that. I don't know PCmanFM, but I have seen strange things with other GUI file managers.

I would be interesting to know if the directory contents is bash is not synchronized either.

You might want to try the "-o sync" option in your mount command, although it is not something usually done.

jlinkels

Hi, jlinkelsI have tried as you suggested, but there is no luck. I tried the "sync" command from the very beginning, with a number of different options, but no such luck.


Quote:
Originally Posted by ondoho View Post
+1 to that.

so, Angelo_d'Cuore, you basically installed LXDE yourself onto a barebones debian install, afaiu.
that's the info i was after; because the last time i tried that, simply installing LXDE was not enough to give me a fully functional desktop.

other things:

i am 97% sure that you want FAT32 and nothing else, trust me.

also, you keep ignoring my hint about the partition table!

Hi, O

Please forgive me for not mentioning this earlier, but I did take note of your suggestion as looking for problems with the partition table, but found nothing wrong with it, on either of the thumb-drives, or others I tried to add to the mix.

I am really trying not to be a PITA, I apologise if I have been.

But yes, you are totally correct in that I installed the basics and built on top of that what I needed. You see, as far as I am concerned, the only secure platform I feel safe with is a Linux based based operating system - I am convinced that M$ is not a safe alternative to what I need my OS to do and I am also convinced that the conservative approach by the Debian developers regarding rolling out software upgrades, development and implementation is indeed the correct way to do things. I have read a lot of criticism of their being "backwards", but I prefer their ethos and strategy over other distro's. I have never had stability issues with Debian, whereas, over the past few years, my preferred distro, was Ubuntu, has become less and less stable, not to mention less secure.

But I have managed to solve this problem and it was a lot simpler than I expected - I feel like such a fool that I didn't think of this sooner.

When I insert the second, third or fourth thumb-drive and the menu from the first drive comes up, I either press F5, or click on "View", then "Reload Folder".

PCmanFM then crashes (or closes), I then re-open it and the contents of the subsequent drives show up. On a couple of occasions, when I "Reload Folder", not only does PCmanFM crash, but I get logged out. I then have to log in again, but the contents of the first drive are wiped from memory and the contents of the subsequent drive shows up.

I know it's not the ideal solution, but it's better than having to restart my computer or laptop every time I have to insert a subsequent thumb-drive.

I really appreciate the time put in by you guys in trying to assist me, I have learned something new about partition tables.
 
Old 08-19-2014, 12:47 PM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Angelo_d'Cuore View Post
Hi, jlinkelsI have tried as you suggested, but there is no luck.
this is so unprecise - how can anybody help you if you don't give proper report of what you did.
Quote:
I am really trying not to be a PITA, I apologise if I have been.
nobody said that, but since you said it yourself, it's hard to keep to the topic at hand when you spend far more words on apologising and explaining yourself, instead of staying on topic and describing your efforts in solving your problem
Quote:
I have learned something new about partition tables.
no you haven't, because we didn't even touch that.

Last edited by ondoho; 08-20-2014 at 02:08 PM.
 
Old 08-19-2014, 02:48 PM   #12
Angelo_d'Cuore
Member
 
Registered: Aug 2014
Location: Johannesburg, South Africa
Distribution: Debian & Mint
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
this is so unprecise - how can anybody help you if you don't give proper report of what you did.nobody said that, but since you said it yourself, it's hard to keep to the topic at hand when you spend far more words on apologising and explaining yourself, instead staying on topic and describe your efforts in solving your problemno you haven't, because we didn't even touch that.
In my first post, I did mention that I tried sync.

It's my first time I've ever used these forums, I don't know what the etiquette is and there is nothing in the rules about apologising for my ignorance - after all, I came here to try and reduce my level of ignorance and these forums are a way to enable that. Please correct me if my assumption was incorrect.

While I was waiting for people to assist me with my problem, I was searching for more information, using a search engine, on partitions, partitioning and how they affect a Linux system, why partitioning is important and also a little about security in partitioning. So it may not have been something you and I discussed in my query, your replies helped me to do so some of my own searching.

As for explaining myself too much, I have to at least put my actions and reasons for those actions into context so that people understand exactly what my problem is and therefore will be better able to assist me.

Look, I didn't come here to start a fight with anyone, I came here with a legitimate problem. The last thing I'm expecting is to draw fire from anyone.

Although the solution / work-around is sub-optimal, I am marking this as solved.

Thank you.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux programming "program to format an external storage device?" Karbon Programming 1 06-19-2008 05:45 PM
"Unable to open USB device "usb://hp/LaserJet%201000": No such device" lordshipmayhem Mandriva 2 08-08-2004 04:56 PM
Linux "broke" USB-mass storage device? - no longer workable in Windows XP lrt2003 Linux - Hardware 3 06-13-2004 10:56 PM
USB storage device works in 2.4 not 2.6 "no device error" critch Linux - Hardware 4 05-18-2004 11:13 AM
USB-Storage "6 in 1" device alfiejohn Linux - Hardware 2 09-06-2003 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration