External unmounting problems

Archived topics about LMDE 1
Forum rules
Level 1
Level 1
Posts: 1
Joined: Sun Nov 04, 2012 6:30 pm

External unmounting problems

Postby nihmx » Thu Nov 22, 2012 4:18 pm

Hello! I'm relatively new to LMDE, years ago I was a debian user (never a power user), and after a brief but frustrating stint with Amazon/Ubuntu, I have been quite happy to find LMDE. On the linux noob scale I'd say I'm about a 4. I'm not afraid of command line, and I'm not afraid to try and break things, but most commands I have to look up. Thank you oh great google.
I'm having a rather unique dificulty though.
I just installed mint on a lenovo X130e, and it is having problems unmounting external devices.
Anything I plug in mounts just fine, but with different devices, unmounting is widely varied:

FAT 32 formatted USB drive - mounts and unmounts without a hiccup

Tethering my android phone with SD card - mounts as two volumes, I can read and write, but when I try to eject it, it briefly flashes an error message about being unable to unmount as device is in use, then it unmounts it and flashes an error "could not mount device sd__" when I unplugged my phone, it initially could not find the sd card, I was worried for a moment (see below) but luckily a restart of the phone fixed it

External hard drive. here is the real problem. No matter how the drive is formatted (FAT included), and no matter which program did the formatting the following happens:
I plug it in, and it mounts just fine. I can copy files to it, read from it, no problems. When I try to eject it, it disappears from the list, and flashes the "could not mount device" error. When I plug it back in, it wont mount. when I plug it into another computer, it wont mount. I have to reformat it on another computer (for some reason gparted wont work to do this) and then it's back to normal. I can use it between other desktops with windows or osx or ubuntu just fine.
If i plug it into my laptop, wash rinse an repeat the steps above.

It seems to me that the laptop is borking something in the unmount process, and but why only with the external? and why as well with my phone, but then my phone "fixes" it?
any insight is appreciated, as I would love to take my external with me instead of relying on a fleet of thumbdrives when I travel.

Level 3
Level 3
Posts: 167
Joined: Thu May 14, 2009 2:49 am
Location: S.E. Montana

Re: External unmounting problems

Postby widget » Sat Nov 24, 2012 4:07 pm

Fat sucks, I would use something else.

Don't have any MS installs on anything (not permitted in this house) so can't say this will work but it is what I would do.

I would edit the LMDE /etc/fstab file to mount that external at boot up. If it is not connected you will get an error but should not effect any performance the OS will just not be able to find the file system.

You will need to have a mount point created for the fstab to mount the thing at. This should be in your /media directory.

So format the drive to ntfs. Make sure you have all the ntfs related packages installed in LMDE. Run a search in Synaptic for "ntfs" should show all packages that you may need.

Label the ntfs partition something like Ntfs0. The 0 (zero) is in case you want to do it again with another external. Run;

Code: Select all

sudo mkdir /media/Ntfs0

Run, with the drive connected;

Code: Select all

sudo  blkid

This will give you the uuid of all partitions. Using the uuid for Ntfs0 add 2 lines in your fstab like these;

Code: Select all

#Entry for /dev/sdb5 :
UUID=b9e4c42c-838d-448b-9c4e-69363d6832ad   /media/Storage   ext4   defaults   0   0

The commented (#) line will be ignored. It is a "comment" to explain the code for anyone looking in the file. Like you.

You will need the uuid for the partition from "blkid" and change my "ext4" to ntfs and in the commented line you can us the /dev info from "blkid" too.

Then run;

Code: Select all

sudo chown -R pete:pete /media/Ntfs0

where "pete" is your user name. That gives pete ownership of that Ntfs0 directory so that you can, as user not root, mount that drive at anytime.

If you do get a "only root can mount this drive" or what ever the message is, simply use;

Code: Select all

sudo mount /media/Ntfs0

Unmounting should be able to be done with;

Code: Select all

sudo umount /media/Ntfs0

that is not a typo at "umount". Thought I better clarify that as I am good at typos.

All this should give you, in the left panel of your file manager an entry for Ntfs0. If you create one file that contains most or all of the data on that partition (could be the entire drive) you can put a book mark in your browser to go to that file. This is handy.
Dell XPS 420 Core2 Quad Q 6600, audigy5.1, Radeon HD 6450 - currently 4 320Gb HDD, Debian Squeeze for secure use, Debian testing for daily use, Debian Sid for fun.

Return to “Archive”