Score:0

SD card not showing in lsblk

in flag

I seem to have a very basic problem. I am using microSD USB 2.0 to connect my SD card to PC to do the partition. I am currently on Ubuntu 20.04 running on windows machine. When I run lsblk SD card storage not shows up. No results for lsusb also. I tried with different SD card but same issue.

Details: Ubuntu 20.04 running on windows machine SD card reader: microSD USB 2.0 SD card capacity: 16GB

root@b4beb1995942:/# lsblk
NAME  MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0   7:0    0 382.5M  1 loop
loop1   7:1    0 348.9M  1 loop
sda     8:0    0   256G  0 disk
sdb     8:16   0   256G  0 disk
sdc     8:32   0   256G  0 disk /etc/hosts
sdd     8:48   0   256G  0 disk

Please let me know what I am missing here.

sudodus avatar
jp flag
What do you mean by "Ubuntu 20.04 running on windows machine"? Are you running Ubuntu in a virtual machine (for example VirtualBox) where Windows in the host operating system? Or are you running Ubuntu live, booted from a USB drive? Or are you running an installed Ubuntu system in a machine, that was originally equipped with Windows? - Can you see any USB device from Ubuntu? What is the output of `lsusb`?
Sourabh_Hegde avatar
in flag
Hi, I am using Ubuntu from docker container. And also I have WSL2.0 running. When I run `lsusb` nothing shows up. But I could see USB Drive in Windows file manager.
sudodus avatar
jp flag
It is easier to see USB drives from Ubuntu, when it is booted directly on the computer (without Windows in-between). I suggest that you download an Ubuntu iso file (for example Ubuntu Desktop 20.04.3 LTS), use Rufus or Balena Etcher in Windows to create a USB boot drive with Ubuntu, and then boot the computer from the USB boot drive. Then you should be able to see the SD card via the adapter and create a partition and file system (aka format the SD card).
Sourabh_Hegde avatar
in flag
Can you please let me know what exactly happens with USB boot device method? Will I be able to use normal windows afterwards? I found this [link](https://docs.microsoft.com/en-us/windows/wsl/connect-usb). Will this work?
sudodus avatar
jp flag
Booting **Ubuntu *live* via USB** (alias 'Try Ubuntu') will give you an operating system that is almost as an installed Ubuntu system, but if you save files or install systems, they will not survive shutdown or reboot. For example, you have access to USB drives and can create a partition table with a file system, which I think is what you want (according to the original question). - This does not touch the internal drive (unless you make a real effort and run some particular program for that purpose). So you will be able to run Windows afterwards just like you did before.
sudodus avatar
jp flag
1. But maybe I misunderstood what you want. Please explain with more details what you want (and why you asked this question); 2. See more details about running Ubuntu Live at [this link](https://ubuntu.com/tutorials/try-ubuntu-before-you-install#1-getting-started).
Sourabh_Hegde avatar
in flag
okay so by using Ubuntu live via USB I can do the partitioning. This sounds like a solution for me. But what if I want to write some files to SD card afterwards. For example, if I wan to copy images from Yocto build to SD card do I need to use again live Ubuntu? My original question is still related to SD card not visible from Ubuntu running via docker. Since you mentioned about Ubuntu live via USB, I wanted to know more about this. Is there any other alternative. How about using Oracle VirtualBox? Can it detect USB drives from Ubuntu?
sudodus avatar
jp flag
**1.** What file system do you want on the SD card? (A Linux file system or a Microsoft file system?) **2.** It is possible via VirtualBox to connect to USB, but more complicated than via Ubuntu Live. There are instructions at the Oracle VirtualBox website and there are also recent questions and answers about it here at AskUbuntu; **3.** If you reboot Windows (not shutdown) directly into the live Ubuntu, **or** if you turn off all hibernation of Windows (also turn off Fast Startup), Ubuntu Live can mount the Windows partition and read the files there (and copy them to the SD card).
Sourabh_Hegde avatar
in flag
1. I will be needing linux ext4 type of filesystem
sudodus avatar
jp flag
OK, This means that it is correct to use Ubuntu.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.