Writing to '\\.\X:' that has no backing PhysicalDrive?
Andrey Repin
anrdaemon@yandex.ru
Thu Oct 24 09:09:12 GMT 2024
Greetings, Ilya Basin!
> Hi.
> I was trying to write an .img file to a VeraCrypt drive.
> VeraCrypt doesn't create a virtual PhysicalDrive so tools like Rufus don't see it.
> I hoped that with cygwin I would be able to do that, but Cygwin only
> creates /dev/sd?? nodes for PhysicalDrive partitions.
> I tried `dd` with '\\.\X:', but it can't open for writing because it treats it as a directory (reading succeeds).
> $ dd count=1 if='\\.\E:' | xxd
> 1+0 records in
> 1+0 records out
> 512 bytes copied, 0.0213007 s, 24.0 kB/s
> 00000000: eb52 904e 5446 5320 2020 2000 0208 0000 .R.NTFS .....
> ...
> $ dd if=/dev/null count=0 of='\\.\E:'
> dd: failed to open '\\.\E:': Is a directory
> Same error in MSYS2.
> Does cygwin provide some (hidden) /dev/ nodes for drive letters or volumes
> like "\\?\Volume{GUID}"? Can I create one with mknod?
Drive letters are not necessarily backed by physical drives.
F.e. subst drives.
> My current workaround is a PowerShell/.NET script that calls
> CreateFile/WriteFile with proper flags.
> Rufus doesn't show any hard drives, Win32DiskImager crashes on launch.
> Surprisingly, I couldn't find a decent GUI program for this task.
--
With best regards,
Andrey Repin
Thursday, October 24, 2024 12:08:30
Sorry for my terrible english...
More information about the Cygwin
mailing list