delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/12/29/13:13:14

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 4BTIDECR1966895
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 4BTIDECR1966895
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=NTmfHRH4
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F3A893858420
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1735495992;
bh=r+TXGuJctckCaB8yQ/LBv2XXZTnXP1waTRlmiLQ9HMg=;
h=Date:Subject:To:Cc:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=NTmfHRH4MBmOrRAERmkm8UAUjGZot1JikQ4ufnGbGJoqPj0/Ws44bRgdt7D3ruG7y
06/csDwlcwI8B2IHKhZw+rH2rK2mW+dwseIS8r8OivRA4FmLB/63SQB7eaO5RLccAJ
elCgmMXQ1JTdcR8uaiT/VgcMkmNQxnvbJZsYF3ew=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D18EC3858D34
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D18EC3858D34
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735495926; cv=none;
b=lEuPfZ77m5WonVH9VvDNhylPzw3vaqP1VynGHOcxDvO7Q6HeKmTGuGZ9SBdAteslTtyoErnpIjiZlCpRMfrhq6zNM6wxNr/sGz7s1RN71FtS/BnlQrvZqfHPpBawqIP4qtcDOibUzrqn/mKviPvbTmvGweEyMbmwnWBOXBwT93M=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1735495926; c=relaxed/simple;
bh=nECnfru1E95JYX/T0trcXoyzs0qQgP2XeAQtTBpq8wY=;
h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;
b=gL+aHAN0gn56WkcBdF6X+wwJqUpwWI9wBE33FFo+FwRM0wIiuSrtxozNYh8uL2LoG6k+KHL7TAaJvwXThYXCDTQxUJsjJUre81mp9xfZmo0GHICTBvhZX3Q66ow3fKDd/9/aFyYjsUcqJmNXvj4w7N8YOE7MUAJDe6eKzDXK4Fc=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D18EC3858D34
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1735495923; x=1736100723;
h=content-transfer-encoding:in-reply-to:content-language:from
:references:cc:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=ffC2OkWYZurIrho9MgUQ2GnDKPh6yS+lZSCgVSV6Kfo=;
b=EhmMvN1vMhmO4CBbxLpbSsA/MRyHfKKrGwZMBbm2uSWfXMOxI/XouXcTC/bzTLDRY+
QotX9RiYS47+X8yB17Q+VZHJgEZz48ggECRFdT15my2mMJflIFdDnsYbBtoo3wuFgzR1
42cWruZr+5feNf4AW1CbHt0UDfQR4KgW7XEBMzwCb/qcyDjkTSTSv0jtWpSRWrD+TnZn
/fyDoB2zHgp7WqiJUVIWamLCS0otRXmup1hG9UwS/oU7OHhocMyTcgjaKUOw9RvE5CrH
tGxHwxnR5jgEQxoG7uc15IIa/mU9yBGum1wIAHN09Y6mS/SEXpY+xcF5a9t7vs7m4lcc
5Sew==
X-Gm-Message-State: AOJu0YxS538uskf/8myLERwxlMl20JAjfvKfir9BSXejiZTOg7k2uRfz
DJcr10ZQGP6Q7/lz6vo7fZd5g2QqeJhz0ydUnm/oqZpnldZB5+pdbGis8N4vU28=
X-Gm-Gg: ASbGnctQTSXMXOA5mbW3xt8vW5i5SWH9bKnypla6YVWYmQVpKTaLtZcu4jt4wk1eb8e
fI9pqh0tipOgkQNvvCpFG/orGZoC9lhkxBr3exrozQNuntgkuhFQXJRfl1BSMsyABSHtNEXktqd
w8WnB1w2GtGqiM4ez/6Gj3YsDI5g6Fockn6xqUnyUnoJxqj/30NRRWFTb2x72bT9mumqA45aJjD
6fmsJZuZEEh5ZaJGNgiO0ayjIiA3DaEZZjj83TqbUXvZ+Zxd0K0Y5g8njlPLqdmoM4AWgH6ABwo
2EJJLTdiPIMl5Ln3GXQ=
X-Google-Smtp-Source: AGHT+IFfT+JZgLFv4y1sOAE0zpCFxuJN2tvjIyjG1CfwarHRSS/zp7dnY2R92dOdW1w0ur7ct8A/kg==
X-Received: by 2002:a05:6512:3d0c:b0:542:2e04:edb3 with SMTP id
2adb3069b0e04-5422e04f1f3mr9424924e87.49.1735495923171;
Sun, 29 Dec 2024 10:12:03 -0800 (PST)
Message-ID: <37d26ed5-35a8-4f74-b1f2-3101c8ca0996@gmail.com>
Date: Sun, 29 Dec 2024 22:11:57 +0400
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: RE: Writing to '\\.\X:' that has no backing PhysicalDrive?
To: cygwin AT cygwin DOT com
Cc: Christian Franke <Christian DOT Franke AT t-online DOT de>
References: <a6a5b28d-9d57-4b5d-82b2-b4090e55e1fd AT gmail DOT com>
<85bb9413-91f0-5776-3f0a-3917e5a153ad AT t-online DOT de>
In-Reply-To: <85bb9413-91f0-5776-3f0a-3917e5a153ad@t-online.de>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Ilya Basin via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Ilya Basin <basinilya AT gmail DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

Thanks Christian.

exec 4> /proc/sys/DosDevices/E:

works.


-------- Original Message --------
From: Christian Franke via Cygwin <cygwin AT cygwin DOT com>
Sent: Thursday, October 24, 2024 at 9:50 PM UTC+4
To: cygwin AT cygwin DOT com
Cc: Christian Franke <Christian DOT Franke AT t-online DOT de>
Subject: RE: Writing to '\\.\X:' that has no backing PhysicalDrive?

Ilya Basin via Cygwin wrote:
>> 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

Could reproduce this. The inconsistency between open for reading vs. writing of '\\.\E:' is actually interesting. Subtle bug in Cygwin?


>>
>> 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?

Alternatively, VeraCrypt Volumes could be accessed via:

$ ls -l /proc/sys/DosDevices/E:
lr--r--r-- 1 ... /proc/sys/DosDevices/E: -> /proc/sys/Device/VeraCryptVolumeE

But /proc/sys is completely R/O like /proc/registry, so you cannot write the image via this path.

OT:
/proc/sys/Device/HarddiskVolumeShadowCopyN[/PATH/TO/FILE] allows to read the image and individual files from a volume shadow copy.


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019