From nobody Sun Oct 2 02:26:19 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mg7BP4NRkz4ddwj for ; Sun, 2 Oct 2022 02:26:21 +0000 (UTC) (envelope-from leres@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mg7BP3yYhz3nP7; Sun, 2 Oct 2022 02:26:21 +0000 (UTC) (envelope-from leres@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664677581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T+L7UFB7glUkyAMADX2vpMAxXkNpq7WvaeoE+gAfhSM=; b=rrYDMI8yXg23vfRqDQH8jy4dZKjbrxgoyoa6pz/TgIEgwpU/xyDt/7wJLoAkQrcNxH/Okp MOgUERKh5sIihZEYNrWKlpmYiQkxxlFm0kfN2V+1xpWKxJMp5Q/Lcsp0DwPvKMjuaC+U8P GYIkKXgBmHL585A+TXVY2RWry4MG4VBiucEH4VjRFzNZJO185gPCiRbVgZpNu8bTXdpEmx wTOZBfS0366F/uYNTYl1goLqiSKNWh1xYJs61l/VTslwFf2R5pZgfO95JHR4yeQinZCymD eBAak4jLVGaEUMUAIt5NX/wmGaHZSgI9yseKdOS9HIcRaMKF18JvIPDVbnAUuA== Received: from [IPV6:fd:1965::2] (unknown [IPv6:2600:1700:a570:e20:f2ad:4eff:fe09:150e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: leres) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Mg7BP10hmz19SZ; Sun, 2 Oct 2022 02:26:21 +0000 (UTC) (envelope-from leres@freebsd.org) Message-ID: <1b5ba983-db7f-9387-3b09-e07cb6895f82@freebsd.org> Date: Sat, 1 Oct 2022 19:26:19 -0700 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: Block sizes for dd(1) to USB memory sticks (flash drives) for installers for FreeBSD Content-Language: en-US To: Graham Perrin , freebsd-hackers@freebsd.org References: <1cede94a-c114-17fa-a81c-bb58c2b5879c@freebsd.org> <3ea35f4d-8efa-cf93-d462-0d8ce997b7aa@freebsd.org> <49157a68-f015-d7fb-8b78-759e1b089359@freebsd.org> From: Craig Leres In-Reply-To: <49157a68-f015-d7fb-8b78-759e1b089359@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664677581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T+L7UFB7glUkyAMADX2vpMAxXkNpq7WvaeoE+gAfhSM=; b=CyA0lnsMPivQ4wk+LaTWMNdV7pbpJcPRwHQ5XDt2qhBeaTyuik51qJgzLWpJWEtr6QLFYI Hmm34WR/NJm5XSSNyJlbm3YNpo8Ww+g4M/08vi/tNa8kvoAaB7a1qq3fOrj11X+0FTvZUJ 4U7jZ2lIrK+TCrRWRqTy/xWwyrlyWgp4fJC05k2jWW1OJ3EmDEIw1y1N+LZ0HXnTtVlvHD 6UOq9jQr8We5l9Pa41L8gXe05IpQsOZ0Zjm19PN73lHRRkVaRw/RTAAYpq5qteAsdPRvz3 V8EV01LeJ67AZG0OeyD3nNT8oxwpIu7CZaGciu2TBwPLynLaS3UZnrHwkMzfzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664677581; a=rsa-sha256; cv=none; b=PawNOzqltK6fQDPJrf96g0mV52TdGQIsWwdH4TdbuFVTB3a/7PjuBOwULE7mUt4OmL3cVy eqkv6OOghIulHGjxGqEGC/17HBbR/+1wOCr9SNv2OvmEB7TlgksmbZU++F6vAeTaUVm/e2 Awazttol6nilJ4lM+LPCYD3qOxTHpjQz/2+lDkoFudxVgSMb+5haKNFFFegtgG8OWT6Sx0 0o8EuJXYdgvTwmNOtBmAGoW2BbKvYUb6mayMcXYsNhswSyTkrEjzvG9/G05kP+/Wj2vSqK Sg3p6jVWQk9MQQlVB3GgNHUmYp3pzqIo+5oAnSxm1s21vvlH60Bsq/oEs9Nyhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 10/1/22 16:45, Graham Perrin wrote: > Evidently, the difference in speed was my imagination. > > I found less than one second difference between these two commands: > > time recoverdisk -v FreeBSD-13.1-RELEASE-amd64-dvd1.iso /dev/da3 > > time gdd if=FreeBSD-13.1-RELEASE-amd64-dvd1.iso of=/dev/da3 > status=progress conv=sync bs=10M > > recoverdisk(1) is a great hint. Thanks. Years ago I had a failing HD that I wanted to image (maybe a TiVo disk?) dd wasn't cutting it so I looked around and found a tool someone wrote that would do large reads but reduce the buffer size when it encountered errors. Years later I discovered recoverdisk which is a nice implementation of this clever strategy. My only issue is that I find it super difficult to remember what it's called! Craig