From nobody Thu Jan 23 20:10:14 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 4YfBrk73x9z5lQ5B for ; Thu, 23 Jan 2025 20:10:30 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YfBrk5Dlcz3J1D for ; Thu, 23 Jan 2025 20:10:30 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-5401ab97206so1411353e87.3 for ; Thu, 23 Jan 2025 12:10:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737663028; x=1738267828; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jtNUDq/p8j/BtIM+qnba2wAWv1J8n0E1FuJxcfKQdNs=; b=FYWuiRV/4K8FTtTdNO1cAAeyU7aETvL+EN0IUdB76bM79O09OWeC0egjtszBZleP7c hkBhejkHYwWOTQv2UFcT+hjIANUOow1YsnThYphjX8zVwCUs/eHgOtTuav3s6LUkDwbG 0MnDYJWXBlA7K1n8A0uIn7LhW4/efLlhjDWcYv8+ol8lEyHArbC/09ogAdFyuCNZ2Id0 LrrPnCTpb3+F2cd1OhDK8OBhEix87aWec1ZkLws4u/2MVOxl0sIJ+gTpU9FJsDsQfeJf aWFHcqb+iWtHEKcsrcq2rBHuHp81swZ92fZjCmvmuk5d1A4v+WRW2bds/GwQ2ABxeMvy 6UrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737663028; x=1738267828; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jtNUDq/p8j/BtIM+qnba2wAWv1J8n0E1FuJxcfKQdNs=; b=IlOfTvbHGDIqnShmcKsaBNCzYCRIqtTr/5V2IDUz8o/WfMZGr6HbNViZc3JYo0n3xd wIK2JiZNWt7VNcHIWPJakamFG593O9jU4xLLlMxosEDhxvGETFxifFx9njo6EBj4HxSV susbrnbGq93b2AFpL+1DSgFFei0ucDNzgRiAROoo41eusaldywYFezqyBy9A8gt3nLLp MX+t/UIvq/LAyMYdl3edI9DKCIy18UPxdfSYGZ9lky3oS5TPUBVheYUX71iF6Pa+Ohea K+cWfcA/VQLvt+rOJZiI5LfJI3Ho5PIfwetM19pOjVlWlpT6SPHmeoDuay8H8ubPwNnY Qb2w== X-Gm-Message-State: AOJu0YxOTXnkv1Hf+lU4scPipbxa3brVQj5hpP88kdy0Bn4whB4HfN6v P3C097qYDxeIccMQlBsd/BQkTflkMto7KARwX+PzcZdDro1BQ8bFpsfw6xw0u4st3yKtzthn2sd 1DvKMs8CKGaWS9/7uxdDxpmJj3VwSJjcnWMw= X-Gm-Gg: ASbGnctgg0+GS0MUXmzQioReIAZd9eyrsMqN3VY1nLZUWuBzHs4PoMRiBcijwg8IlKl P8kWsrHJxJgIFEjlLuUVYnht0CQXi73VKb+kWfx/0QjICoyM3hs8ThlF7WGmE X-Google-Smtp-Source: AGHT+IFQfh7vF0OjMBL/VE4xqoN/LCFtTBIcxL7WgMaC4k2u/fdam2jtnscwP6IcPJHo4UUAVmMK+Bal2Ak48NkVDQA= X-Received: by 2002:ac2:5225:0:b0:542:241e:75ac with SMTP id 2adb3069b0e04-5439c22a913mr8422971e87.5.1737663027212; Thu, 23 Jan 2025 12:10:27 -0800 (PST) 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 References: <80444fa1-51a8-469e-a15d-55b255196d6a@dreamchaser.org> In-Reply-To: <80444fa1-51a8-469e-a15d-55b255196d6a@dreamchaser.org> From: Michael Schuster Date: Thu, 23 Jan 2025 21:10:14 +0100 X-Gm-Features: AbW1kvZhJRXz0XIiu44ZY6uCjpIBPloMVvd6xtKozsLzbVYnAmtNJa92b5nECwQ Message-ID: Subject: Re: Why doesn't 13_4 img (1.3G) write to a 4 G memstick? To: freebsd@dreamchaser.org Cc: FreeBSD Mailing List Content-Type: multipart/alternative; boundary="00000000000079f87a062c653361" X-Rspamd-Queue-Id: 4YfBrk5Dlcz3J1D X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --00000000000079f87a062c653361 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. HTH Michael 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 =E2=86=93 File Size =E2=86=93 Date =E2=86=93 > 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=3D/dev/da0 bs=3D1M conv=3Dsync > 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 > =3D> 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 > =3D> 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? > > > --00000000000079f87a062c653361 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'd do=C2=A0

xz --decompress < /hd2/Downloads/FreeBSD/13= _4/FreeBSD-13.4-RELEASE-amd64-memstick.img.xz > tmp.img

=C2=A0and then look at the size of that = file.=C2=A0

HTH=C2=A0
Michael=C2=A0



On Thu, Jan 23, 2025, 20:58 Gary Aitken <freebsd@dreamchaser.org> wrote:
I'm trying to create a boo= table backup memory stick on a 4G stick.

