how to open my usb drive


Forum: User Feedback
Topic: how to open my usb drive
started by: jwxie

Posted by jwxie on Feb. 20 2008,21:45
hello guys, i am new to damn small linux
i had IBM thinkpad, an old one, 64 mb, celeron 500mhz

anyway, i plugin my usb drive (i installed my DSL onto the hard drive)
i had some files in usb drive and would like to take them out

like windows, once you plugin the usb drive, it automically shows up the folder
but not in DSL, i believed

i want to know how to open my usb drive on DSL??

thank you

Posted by lucky13 on Feb. 20 2008,23:07
You're using Linux, not Windows. Unless you use a distro that automatically handles such things, you're going to manually mount and unmount devices.

Which version of DSL?

Three options:
1. With version 4+, right click on a desktop icon. Scroll down to mount. Select sda1, sdb1, etc., depending on mount point for that device.
2. In emelfm, go to /mnt. You should see an entry for sda1, sdb1, etc. Select the mount point for your device, right click, mount.
3. In terminal window, mount the device according to its mount point: e.g., "mount /mnt/sda1".

Don't forget to unmount (and wait a moment) before pulling the device back out or you might corrupt the data.

Posted by Juanito on Feb. 21 2008,03:50
...and if you cannot figure out where your usb stick is (sda1, sda2, etc), enter "dmesg" in a terminal window after you plug in the usb stick - the last few lines should give you some clues as to the name of your usb stick.
Posted by Subito Piano on Mar. 04 2008,05:08
Hi!  I have a similar problem with an older laptop.  The USB simply will not mount, not with any of the three suggestions above.  Navigating to /mnt shows sda, sda1, sda2, sda3, & sda4 -- but none will mount.  Right-clicking on a desktop icon and clicking on mount shows only the hard drive, floppy, and cd-rom.  I have gotten a message saying "device not present in fstab" i think it referred to both /etc/fstab and /usr/(something)/fstab.  I tried editing fstab as root to include sdb, but of course that didn't work.  dmseg says the jump drive device is sda -- but it just won't mount.  Any ideas?

Outside of that - wow! :laugh: Linux on a P-1, 165 MHz processor, with about 48 MB RAM.  It immediately found both my PCMCIA cable card and my (Netgear MA401) wireless card.  I've never had it so smooth going wireless with any other Linux on any machine!  Nice work on an old freebie!  I may actually leave it at 48 meg RAM--!!!

Posted by lucky13 on Mar. 04 2008,10:01
Quote
I have gotten a message saying "device not present in fstab" i think it referred to both /etc/fstab and /usr/(something)/fstab.

Copy your fstab here (the one in /etc). Also copy the result of "sudo fdisk -l" with the device inserted.

Quote
I tried editing fstab as root to include sdb, but of course that didn't work.  dmseg says the jump drive device is sda -- but it just won't mount.

Why are you adding sdb(1,2...?) if it's sda?

Posted by Subito Piano on Mar. 04 2008,23:23
OK!  Here is my /etc/fstab file - with nothing plugged in:

/dev/hda2  /  ext2  defaults,errors=remount-ro  0  1
proc  /proc  proc  defaults  0  0
/dev/fd0  /mnt/auto/floppy  vfat  defaults,user,noauto,showexec,umask=022  0  0
/dev/cdrom  /mnt/auto/cdrom  iso9660  defaults,ro,user,noexec,noauto  0  0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 vfat noauto,users,exec,umask=000,uid=1001,gid=50 0 0
# Added by KNOPPIX
/dev/hda3 none swap defaults 0 0

results of sudo fdisk -l with device inserted

Disk /dev/hda: 6495 MB, 6495068160 bytes
255 heads, 63 sectors/track, 789 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

