Hello there.
Thanks a lot for making this tool and publishing it.
I have been looking for this kind of features for a while now, the WSL based alternative I found was not really cutting it.
Failing to mount LUKS device
Thought I would give it a try, but I stumbled upon this error I could not solve, so I was wondering if you had any idea on what might be the cause.
- How it was installed
Following INSTALL_WINDOWS.md:
- Grabbed the pre-built binaries from github, linsk v0.1.0 Initial release for amd64
- Installed QEMU and OpenVPN.
- What I ran
Following USAGE_WINDOWS.md, and running commands in cmd.exe
started as administrator.
- building using
linsk build
- Identified the device of interest:
\\.\PhysicalDrive3
- Listing detected partitions using
linsk ls
returns:
linsk ls dev:\\.\PhysicalDrive3
time=2023-09-06T19:37:43.107+09:00 level=WARN msg="Using raw block device passthrough. Please note that it's YOUR responsibility to ensure that no device is mounted in your OS and the VM at the same time. Otherwise, you run serious risks. No further warnings will be issued." caller=vm
time=2023-09-06T19:37:43.156+09:00 level=INFO msg="Booting the VM" caller=vm
time=2023-09-06T19:37:58.318+09:00 level=INFO msg="The VM is up, setting it up" caller=vm
time=2023-09-06T19:38:05.043+09:00 level=INFO msg="The VM is ready" caller=vm
NAME SIZE FSTYPE LABEL
vda 1G
├─vda1 300M ext4
├─vda2 256M swap
└─vda3 467M ext4
vdb 931.5G
├─vdb1 250G ntfs ELECOM USBH
└─vdb2 681.5G crypto_LUKS
time=2023-09-06T19:38:06.475+09:00 level=WARN msg="Canceling the VM context" caller=vm
time=2023-09-06T19:38:06.525+09:00 level=WARN msg="Sending poweroff command to the VM" caller=vm
time=2023-09-06T19:38:06.536+09:00 level=INFO msg="Shutting the VM down safely" caller=vm
- Attempt at mounting the LUKS partition:
linsk run -l dev:\\.\PhysicalDrive3 vdb2 ext4
time=2023-09-06T19:39:57.966+09:00 level=INFO msg="Created network tap" name=LinskTap-1693996797477168400
time=2023-09-06T19:39:57.998+09:00 level=INFO msg="Configured network tap" name=LinskTap-1693996797477168400 cidr=fe8f:5980:3253:7df4:f4b:6db1:a1d8:fc66/127
time=2023-09-06T19:39:58.046+09:00 level=WARN msg="Using raw block device passthrough. Please note that it's YOUR responsibility to ensure that no device is mounted in your OS and the VM at the same time. Otherwise, you run serious risks. No further warnings will be issued." caller=vm
time=2023-09-06T19:39:58.096+09:00 level=INFO msg="Booting the VM" caller=vm
time=2023-09-06T19:40:13.228+09:00 level=INFO msg="The VM is up, setting it up" caller=vm
time=2023-09-06T19:40:19.957+09:00 level=INFO msg="The VM is ready" caller=vm
time=2023-09-06T19:40:20.598+09:00 level=INFO msg="Mounting the device" dev=vdb2 fs=ext4 luks=true
time=2023-09-06T19:40:20.641+09:00 level=INFO msg="Attempting to open a LUKS device" caller=file-manager vm-path=/dev/vdb2
Enter Password:
time=2023-09-06T19:40:26.933+09:00 level=INFO msg="LUKS device opened successfully" caller=file-manager vm-path=/dev/vdb2
time=2023-09-06T19:40:32.577+09:00 level=ERROR msg="Failed to mount the disk inside the VM" error="run mount cmd: run cmd (log: 'mount: /mnt: can't read superblock on /dev/mapper/cryptmnt.\\n dmesg(1) may have more information after failed mount system call.'): Process exited with status 32"
time=2023-09-06T19:40:32.577+09:00 level=WARN msg="Canceling the VM context" caller=vm
time=2023-09-06T19:40:32.624+09:00 level=WARN msg="Sending poweroff command to the VM" caller=vm
time=2023-09-06T19:40:32.634+09:00 level=INFO msg="Shutting the VM down safely" caller=vm
time=2023-09-06T19:40:33.889+09:00 level=INFO msg="Deleted network tap" name=LinskTap-1693996797477168400
For reference, I can mount that partition on a native linux machine with:
cryptsetup open /dev/sdXY cryptmnt
mount /dev/mapper cryptmnt /mnt
I tried to mount the ntfs
device vdb1
instead.
While the mounting did succeed, I could not access the network share.
After entering the address into Windows Epxloror, it prompts for the username (linsk) and password (randomly generated one), but even after entering those two as per instructions, it shows:
![image](https://private-user-images.githubusercontent.com/21224272/265988417-8133b3f3-693d-4e5e-b6f1-c7291f0197d4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMzY1MjksIm5iZiI6MTcyMzIzNjIyOSwicGF0aCI6Ii8yMTIyNDI3Mi8yNjU5ODg0MTctODEzM2IzZjMtNjkzZC00ZTVlLWI2ZjEtYzcyOTFmMDE5N2Q0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA5VDIwNDM0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEzZDEyNDFiZmEzY2UzYWJmZmQ3NzU1OTQ2NjIwZmVhY2ViOTFhYWEyZDI2NTA3OTc4ZDRmOGQ1NDA1NzA1MWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.681OMfGpDK3COzhkEYEl0ZrWYskazE5c_C3qsvAxc24)
I am not that familiar with Network Shares, so maybe I am doing it completely wrong.
Would appreciate any feedack or additional instructions on how to do this.
Suggestion for INSTALL_WINDOWS
After installing qemu
using the link provided, the install path of qemu-img
had to be added to the PATH
environment variable of Windows, otherwise, running linsk build
would throw an error along the line of could not find 'qemu-img' in %PATH%
.
It might be worth mentioning to make the downstream usage experience smoother.
Suggestion for USAGE_WINDOWS
Around here, after identifying the disk of interest, it might be worth adding a note for the user to make sure that drive is not mounted by Windows.
One way to do it is to start diskmgmt
, select the corresponding drive, and putting it "Offline".
There might be an equivalent wmic
command, but not much time to look it up sorry.
Others
Not sure if those features are already there, or on the roadmap, but here are some things I thought would be a nice addition while trying to get it running.
- Ability to specify or fix the SMB Network share address, as well as login username and password for more persistent usage. (Namely,, I would like to keep that
vdb2
partition available all the time at a fixed location. Having to log in every time with different credential is not really convenient for this use case.)
Thanks a lot for your time.
Best regards.