I am trying to safely remove my Kindle from the command line but, so far, all my attempts have left the Kindle in "USB Drive Mode". This is not the case when I have safely removed the Kindle via the Nautilus file manager.
My first attempt:
#!/bin/bash sync udisks --unmount /dev/sdb1
If I follow through with this command:
udisks --detach /dev/sdb
then I get this error:
Detach failed: Error detaching: helper exited with exit code 1: Detaching device /dev/sdb USB device: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2) SYNCHRONIZE CACHE: OK STOP UNIT: FAILED: No such file or directory
udisks, I have also tried
#!/bin/bash eject /dev/sdb1
but I get this error:
eject: unable to open `/dev/sdb'
and the Kindle gets disconnected, but stays in "USB Drive Mode".