Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2798

Is it possible to flash an SD card with WSL Ubuntu?

$
0
0

I'm new to Linux so bear with me here, I'm happy to clarify any terminology I inevitably misuse.

I am running Windows 11 and WSL/Ubuntu. I am trying to flash an embedded linux image to an SD card using a script (part of an SDK). The script compiles the image and then puts it onto the SD card, it takes the <device> as an argument with the example /dev/sdc.

sudo ./mksdcard.sh /dev/sdc

I have set up USBIPD and successfully mounted the SD card to my "linux" system. When I run
$usbipd wsl attach --busid 3-1 in PowerShell I can see the SD card (drive D) disappear from my windows filesystem, and I can see it's contents at /mnt/d through Ubuntu. The problem is when I look at the devices in /dev it doesn't show up there, only /sda, /sdb, and /sdc.When I run lsusb, I can see the SD card:

$lsusbBus 002 Device 003: ID 045e:090c Microsoft Corp. SD CardBus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and when I run lsusb -t:

$lsusb -t/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=vhci_hcd/8p, 5000M    |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=, 5000M/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=vhci_hcd/8p, 480M

I have tried to run the script using /mnt/d instead of the suggested /dev/sdc but I get an error that this is a directory, not a device.

Based on the results from $lsusb -t it looks to me like the driver is missing for the SD card. Is that maybe the problem here? Is there a way to get that driver?

I'm trying my best to use WSL for development instead of booting my computer into Linux, but this is my biggest roadblock so far.

Here is some additional info if it helps:

$lsblkNAME MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTSsda    8:0    0   256G  0 disksdb    8:16   0 339.7M  1 disksdc    8:32   0   256G  0 disk /$uname -aLinux SUN-022078282057 5.10.102.1-microsoft-standard-WSL2+ #1 SMP Tue Jun 7 15:51:43 PDT 2022 x86_64 x86_64 x86_64 GNU/Linux

Thanks!!


Viewing all articles
Browse latest Browse all 2798

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>