Open dkkolli opened 3 years ago
review if new release can access sdcards from wsl2. I think it may still not be the case
So looks liek that the burn info does not return the field removable ... in the printout. THis is easy to fix as one could set removable to None .., as that is just a table value ... this would habben in the burn info ... I guess
@laszewsk if we add
for x in results:
x["removable"] = None
then cms burn info yields
(ENV3) usr@Sledgehammer:/mnt/f$ cms burn info
# ----------------------------------------------------------------------
# This is a Linux Computer
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# USB Device Probe
# ----------------------------------------------------------------------
+--------+-------+----------+---------+---------------------+-----------------+--------+------------+------------+-------------------------------------+
| Adr. | bus | Vendor | Prod. | H Vendor | H Prod. | Man. | Ser.Num. | USB Ver. | Comment |
|--------+-------+----------+---------+---------------------+-----------------+--------+------------+------------+-------------------------------------|
| 2 | 1 | 1507 | 1861 | Genesys Logic, Inc. | Logilink CR0012 | 0 | 2 | 2 | Genesys Logic, Inc. Logilink CR0012 |
| 1 | 1 | 7531 | 2 | Linux Foundation | 2.0 root hub | 3 | 1 | 2 | Linux Foundation 2.0 root hub |
| 1 | 2 | 7531 | 3 | Linux Foundation | 3.0 root hub | 3 | 1 | 3 | Linux Foundation 3.0 root hub |
+--------+-------+----------+---------+---------------------+-----------------+--------+------------+------------+-------------------------------------+
sudo password:
# ----------------------------------------------------------------------
# SD Cards Found
# ----------------------------------------------------------------------
+----------+--------+-------------+----------------+--------------+------------+---------+----------+-------------+-------------+
| Path | Info | Formatted | Size | Plugged-in | Readable | Empty | Access | Removable | Writeable |
|----------+--------+-------------+----------------+--------------+------------+---------+----------+-------------+-------------|
| /dev/sda | Msft | True | 275 GB/256 GiB | True | True | False | True | | True |
| /dev/sdb | Msft | True | 275 GB/256 GiB | True | True | False | True | | True |
+----------+--------+-------------+----------------+--------------+------------+---------+----------+-------------+-------------+
# ----------------------------------------------------------------------
# Mount points
# ----------------------------------------------------------------------
WARNING: No mount points found. Use cms burn mount
(ENV3) usr@Sledgehammer:/mnt/f$
the problem is that the device is not a /dev/ , instead it is located at /mnt/f
it seems like the solution is to upgrade to windows 11. https://docs.microsoft.com/en-us/windows/wsl/wsl2-mount-disk
do you have card in reader? also i suggest to add the =None in code but make sure it does not break anything.
make sure card is formatted with fat32 or something windows knows about
It makes sense to disbanden the windows 10 effort and use windows 11. I however can not update as I am unsure what impact this has on my system due to the hightened security and I do dual boot into windows and Linux. e.g. as my machine is primarily used for linux and not windows I like not to upgrade to windows 11. Also I think uva does not support windows 10 to 11 upgrade ...
Also I note that Windows 11 was released Oct 11 2021. SO it would have been timely for this to have been looked at. What os are you using?
i am using windows 10 but i can verify that WSL can write to sd card through a usb reader.
sudo mount -t drvfs D: /mnt/d
cd /mnt/d
touch test
edit by JP 5/9/2022 windows DOES support SD Card Probe on windows machine using WSL2.
Please click here to view a walkthrough that I wrote that guides how to take an sd card inserted into Windows machine and mount it on WSL2
first, make sure that your WSL is version 2 otherwise this will not work. take a look at your WSL list by issuing, on admin powershell, `wsl --list` then issue `wsl --set-version Ubuntu 2` but rename Ubuntu to the name of your WSL. (if it is already version 2 then it will tell you.) then run `wsl --update`, then shutdown by issuing `wsl --shutdown`, then start it up again with `wsl` now, follow this page: https://docs.microsoft.com/en-us/windows/wsl/connect-usb this tutorial includes the following: 1. the user downloads the msi from the latest release https://github.com/dorssel/usbipd-win/releases 2. the user runs the msi and runs the installer to completion 3. the user goes into the WSL linux system, if not in the WSL already, by issuing `wsl` in admin powershell and then issues the following commands: ```bash you@yourwsl:/mnt/c/Windows/system32$ sudo apt install linux-tools-5.4.0-77-generic hwdata -y you@yourwsl:/mnt/c/Windows/system32$ sudo update-alternatives --install /usr/local/bin/usbip usbip /usr/lib/linux-tools/5.4.0-77-generic/usbip 20 ``` then exit the wsl by issuing `exit` and then running, in a NEW instance of admin powershell, `wsl`, then `exit`, then `usbipd wsl list` now we can connect the BUSID that pertains to our SD card PS C:\Windows\system32> usbipd wsl list BUSID VID:PID DEVICE STATE 2-6 0bda:0177 Realtek USB 2.0 Card Reader Not attached now we issue `usbipd wsl attach --busid 2-6` and we run cms burn infocms burn info fails, on both branches main and windows.
the genesys logic inc logilink is my sd card but it fails