DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 49OHqIoY4185760 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=LoBEExBZ X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C325385841F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1729792337; bh=vVXJfUS/zw6YF4CMkonwsLulbRPc7/vyifoLY7k5g4I=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=LoBEExBZ7IePy6vEXrtuMMJLD5WYWC6SExj1QX4RM/ajQdyNh+ND9NHmzWNapT4ZE diCOBI0FZQDZdzBGAX1LgF/FF7z6cYOXEM11iw7Vb/CliEyoqneiJlbwgmwI97z4UC 0pKs3YPaxBHMLUEgrn7hCUNfw53xO2+G+woxZe7w= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C4043858D21 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7C4043858D21 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729792267; cv=none; b=jlNaB9l557+rhtZR1fGV3/Flr6sc0dpHTgfMqdxJw09lQRPc21f3LEHThs5AcM7jHjq9o71TGlj3DCE42FoMclmhqu8hLikdLKzq6oMB6keoANChmbDKNUSBadks9PF/e4bROgCPHXWplh5EVN3uFBgOPHcsskCD2BnQ7a0eiJU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729792267; c=relaxed/simple; bh=lNqrGef1AyIpE88FTbZ9/OtL13QCH2ZY7la02EGh/DU=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=M/aHx2OpdKk/Nb1at3BRNsvvAYYnQk/wQjqsLuSlwjByBhEH06ra9VZ9bznVjLN0UlsdcwY5T+ZLd3FGcOir7+x+TzWFQSRarFMwlxwgvjAF6dhv/dmqoxqyhaW97QZiSDrQPPCLCUtTuKhdfCqOU8K/zFO5zCikrmiK8vWmWmc= ARC-Authentication-Results: i=1; server2.sourceware.org Subject: Re: Writing to '\\.\X:' that has no backing PhysicalDrive? To: cygwin AT cygwin DOT com References: Message-ID: <85bb9413-91f0-5776-3f0a-3917e5a153ad@t-online.de> Date: Thu, 24 Oct 2024 19:50:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 SeaMonkey/2.53.18.2 MIME-Version: 1.0 In-Reply-To: X-TOI-EXPURGATEID: 150726::1729792248-60FF75EF-E2D83E63/0/0 CLEAN NORMAL X-TOI-MSGID: 8ad41fc9-270b-4c86-a147-6a609342febd X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, FREEMAIL_FROM, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Christian Franke via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Christian Franke Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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. -- Regards, Christian -- 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