LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 11-09-2006, 06:06 PM   #1
Balarabay1
Member
 
Registered: Feb 2006
Location: Florida
Distribution: SUSE 11.0/x86 KDE
Posts: 334

Rep: Reputation: 30
USB Flash drive works great, BUT I can't unmount it??


When I plug it in, it works perfectly, but when I'm finished and go to click unmount, it says ERROR: failed to unmount , not found fstab/mtab. It has been like this for a while. Whenever I finish using the flash drive, all I do is unplug it. I never unmounted it. I never lost any data either. How can I make this unmount when I click unmount? Thanks!
 
Old 11-10-2006, 11:18 AM   #2
Panagiotis_IOA
Member
 
Registered: Jan 2006
Location: Hellas, Europe
Distribution: Slackware 12
Posts: 238

Rep: Reputation: 32
This happens when you mount a device to a folder and then you try to umount the folder. To do so you must have an entry to fstab for telling which device is mounted on this specific folder. In your case, if you do "umount /dev/sd**" where first * is the letter of device (sda, sdb, sdc...) and the second * is the number of parition, 1 on flash disks, should work.
If you type "fdisk -l", as root, you will get a list of the plugged device and there you'll see your flash drive as well.
You can create a folder under /mnt with the name usb and put an entry to fstab by telling that /dev/sd** should be matched to /mnt/usb.
But it is a bit strange that you can't do it since the system automatically mounts it. Anyway, try what I told you and we see
 
Old 11-19-2006, 06:54 PM   #3
Balarabay1
Member
 
Registered: Feb 2006
Location: Florida
Distribution: SUSE 11.0/x86 KDE
Posts: 334

Original Poster
Rep: Reputation: 30
All I want is to be able to click unmount on the hotplugged flash drive

What I don't understand is why Suse automatically mounts the flash drive when I plug it in, but when I right click on it to unmout, I get the error. I know all about the fstab, and how to set it up, but why should I have to since it is automatically mounted??? All I need to do here is to be able to EDIT the unmount command on the USB Flash that is hotplugged. Obviously they have the wrong command in. I need to change whatever command they have it set as, to umount /media/USB_DISK. That is the command that works in terminal. I also DO NOT want to have to be root to umount the flash drive. I just want to right click on the hotplugged USB flash drive, then click umount to have this command executed: umount /media/USB_DISK, WITHOUT having to be root. Boy did they botch this setup. All help would be appreciated in telling me how I can change the umount command to the command I need.
 
Old 11-19-2006, 07:40 PM   #4
Panagiotis_IOA
Member
 
Registered: Jan 2006
Location: Hellas, Europe
Distribution: Slackware 12
Posts: 238

Rep: Reputation: 32
Have you tried "umount /dev/sd**" ?
 
Old 11-19-2006, 11:03 PM   #5
Balarabay1
Member
 
Registered: Feb 2006
Location: Florida
Distribution: SUSE 11.0/x86 KDE
Posts: 334

Original Poster
Rep: Reputation: 30
Yes, I tried that...

The flash drive will only unmount from the /media/USB_DISK folder. I even tried <ln -s /dev/sda1 /media/USB_DISK>, and it said that link already exists. When I right click on the hotplugged usb flash icon, and click unmount, I get the error of: /dev/sda1 not in the fstab and I'm not root. The only way it unmounts is with this command as root user: umount /media/USB_DISK
 
Old 11-20-2006, 12:09 AM   #6
Balarabay1
Member
 
Registered: Feb 2006
Location: Florida
Distribution: SUSE 11.0/x86 KDE
Posts: 334

Original Poster
Rep: Reputation: 30
Ok...all Solved!

This is what you have to do:

1st> In terminal as root user enter fdisk -l (This tells you what /dev/sd** your flash drive is)

2nd> Next go in your /media folder and see what your usb flash is mounted in. Mine is /media/USB_DISK

3rd> As root user in terminal: kwrite /etc/fstab

4th> add this line to the list and remember to line everything up(space wise) & press ENTER at the end of the new line, then click on save under file(Make sure to put YOUR information in where the ** are!):

/dev/sd** /media/********** vfat noauto,users,rw,umask=0 0 0



OK...Your finished! Your flash will work perfectly! mount/unmount all you want!
 
Old 11-20-2006, 01:02 PM   #7
Balarabay1
Member
 
Registered: Feb 2006
Location: Florida
Distribution: SUSE 11.0/x86 KDE
Posts: 334

Original Poster
Rep: Reputation: 30
OK..new problem....LOL...but I have a solution!

Everything I said worked fine until I rebooted the system. Once the system rebooted, it loaded the /dev/sda1. Now, the problem is, when you insert the flash drive, it works perfectly, but you now have (2) USB's listed in MY COMPUTER. When you go to unmount, you get an error of, multiple /dev/sda1's listed in fstab. This is what you do:

Delete the /dev/sd** line from your fstab. Then on your lower toolbar, right click in an empty area and choose add to toolbar. Next, choose add launcher. Then put the name down as EJECT FLASH. In the command line spot enter the path to your flash drive. Just check in your /media folder for the name. My command is as follows: eject /media/USB_FLASH. You then click on ICON, and choose an icon to use. Leave as application. Then click done/close. You should now have an icon in your lower toolbar that you can click on to eject your USB! Now this works. By ejecting the flash you are essentially unmounting it and removing it from your system.
 
  


Reply

Tags
drives, unmounting, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 flash drive works like a charm! wapcaplet LinuxQuestions.org Member Success Stories 3 07-10-2009 07:50 AM
How USB / Flash drive works in redhat 9 itstipu Linux - Hardware 5 08-08-2006 03:38 PM
cannot unmount flash drive Suse 10 Gnome rje_NC Suse/Novell 5 11-29-2005 10:28 AM
flash drive won't unmount MiniMe001 Linux - Software 3 11-12-2004 08:36 PM
USB thumb drive works great, but I still can't get my USB mouse to work. blk96gt Slackware 8 06-22-2004 01:52 AM


All times are GMT -5. The time now is 01:00 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration