Web lists-archives.com

Re: What's the device name of my microSD card?




On 4/21/19 6:14 PM, Patrick Wiseman wrote:
From the command line, 'df' returns free disk space and lists all mounted devices by device name. (One of probably many ways to do it!)

On 4/21/19 6:17 PM, Paul Sutton wrote:
if you run lsblk it will list devices connected to the system

Here's the output of both commands, not sure I can figure out which one(s) is(are) my usb-Generic_STORAGE_DEVICE (i.e. a microSD put into a USB-thingie):

debian@hamlet:~$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev              961108        0    961108   0% /dev
tmpfs             201708     3260    198448   2% /run
/dev/mmcblk0p2  61214500 11372112  47335168  20% /
tmpfs            1008520    50808    957712   6% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs            1008520        0   1008520   0% /sys/fs/cgroup
tmpfs            1008520        8   1008512   1% /tmp
tmpfs            1008520        0   1008520   0% /var/tmp
/dev/mmcblk0p1    202277    48430    143403  26% /boot
tmpfs             201704       24    201680   1% /run/user/1000

debian@hamlet:~$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda            8:0    1 29.7G  0 disk
└─sda1         8:1    1 29.7G  0 part
mmcblk0      179:0    0 59.5G  0 disk
├─mmcblk0p1  179:1    0  204M  0 part /boot
└─mmcblk0p2  179:2    0 59.3G  0 part /
mmcblk2      179:256  0 13.8G  0 disk
├─mmcblk2p1  179:257  0   50M  0 part
└─mmcblk2p2  179:258  0 13.7G  0 part
mmcblk2boot0 179:512  0   16M  1 disk
mmcblk2boot1 179:768  0   16M  1 disk


When I'm at it, here's the full ls completion from ls -al /dev/disk/by-id

debian@hamlet:~$ ls -al /dev/disk/by-id/
mmc-R1J56L_0x7da477d7
mmc-R1J56L_0x7da477d7-part1
mmc-R1J56L_0x7da477d7-part2
mmc-SN64G_0x3376cd3a
mmc-SN64G_0x3376cd3a-part1
mmc-SN64G_0x3376cd3a-part2
usb-Generic_STORAGE_DEVICE_000000001532-0:0
usb-Generic_STORAGE_DEVICE_000000001532-0:0-part1


It's the usb-Generic storage I want to copy the gz image to.

Thanks for your help!

//Erik