LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-14-2007, 04:36 PM   #1
launchpadtt
Member
 
Registered: May 2005
Location: Brooklyn, originally from Trinidad and Tobago
Distribution: (Ku, Xu, U)buntu
Posts: 30

Rep: Reputation: 15
Unplugging usb mass storage in linux


I just got a GP2X. It's awesome. I got a 4GB SD Card to use with the GP2X. When I got it they were selling it as a value pack, which included some games and some accessories. With it came a little SD, to USB stick dongle thingy (In one end you put in the SD Card, the other end's the USB connector).

So I was using it to copy over some files. I right-clicked and chose Unmount Volume in Xubuntu and then unplugged it. Now I think I may have unplugged it just a little bit too early because when I plugged it back in later on, nothing showed up. Tried it Ubuntu. Nothing showed up. Tried to dosfsck it. It said there was no /dev/sda1. Took the SD card out and plugged it into the GP2X. Nothing showed on the GP2X.

Of course I'm unhappy and panicking because I think at best it won't be awhile till I get it fixed and at worst the SD Card that I just got is broken.

I went into to work next morning and plugged it in on a Windows desktop, it showed up but when I double-clicked it said that the it needed to be formatted. Tried to format it. Didn't work. Tried again, but this time did a quick format. It worked, but three files showed up with garbage text for names with each, and Windows Explorer saying that each file's size was 4GB. I double click them and it says that 'there was no source file or disk' or something along those lines. So I do a Scandisk from Disk Properties, and have it automatically fix errors. That seemed to fix it.

Now my first question is, how would I have fixed this in Linux?

Next question is, why would this have happened in Linux? This has actually happened to me before with a regular USB Flash stick. Is there some sort of write-caching that Windows does that Linux doesn't? If there is how would I turn it on in Linux?
 
Old 03-14-2007, 04:50 PM   #2
elsheikhmh
Member
 
Registered: Aug 2004
Location: Cairo, Egypt
Distribution: Slackware
Posts: 101

Rep: Reputation: 15
may be you may try to do from shell:
Code:
umount /dev/sda1
eject /dev/sda1
BR,
mustafa
 
Old 03-14-2007, 04:57 PM   #3
elsheikhmh
Member
 
Registered: Aug 2004
Location: Cairo, Egypt
Distribution: Slackware
Posts: 101

Rep: Reputation: 15
formatting USB mass storage device (USB flash memory) from Linux shell

* say your flash memory is on /dev/sda1 then the device is actually /dev/sda. that is, the hole drive is /dev/sda
* you can do
Code:
fdisk /dev/sda
and do printing, delete existing partition sda1, and then create new.
* or use cfdisk it's easier.
* to create file system:
Code:
mke2fs /dev/sda1
BR,
mustafa
 
Old 03-14-2007, 05:02 PM   #4
launchpadtt
Member
 
Registered: May 2005
Location: Brooklyn, originally from Trinidad and Tobago
Distribution: (Ku, Xu, U)buntu
Posts: 30

Original Poster
Rep: Reputation: 15
Well I tried 'dosfsck /dev/sda1' and it said there was no sda1. Hopefully I never see a next time of that but if I do I'll try fdisk /dev/sda , cfdisk , and mke2fs as well.

Thanks
 
  


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
USB Mass storage devices don't work in linux 2.6.[9,11.x] _private Debian 9 11-06-2013 06:46 AM
After plug in apacer ht202 usb mass storage into usb port. Nothing appear. tellmeimhong Linux - Hardware 3 02-04-2006 02:32 AM
Accessing USB Mass storage device in Linux..?? kvsmani Linux - Hardware 0 02-11-2004 12:03 PM
Cannot Install Bootloader, XP on hda, Linux on sdb (USB MASS STORAGE DRIVE) neo5064 Linux - Newbie 3 12-29-2003 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:43 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