=C2=A0From https://down= load.freebsd.org/releases/amd64/amd64/ISO-IMAGES/13.4/
File Name=C2=A0 =E2=86=93=C2=A0 =C2=A0 File Size=C2=A0 =E2=86=93=C2=A0 =C2= =A0 Date=C2=A0 =E2=86=93
FreeBSD-13.4-RELEASE-amd64-memstick.img 1342689792=C2=A0 =C2=A0 =C2=A0 2024= -Sep-13 10:15

That looks like 1.3 G to me.

$ xz --decompress < /hd2/Downloads/FreeBSD/13_4/FreeBSD-13.4-RELEASE-amd= 64-memstick.img.xz | dd of=3D/dev/da0 bs=3D1M conv=3Dsync
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
=3D>=C2=A0 =C2=A0 =C2=A063=C2=A0 7831472=C2=A0 da0=C2=A0 MBR=C2=A0 (3.7G= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 63=C2=A0 7831472=C2=A0 =C2=A0 1=C2=A0 (null)=C2= =A0 (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
=C2=A0 =C2=A0 Mediasize: 4009713664 (3.7G)
=C2=A0 =C2=A0 Sectorsize: 512
=C2=A0 =C2=A0 Stripesize: 0
=C2=A0 =C2=A0 Stripeoffset: 32256
=C2=A0 =C2=A0 Mode: r0w0e0
=C2=A0 =C2=A0 efimedia: HD(1,MBR,00000000,0x3f,0x777fb0)
=C2=A0 =C2=A0 rawtype: 11
=C2=A0 =C2=A0 length: 4009713664
=C2=A0 =C2=A0 offset: 32256
=C2=A0 =C2=A0 type: fat32
=C2=A0 =C2=A0 index: 1
=C2=A0 =C2=A0 end: 7831534
=C2=A0 =C2=A0 start: 63
Consumers:
1. Name: da0
=C2=A0 =C2=A0 Mediasize: 4009745920 (3.7G)
=C2=A0 =C2=A0 Sectorsize: 512
=C2=A0 =C2=A0 Mode: r0w0e0

After writing:

$ gpart show -l da0
=3D>=C2=A0 =C2=A0 =C2=A0 1=C2=A0 7831534=C2=A0 da0=C2=A0 MBR=C2=A0 (3.7G= )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01=C2=A0 =C2=A0 66584=C2=A0 =C2=A0 1=C2=A0= (null)=C2=A0 (33M)
=C2=A0 =C2=A0 =C2=A066585=C2=A0 2555856=C2=A0 =C2=A0 2=C2=A0 (null)=C2=A0 [= active]=C2=A0 (1.2G)
=C2=A0 =C2=A02622441=C2=A0 5209094=C2=A0 =C2=A0 =C2=A0 =C2=A0- free -=C2=A0= (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
=C2=A0 =C2=A0 Mediasize: 34091008 (33M)
=C2=A0 =C2=A0 Sectorsize: 512
=C2=A0 =C2=A0 Stripesize: 0
=C2=A0 =C2=A0 Stripeoffset: 512
=C2=A0 =C2=A0 Mode: r0w0e0
=C2=A0 =C2=A0 efimedia: HD(1,MBR,0x90909090,0x1,0x10418)
=C2=A0 =C2=A0 rawtype: 239
=C2=A0 =C2=A0 length: 34091008
=C2=A0 =C2=A0 offset: 512
=C2=A0 =C2=A0 type: efi
=C2=A0 =C2=A0 index: 1
=C2=A0 =C2=A0 end: 66584
=C2=A0 =C2=A0 start: 1
2. Name: da0s2
=C2=A0 =C2=A0 Mediasize: 1308598272 (1.2G)
=C2=A0 =C2=A0 Sectorsize: 512
=C2=A0 =C2=A0 Stripesize: 0
=C2=A0 =C2=A0 Stripeoffset: 34091520
=C2=A0 =C2=A0 Mode: r0w0e0
=C2=A0 =C2=A0 efimedia: HD(2,MBR,0x90909090,0x10419,0x26ffd0)
=C2=A0 =C2=A0 attrib: active
=C2=A0 =C2=A0 rawtype: 165
=C2=A0 =C2=A0 length: 1308598272
=C2=A0 =C2=A0 offset: 34091520
=C2=A0 =C2=A0 type: freebsd
=C2=A0 =C2=A0 index: 2
=C2=A0 =C2=A0 end: 2622440
=C2=A0 =C2=A0 start: 66585
Consumers:
1. Name: da0
=C2=A0 =C2=A0 Mediasize: 4009745920 (3.7G)
=C2=A0 =C2=A0 Sectorsize: 512
=C2=A0 =C2=A0 Mode: r0w0e0

Despite the website claim of 1.3G size,
it looks like the uncompressed file is larger than 4G; dd said it transferr= ed
4G+ bytes.=C2=A0 But da0s2 says it's only 1.2G after the failed write.<= br> Piped into wc -c it says 1342689792 (1.3G)

Is there some magic I need to invoke?


--00000000000079f87a062c653361--