X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BAE52385770A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1695457316; bh=7No74aCsLQ/i+elbz/Ab3HsZQbBobtoLlXD/7lnaukA=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=dKnz+PEUROvDRLrvo589t2zoS3B57eMcJ3Z6O6zUim5QIenzjBSqmpqlekoYQdraR 3YDnJrWtF8OsFU1aa1GM2AlzYiY7nyUt7YDWqkALvtgUSbWptPj8oqRGYXmncLlbQQ Yj+x/TI8oTj2LtvDlRLrBH9Ieu5ZJW5B3E/Hax30= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C1C6F3858C30 Subject: Re: /usr/bin/dd *.iso to USB stick? To: cygwin AT cygwin DOT com References: Message-ID: <6f3e6584-d435-b084-dbc3-f130c259b026@t-online.de> Date: Sat, 23 Sep 2023 10:21:02 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 SeaMonkey/2.53.16 MIME-Version: 1.0 In-Reply-To: X-TOI-EXPURGATEID: 150726::1695457262-E1583FD5-896C7060/0/0 CLEAN NORMAL X-TOI-MSGID: 9b43c4cb-4308-4343-b97b-23f6c1e03041 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, FREEMAIL_FROM, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Christian Franke Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 38N8Lv5W002122 Jim Garrison via Cygwin wrote: > On 9/21/2023 22:40, Martin Wege via Cygwin wrote: >> Hello, >> >> How can I use /usr/bin/dd to copy a *.iso image (Debian netinstall >> boot image) to a USB stick as raw bytes? > > I do this frequently.  You must start the Cygwin shell with admin > rights, then use Windows Disk Management mmc app to identify > the disk and convert from Disk n to /dev/sd[x], where Disk 0 is > /dev/sda, Disk 1 is /dev/sdb, etc. > > BIG CAVEAT: You're in admin mode.  Use the wrong device name and you > will trash target device if it's writable, including your Windows boot > drive.  And no, the boot drive is not always Disk0 /dev/sda. > > I always use hexedit to examine enough of the target device to assure > myself that it's the correct target. This is much easier if 'ddrescue --ask' is used instead of 'dd' (https://cygwin.com/packages/summary/ddrescue.html). It prints device size, identify string and serial "number" string if available and asks for confirmation then: # ddrescue --ask --force image.iso /dev/sde GNU ddrescue 1.27 About to copy 4671 MBytes from 'image.iso' (4_562_040Ki)   to '/dev/sde' [Kingston DataTraveler 3.0::EE03D85142E0] (14_784Mi) Proceed (y/N)? y ... Device identity is also printed if the destination is a partition (/dev/sde1) on that device. The --force (-f) option is required if the destination is not a regular file. Note that for (S)ATA devices, the serial may be printed in the unusual LE word string byte order from ATA IDENTIFY data. This is a minor bug in some layer behind IOCTL_STORAGE_QUERY_PROPERTY. ddrescue also works with some /proc/sys block devices as source, for example /proc/sys/Device/HarddiskVolumeShadowCopy2 or /proc/sys/Device/VeraCryptVolumeF  It could also be run from the limited WinPE environment, for example to create an image of C: if not booted. -- 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