0

I am having issues ejecting an SD card from an ubuntu Rpi in my bash script. When I run the command to eject, the following error is displayed

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT       
loop0         7:0    0 48.9M  1 loop /snap/core18/1949
loop1         7:1    0 48.9M  1 loop /snap/core18/2073
loop2         7:2    0 59.6M  1 loop /snap/lxd/20330  
loop3         7:3    0 28.1M  1 loop /snap/snapd/12397
loop4         7:4    0   27M  1 loop /snap/snapd/10709
loop5         7:5    0 61.6M  1 loop /snap/lxd/19040  
sda           8:0    1 29.8G  0 disk
├─sda1        8:1    1  256M  0 part
└─sda2        8:2    1  7.2G  0 part
mmcblk0     179:0    0 29.8G  0 disk
├─mmcblk0p1 179:1    0  256M  0 part
└─mmcblk0p2 179:2    0 29.6G  0 part /
ubuntu@ubuntu:~$ eject sda
eject: tried to use `/dev/sda' as device name but it is no block device
not an sg device, or old sg driver
eject: unable to eject, last error: Inappropriate ioctl for device
ubuntu@ubuntu:~$ eject /dev/sda
eject: tried to use `/dev/sda' as device name but it is no block device
eject: unable to find or open device for: `/dev/sda'

3

AFAIK, eject is for CD players - players that have the mechanical components to physically eject a CD. A CD is a round, shiny disk that spins around in the drive. Your SD card is a fundamentally different type of storage media, and AFAIK has no mechanical components capable of ejecting it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.