From nobody Thu Jan 23 21:31:49 2025 X-Original-To: freebsd-questions@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 4YfDfl0XxBz5lW2d for ; Thu, 23 Jan 2025 21:31:59 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from ns.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (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 ECDSA (prime256v1) client-digest SHA256) (Client CN "discoveriesinwood.com", Issuer "E6" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YfDfj2ZCCz3Th1 for ; Thu, 23 Jan 2025 21:31:57 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of freebsd@dreamchaser.org designates 66.109.141.57 as permitted sender) smtp.mailfrom=freebsd@dreamchaser.org; dmarc=none Received: from [192.168.151.122] (breakaway.dreamchaser.org [192.168.151.122]) by ns.dreamchaser.org (8.18.1/8.18.1) with ESMTP id 50NLVnYC004175 for ; Thu, 23 Jan 2025 14:31:49 -0700 (MST) (envelope-from freebsd@dreamchaser.org) Message-ID: <52bad083-f814-4570-80b9-e11338fb4cdb@dreamchaser.org> Date: Thu, 23 Jan 2025 14:31:49 -0700 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Why doesn't 13_4 img (1.3G) write to a 4 G memstick? From: Gary Aitken To: FreeBSD Mailing List Reply-To: freebsd@dreamchaser.org References: <80444fa1-51a8-469e-a15d-55b255196d6a@dreamchaser.org> Content-Language: en-US In-Reply-To: <80444fa1-51a8-469e-a15d-55b255196d6a@dreamchaser.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: inspected by milter-greylist-4.6.4 (ns.dreamchaser.org [192.168.151.101]); Thu, 23 Jan 2025 14:31:49 -0700 (MST) for IP:'192.168.151.122' DOMAIN:'breakaway.dreamchaser.org' HELO:'[192.168.151.122]' FROM:'freebsd@dreamchaser.org' RCPT:'' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (ns.dreamchaser.org [192.168.151.101]); Thu, 23 Jan 2025 14:31:49 -0700 (MST) X-Spamd-Result: default: False [0.11 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.38)[0.383]; ONCE_RECEIVED(0.20)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-0.17)[-0.173]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US]; RCVD_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; HAS_REPLYTO(0.00)[freebsd@dreamchaser.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[dreamchaser.org]; TO_DN_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; REPLYTO_DOM_NEQ_TO_DOM(0.00)[] X-Spamd-Bar: / X-Rspamd-Queue-Id: 4YfDfj2ZCCz3Th1 On 1/23/25 13:10, Michael Schuster wrote: > I'd do > > xz --decompress < /hd2/Downloads/FreeBSD/13_4/FreeBSD-13.4-RELEASE-amd64-memstick.img.xz > tmp.img > >  and then look at the size of that file. comes up the same $ ls -lt ... 1342689792 Jan 23 14:22 FreeBSD-13.4-RELEASE-amd64-memstick.img > On Thu, Jan 23, 2025, 20:58 Gary Aitken > wrote: > > I'm trying to create a bootable backup memory stick on a 4G stick. > >  From https://download.freebsd.org/releases/amd64/amd64/ISO-IMAGES/13.4/ > File Name  ↓    File Size  ↓    Date  ↓ > FreeBSD-13.4-RELEASE-amd64-memstick.img 1342689792      2024-Sep-13 10:15 > > That looks like 1.3 G to me. > > $ xz --decompress < /hd2/Downloads/FreeBSD/13_4/FreeBSD-13.4-RELEASE-amd64-memstick.img.xz | dd of=/dev/da0 bs=1M conv=sync > dd: /dev/da0: short write on character device > dd: /dev/da0: end of device > 3824+0 records in > 3823+1 records out > 4009745920 bytes transferred in 1526.615472 secs (2626559 bytes/sec) > Prior to writing, the memstick looked like this: > > $ gpart show -l da0 > =>     63  7831472  da0  MBR  (3.7G) >         63  7831472    1  (null)  (3.7G) > > $ gpart list da0 > Geom name: da0 > modified: false > state: OK > fwheads: 255 > fwsectors: 63 > last: 7831534 > first: 63 > entries: 4 > scheme: MBR > Providers: > 1. Name: da0s1 >     Mediasize: 4009713664 (3.7G) >     Sectorsize: 512 >     Stripesize: 0 >     Stripeoffset: 32256 >     Mode: r0w0e0 >     efimedia: HD(1,MBR,00000000,0x3f,0x777fb0) >     rawtype: 11 >     length: 4009713664 >     offset: 32256 >     type: fat32 >     index: 1 >     end: 7831534 >     start: 63 > Consumers: > 1. Name: da0 >     Mediasize: 4009745920 (3.7G) >     Sectorsize: 512 >     Mode: r0w0e0 > > After writing: > > $ gpart show -l da0 > =>      1  7831534  da0  MBR  (3.7G) >          1    66584    1  (null)  (33M) >      66585  2555856    2  (null)  [active]  (1.2G) >    2622441  5209094       - free -  (2.5G) > > $ gpart list da0 > Geom name: da0 > modified: false > state: OK > fwheads: 255 > fwsectors: 63 > last: 7831534 > first: 1 > entries: 4 > scheme: MBR > Providers: > 1. Name: da0s1 >     Mediasize: 34091008 (33M) >     Sectorsize: 512 >     Stripesize: 0 >     Stripeoffset: 512 >     Mode: r0w0e0 >     efimedia: HD(1,MBR,0x90909090,0x1,0x10418) >     rawtype: 239 >     length: 34091008 >     offset: 512 >     type: efi >     index: 1 >     end: 66584 >     start: 1 > 2. Name: da0s2 >     Mediasize: 1308598272 (1.2G) >     Sectorsize: 512 >     Stripesize: 0 >     Stripeoffset: 34091520 >     Mode: r0w0e0 >     efimedia: HD(2,MBR,0x90909090,0x10419,0x26ffd0) >     attrib: active >     rawtype: 165 >     length: 1308598272 >     offset: 34091520 >     type: freebsd >     index: 2 >     end: 2622440 >     start: 66585 > Consumers: > 1. Name: da0 >     Mediasize: 4009745920 (3.7G) >     Sectorsize: 512 >     Mode: r0w0e0 > > Despite the website claim of 1.3G size, > it looks like the uncompressed file is larger than 4G; dd said it transferred > 4G+ bytes.  But da0s2 says it's only 1.2G after the failed write. > Piped into wc -c it says 1342689792 (1.3G) > > Is there some magic I need to invoke? > >