(Hmmm--isn't there an easier way to copy text from a terminal instead of retyping it??)

I tried adding sdb thinking perhaps sda was already spoken for and my jump drive would be recognized as sdb if i added it to fstab.  I'm no expert on either command line or inner Linux workings BUT carefully trying things has been successful in the past.  Not a fast way to learn but it sometimes works!

Oh, yeah -- the ONLY thing i plugged in was the jump drive.  There's only one usb port.  Also, it's an HD install on a dual-boot.  This thing wouldn't run anything but Win98 (it was choking on 2000 when i got it) -- not even light Puppies or Feather -- but of course now it flies on the DSL side.

Thought: what about copying the /etc/fstab file from the CD?

Thanks for your help!

Posted by lucky13 on Mar. 05 2008,00:20
Quote
Here is my /etc/fstab file - with nothing plugged in:

Please do it WITH your drive plugged in. Hotplug won't assign mount points until it's plugged in. Copying fstab from CD is futile because hotplug is going to overwrite it as soon as you insert a device.

Posted by Subito Piano on Mar. 05 2008,00:37
Hmm - i wondered about that...

Anyway, here it is, plugged in:
]
/dev/hda2  /  ext2  defaults,errors=remount-ro  0  1
proc  /proc  proc  defaults  0  0
/dev/fd0  /mnt/auto/floppy  vfat  defaults,user,noauto,showexec,umask=022  0  0
/dev/cdrom  /mnt/auto/cdrom  iso9660  defaults,ro,user,noexec,noauto  0  0
# Added by KNOPPIX
/dev/sda1 /mnt/sda1 auto noauto,users,exec 0 0
# Added by KNOPPIX
/dev/sda2 /mnt/sda2 auto noauto,users,exec 0 0
# Added by KNOPPIX
/dev/sda3 /mnt/sda3 auto noauto,users,exec 0 0
# Added by KNOPPIX
/dev/sda4 /mnt/sda4 auto noauto,users,exec 0 0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 vfat noauto,users,exec,umask=000,uid=1001,gid=50 0 0
# Added by KNOPPIX
/dev/hda3 none swap defaults 0 0

I right-click on a desktop icon and mount sda1, sda2, etc....then go to /mnt and click on sda, sda1, sda2, etc -- nothing inside any of them.. Interestingly, sdb1 is listed in /mnt.  
Maybe i am all wrong.  I'm used to opening a removable device in either /mnt or (if present) /media.

Posted by lucky13 on Mar. 05 2008,01:23
Go to /mnt and mount them there. Leave sda alone. Your mount points are /mnt/sda1, /mnt/sda2, etc.
Posted by Subito Piano on Mar. 05 2008,01:37
Doesn't work - that's what i meant the whole problem is...
Posted by lucky13 on Mar. 05 2008,01:53
There wasn't anything for /dev/sda when you ran fdisk -l? When was the last time you used that device? Is its MBR corrupt?
Posted by Subito Piano on Mar. 05 2008,02:04
No, the jump drive is fine.  I'm using it in my big desktop right now.  I don't boot from it, the laptop has a total HD install of DSL.  The jump drive is only for carrying files around between home and work and various computers at work (school).  It shouldn't have an MBR in it--??
Posted by lucky13 on Mar. 05 2008,03:13
It has a partition table and it should produce a list of the partitions when it's inserted and you run fdisk -l. I don't know what your "big desktop" is. I do know how hotplug assigns mount points and knoppix-hotplug rewrites fstab when hotplug assigns points. That's being done. I ask about the integrity of the device because you wrote that you didn't get any output with fdisk -l when the device was inserted.

