You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using WSL to mount encrypted backup drives, I noticed a strange behavior that doesn't emulate bare-metal installations very well. When opening an encrypted backup, I'd generally expect to find the device in /dev/sgX(Y) or the opened LUKS container in /dev/mapper. I ended up having to search through many /dev/* directories to find what is shown below and did end up getting it to work - however, this will be confusing for those coming from a primarily Linux world.
To mount the device in WSL from powershell:
GET-CimInstance -query "SELECT * from Win32_DiskDrive"
wsl --mount \\.\PHYSICALDRIVE3 --bare
From Ubuntu WSL (apologies for misfires and searching, but I believe it shows the problem nicely.
16 cryptsetup luksOpen /dev/sdg1 cryptbackup
17 sudo apt install cryptsetup-bin
18 cryptsetup luksOpen /dev/sdg1 cryptbackup
19 lsblk
20 cryptsetup luksOpen sdg cryptbackup
21 /dev/disk/
22 ls /dev/block/
23 ls
24 ls /dev/disk
25 ls /dev/disk/by-path/
26 cd /dev/
27 ls
28 cd virtio-ports/
29 ls
30 cd ..
31 ls
32 cd mapper/
33 ls
34 cd ..
35 ls
36 ls dri/
37 ls block
38 ls disk
39 ls disk/by-*
40 lsblk
41 sudo cryptsetup luksOpen '/dev/disk/by-partuuid/Linux\x20LUKS' luksbup
42 sudo cryptsetup luksOpen '/dev/disk/by-partlabel/Linux\x20LUKS' luksbup
43 mkdir /tmp/cryptbup
44 ls /dev/
45 cd /dev/mapper/
46 ls
47 cd ..
48 ls
49 mv /tmp/cryptbup/ /tmp/luksbup
50 ls
51 mount /dev/mapper/luksbup /tmp/luksbup/
52 sudo mount /dev/mapper/luksbup /tmp/luksbup/
53 ls /tmp/luksbup/
54 ls
55 cd /tmp/luksbup/
56 ls
The text was updated successfully, but these errors were encountered:
While using WSL to mount encrypted backup drives, I noticed a strange behavior that doesn't emulate bare-metal installations very well. When opening an encrypted backup, I'd generally expect to find the device in /dev/sgX(Y) or the opened LUKS container in /dev/mapper. I ended up having to search through many /dev/* directories to find what is shown below and did end up getting it to work - however, this will be confusing for those coming from a primarily Linux world.
To mount the device in WSL from powershell:
From Ubuntu WSL (apologies for misfires and searching, but I believe it shows the problem nicely.
The text was updated successfully, but these errors were encountered: