From nobody Wed Sep 13 16:25:29 2023 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 4Rm5R1125hz4tL0J for ; Wed, 13 Sep 2023 16:25:33 +0000 (UTC) (envelope-from johnl@iecc.com) Received: from gal.iecc.com (gal.iecc.com [IPv6:2001:470:1f07:1126:0:43:6f73:7461]) (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 (2048 bits) client-digest SHA256) (Client CN "gal.iecc.com", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rm5R05QZqz3b29 for ; Wed, 13 Sep 2023 16:25:32 +0000 (UTC) (envelope-from johnl@iecc.com) Authentication-Results: mx1.freebsd.org; none Received: (qmail 3416 invoked from network); 13 Sep 2023 16:25:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=iecc.com; h=date:message-id:from:to:cc:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:cleverness; s=d56.6501e27a.k2309; bh=Qq8UoKHew9LHTxRrRBu+7hUpf/N99KQhshEkltnc0jY=; b=e8upJtMMl08M3fiTwbKSJNboFnlbY4B0UHPLrHbpCnJcIQ6zdd9pslLhS0xTZ3iZpCk5kx5GutdnyOEn7RurmjdG00qPjY1eSDFEfBkw3mI11R1l5SpAyj051hL3COsQG1gkIl3J1mHvN3RKUS763FtuBwMH6s70uIxtU1Vrgm7aRY7njGyJZoCeeoXKhZW2xFl+l2q3tYUXGLSl+x55m/+3pKoBw3iPC3O47nwdwfiu+xqCtXzJMzy1q7NYEybl4adoYwyYliuM0bBuBtcsG51UmycUMhjEqOOmJoQMJIJWBYlmp7IvV4ySPRMc5P5JoOpQ/WtcL5mx8Cz/OXhvTA== Received: from ary.local ([IPv6:2001:470:1f07:1126::78:696d:6170]) by imap.iecc.com ([IPv6:2001:470:1f07:1126::78:696d:6170]) with ESMTPS (TLS1.3 ECDHE-RSA CHACHA20-POLY1305 AEAD) via TCP6; 13 Sep 2023 16:25:30 -0000 Received: by ary.local (Postfix, from userid 501) id DEB0A888CE5; Wed, 13 Sep 2023 12:25:29 -0400 (EDT) Date: 13 Sep 2023 12:25:29 -0400 Message-Id: <20230913162529.DEB0A888CE5@ary.local> From: "John Levine" To: freebsd-questions@freebsd.org Cc: ml@netfence.it Subject: Re: Mount bzip2 disk image In-Reply-To: Organization: Taughannock Networks X-Headerized: yes Cleverness: minimal List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 8bit 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:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4Rm5R05QZqz3b29 It appears that Andrea Venturoli said: >Hello. > >I've got a bzip2-compressed quite big HD image. Is there a way to mount >it (read-only) without uncompressing it first? I don't care about >performance as I only need to recover a single file. >Uncompressing it would probably take days, provided enough space is >available (which I'm not sure is the case). > >The idea would be: >_ mdconfig -a -f xxx.img.bz2 >_ .... use something over /dev/md0 to get /dev/xxx >_ mount /dev/xxxp4 /mnt/tmp. > >Does such a thing exist? bzip2 is a block compressor so in principle you can recover a block at a time, but the blocks are variable size on bit boundaries so you have to scan through it to find where the blocks are. My advice would be to spin up a FreeBSD machine at AWS, attach a big disk in their cheapest slowest disk type, then upload, decompress, mount, and then delete the AWS stuff. It might take a week but would likely only cost 10 euros.