Have you tried to open it in cfdisk to see what shows up and to verify your partitions are exactly as you created them? Did you create those four partitions yourself and what filesystem(s) are they? Do you have any overlap between partitions (which can happen if you don't properly/safely remove or unmount such devices)? Have you tried mounting in console to get any error messages ("mount /mnt/sda1")? Did you try mounting using emelfm (which also outputs error messages)?

EDIT: What's up with sdb? You wrote you added sdb yourself. Why and which dev node did you set it up on? Have you rebooted since then or did you leave that mount point there? Don't make this harder than it is. DSL has hotplug and scripts to manage setting mount points. There are only rare circumstances where you should ever have to set mount points manually. The problem with doing that is making sure you understand how hotplug works so you don't get in its way. I have a hunch that's what you may have done.

Posted by lucky13 on Mar. 05 2008,03:24
Quote
(Hmmm--isn't there an easier way to copy text from a terminal instead of retyping it??)

Yes. Read the "getting started" document that opens in dillo by default. It explains how to cut and paste from console.

Posted by Subito Piano on Mar. 05 2008,03:28
Sorry about any lack of clarity.  

I have two home computers and in charge of several (dozens?) at the school i work at.  My main unit at home is a desktop (newer unit, 1 GHz processor, etc.) for most of my work.  The little Toshiba laptop in question was given to me.

The Lexar jump drive works just fine in my desktop and any computers at school, both Linux and Windows.  It has no partitions (and G-Parted confirms this) and it only fails to work when inserted into this laptop when running DSL -- Windoze recognizes it.  I don't know why /mnt shows sda1, sda2, etc.   It's formatted as it came -- FAT16.  I did run emelfm after finding out about that program yesterday but still couldn't get it to mount.  

Soo- i am perplexed.  I will run DSL live on my big desktop later to see if possibly there is some weird corruption in the CD (version 4.2).  I don't know what else might be the problem.   Weird...

(Just saw your edit).  I might have messed something up -- BUT i had this problem from the get-go.  I rewrote after the problem ocurred, not before, so i wouldn't think that is the problem.  I have rebooted several times....

I DID plug in another dying/dead jump drive, trying to see if any computer would open it; however i doubt that hurt anything.  It didn't in the other computers.

Sooo--i can try running the laptop off the live CD and test the jump drive.  If it works, it sounds like time for a reinstall (UGH!).  That would mean i start over from scratch, if i understand DSL  -- no preserving data in the home folder, right?.  

Thanks for spending this much of your time on my problem.  I'll keep trying your suggestions.

Posted by lucky13 on Mar. 05 2008,03:42
Quote
It has no partitions (and G-Parted confirms this) and it only fails to work when inserted into this laptop when running DSL -- Windoze recognizes it.

It has to have at least one partition whether the partition table is corrupt or not. /mnt is showing those four partitions because that's what's being detected by the scripts that manage hotplug. That's why I asked if you've checked it with cfdisk (you may need to use the -z flag to force it to open if it has a malformed or corrupt table) to see what partitions are actually on that device.

The fact that gparted sees "nothing" only confirms my hunch about corruption or a malformed partition table. If I had to guess, it most like has been formatted vfat but with an invalid partition table -- something Windows is much more tolerant of than Linux 2.4 -- and it's been removed without properly unmounting or using "remove safely." There are a few other things that can lead to what you describe, but that's the most likely scenario based on my experience.

And if that is the case, the problem isn't DSL.

Quote
I will run DSL live on my big desktop later to see if possibly there is some weird corruption in the CD (version 4.2).

The problem isn't with the CD. I can guarantee you that. I've used every version of 4.2 with everything from USB sticks and USB ZIP disks without *any* issue like you're describing.

Posted by lucky13 on Mar. 05 2008,03:48
Quote
I DID plug in another dying/dead jump drive, trying to see if any computer would open it; however i doubt that hurt anything.  It didn't in the other computers.

Okay, now see, that's another wrinkle you should've explained when you brought up sdb1. Which order did you install these devices? Did you pay attention to changes in fstab between inserting them? Or was the sdb1 what you added yourself?

Quote
If it works, it sounds like time for a reinstall (UGH!).  That would mean i start over from scratch, if i understand DSL  -- no preserving data in the home folder, right?.  

There's no need to reinstall for this. Just fix what's broken. If you did a traditional hard drive install, you have a few things you can do to keep  /home. What I do with my hard drive installs is set up a persistent /home anyway. I see from your fstab you have three partitions set up now. One for DSL, one for swap. What's on the third (don't give me any Abbott and Costello lines)? If you have Windows on it and it's large enough for your files, you can copy /home to Windows (make a tar.bz2) and then copy it back if you reinstall. Or at the very least you can back up only the files you absolutely need and copy them to one of your USB sticks or whatever.

Posted by Subito Piano on Mar. 05 2008,04:06
OK - lessee...

1. You're a comedian.  Good, i like to laugh!!  :)
2. Yes first partition is Windoze.
3. Sounds like i should simply copy my files from my jump drive to my HD, then (in Windoze probably) reformat my jump drive to either FAT16 or FAT32, next, recopy my files back onto the jump drive, and finally boot the laptop into DSL, and it all "should" be fine.

So i will do -- when my son finishes his homework on the laptop--!!

Posted by lucky13 on Mar. 05 2008,04:38
Quote
and it all "should" be fine.

As long as you check fstab to make sure all the old entries for sda1, sda2, etc., are gone BEFORE inserting the device again. Also, don't unplug the device without either unmounting or checking /etc/mtab to make sure it's not mounted. Check fstab again between mounting different devices or replugging in the same device to make sure it's not assigning mount points that it shouldn't (like if you have one partition on the stick and after a few insertions and removals it looks like it has several).

I'm still curious about that mount point you said you added for sdb(1?). Whatever you did can be undone. This doesn't require a reinstall because it's a matter of sorting out a few files/directories/mount points and getting the USB stick sorted out.

Posted by Subito Piano on Mar. 05 2008,05:09
Happy daze!!!  

(Hey, i'm picking up a little coding know-how as well!)

All is copasetic in LinuxLand once again.  Thank you, thank you, thank you.

The fix was as you suggested - reformatting.  Interestingly, my big Mepis machine had no problem with the jump drive all along -- but the Win98 side of the laptop did NOT like it very much!  So i reformatted under Mepis.  I tried to be cute and format to FAT32 -- Windoze wouldn't even talk to it, so i went back to FAT16.  Windoze finally understood, so i didn't even have to re-reformat it under Win98.  Way cool and not always the case in my experience.

OK - to clean up - no worry about the sdb entry i made.  I knew enough to edit it back out after i discovered it didn't work.  

Finally -- hmm, i wonder if the blame goes to me or to the dying SanDisk jumpdrive.  IDK.  I only have one DSL install, just for this laptop.
So again -- thank you!  Gee, i hope someone else can profit this as well.  You have been most gracious.  

Posted by lucky13 on Mar. 05 2008,05:35
Quote
I only have one DSL install, just for this laptop.

If you decide to reinstall at some point in time, consider the benefits of frugal install. It's a lot easier to keep up to date when new versions come out, you have the option of persistent /home, etc. It will run at similar speeds on most "older" hardware as a traditional install.

As for the USB stuff, glad you got it sorted out.

Posted by Subito Piano on Mar. 05 2008,05:42
Ahh - another question answered!  Speed was a major factor in choosing a full HD install b/c i didn't know better.  Good to have that clarified.
Posted by curaga on Mar. 05 2008,06:39
Just a note - this question has been answered many times at the forums. And it's always been a wrong windoze-only partition table from the factory.
Posted by Subito Piano on Mar. 05 2008,07:12
So - quick speed question... are JWM, IceWM, and Fluxbox all about the same speed, that is, use about the same amount of system resources? (Remember, i've got 48 MB RAM and like a 165 GHz clock.)  That default window manager IS JWM, isn't it?  From what i gather, flux is maybe a tiny bit faster than Ice, i figger JWM must be lighter than ice as well...

(thanks again - i'll leave you alone after this!) :p

Posted by lucky13 on Mar. 05 2008,12:58
Speed is relative. JWM is the smallest of those listed and has the fewest dependencies. The following links to a web page that compares the memory and library requirements for different window managers.
< http://lucky13linux.wordpress.com/2007....ory-use >

Posted by Subito Piano on Mar. 05 2008,13:26
Thanks again! :) I kinda figgered if JWM was there by default, it would be the best overall choice.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.