I don’t know if it’s my particular USB drive (Patriot brand), but whenever I want to remove it from the phone, I get the message “Unable to stop drive.” This happens whether or not I’m copying any files at the time.
Eject also doesn’t remove it from the Files menu, although no error is displayed.
I then go to the
Disks app, select the drive, and power it off from the settings.
I don’t have another USB-C type drive to test, unfortunately.
I also don’t have any problems removing the drive from my laptop.
Did you try
umount -f /path/to/usb_drive
How do I fill this in? (an example)
Should it look like this? sudo umount -f /dev/sdb
This one should work I think, but also path to the folder where it’s mounted should also work. And the second command should AFAIK act on the mounted path.
sudo -f umount /media/patriot
Hmmm… not mounted, although I see it in Nemo, and I can move files to and from it:
purism@pureos:~$ sudo umount -f /dev/sdb
umount: /dev/sdb: not mounted.
cd into it in the terminal? If you can, you can use the corresponding path for
I get this error when I first insert the drive:
None of the paths I’ve tried can find it.
Aha! Figured it out: /media/purism/PATRIOT
purism@pureos:~$ cd /media/purism/PATRIOT
purism@pureos:/media/purism/PATRIOT$ sudo umount -f /media/purism/PATRIOT
umount: /media/purism/PATRIOT: target is busy.
It’s generally a good idea to use
sudo umount --recursive -f $PATH, but I doubt something is getting auto-mounted inside the flash drive.
Try the following:
lsof | grep /media/purism/PATRIOT
It should tell you want is using it. Little hint, when you are sitting in the path you want to unmount,
$$ (your shell) is using it.
cd /media/purism && sudo umount -f /media/purism/PATRIOT
I wonder if your brand of USB is made in China and it is constantly trying to “phone home” ?
Of course it is busy. You are inside the mount folder (with the bash shell). Just issue a plain
(this will take you to /home/purism) and then
If it insists that it is busy then another app is accessing the folder.
should tell you which one it is. You first exit that app and then umount.
Thanks. I’m glad I have all you guys to straighten me out!
Just tested again:
Copy a file to USB.
Select “Safely remove drive”.
Get “Unable to stop drive” error.
ssh to L5 from laptop.
purism@pureos:~$ umount /media/purism/PATRIOT
USB drive still appears in Files as if mounted, as well as in Disks. (Maybe the L5 simply exhibits different behavior from other computers?)
So am I safe just yanking the thing out after the
@amarok, let us learn from each other. This was wrong:
sudo umount -f /dev/sdb
sudo fdisk -l
@antonis, this is correct (I’ve learned something):
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME … evince …
Error unmounting block device … DeviceBusy: Error unmounting /dev/sdb1: target is busy
I’ve closed opened Evince file.
Is /dev/sdb1 an ext4 partition?
This definitely unmounts it, as seen in the
Disks app, so that’s good to know. It stays in the menu, however, and when I select it in the
Files app, a notification pops down and says it’s now ready to open.
Safely remove drive gets the
Unable to stop drive message. Back to
Disks, where it shows as mounted again.
So looks like I have to issue the command every time (at least with this drive).
Files app will mount USB Drive again (by selecting it). Make sure you are at Home Folder or close
Files app. And check this with
umount /dev/sdb1 again.
P.S. I’d format this USB drive on Librem 5 itself to ext4.
Yes, I had done this. I also closed and reopened
Disks again after that, and it still showed as mounted. When I run the command, it unmounts it, no problem.
I will reformat the USB at some point. Then I’ll report back to say whether that corrected the behavior.
Thanks for all the tips!
I just noticed that
Eject (in the
Files app) actually unmounted the drive, so… maybe I don’t need to do it in the terminal. I’ll continue to check it in the meantime.