dsyleixa123
Posts: 405
Joined: Mon Jun 11, 2018 11:22 am

how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

Sun Sep 08, 2019 7:43 am

how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

lsblk shows:

sda
|->sda1
|->sda2

but if I enter
sudo umount sda
it fails
(sth like "mountpoint not found")

which is the correct way?

RonR
Posts: 520
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

Sun Sep 08, 2019 7:52 am

sudo umount /dev/sda1
sudo umount /dev/sda2
Last edited by RonR on Sun Sep 08, 2019 5:47 pm, edited 1 time in total.

dsyleixa123
Posts: 405
Joined: Mon Jun 11, 2018 11:22 am

Re: how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

Sun Sep 08, 2019 7:56 am

same errors:

sudo umount sda1:
mountpoint not found

sudo umount sda2:
mountpoint not found

User avatar
DougieLawson
Posts: 36176
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

Sun Sep 08, 2019 7:58 am

sudo apt install eject
sudo eject /dev/sda
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

RonR
Posts: 520
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

Sun Sep 08, 2019 8:01 am

Then they probably aren't mounted (lsblk reports block devices which may or may not be mounted).

Run 'sudo mount | grep sda' to determine if either is mounted.

dsyleixa123
Posts: 405
Joined: Mon Jun 11, 2018 11:22 am

Re: how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

Sun Sep 08, 2019 8:06 am

they ARE mounted! (I can access the contents via file commander (mc)

Ernst
Posts: 1234
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

Sun Sep 08, 2019 8:16 am

Code: Select all

sudo umount /dev/sda{1,2}
or

Code: Select all

sudo umount /dev/sda1
sudo umount /dev/sda2
The road to insanity is paved with static ip addresses

dsyleixa123
Posts: 405
Joined: Mon Jun 11, 2018 11:22 am

Re: how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

Sun Sep 08, 2019 8:20 am

@dougie:
thank you, eject works !

@Ernst: thanks, appearently a "/dev/..." was missing in my cmd line.... :roll:

ceterum censeo: Non-GUI Linux is really an unbearable, unreasonable and unconscionable agony for common PC users ( an outrageous sea of troubles, Skakespeare would probably say.... ) :evil:

dsyleixa123
Posts: 405
Joined: Mon Jun 11, 2018 11:22 am

Re: how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

Sun Sep 08, 2019 8:34 am

next issue:
after having "eject"ed and then plugged to my Win PC it gives an error that the file system might be damaged and should be checked (perhaps out of unsafe ejecting before).
Checking then does not show up errors though.
Is that normal?
how can this issue be prevented?

User avatar
rpdom
Posts: 15232
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

Sun Sep 08, 2019 9:22 am

What format are the partitions in?

If they are not one of the very few that Windows recognises it will scream and say they need formatting which is a lie.

dsyleixa123
Posts: 405
Joined: Mon Jun 11, 2018 11:22 am

Re: how to unmount a SD card with 2 partitions completely in a USB card reader (in order to unplug it safely)?

Sun Sep 08, 2019 9:33 am

the last device was a USB stick having just 1 FAT32 partition (sda -> sda1)
the error does not show up if the USB stick was NOT "eject"ed and not removed but the Raspi was shutdown and powered-off before.

Return to “Beginners”