From owner-freebsd-arm@freebsd.org Mon Jul 15 09:15:56 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 475DCB5060 for ; Mon, 15 Jul 2019 09:15:56 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:300:2185:123::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14F7086F32 for ; Mon, 15 Jul 2019 09:15:55 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [104.207.135.49]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id x6F9FrFT061431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Jul 2019 10:15:53 +0100 (BST) (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id x6F9FqES061430; Mon, 15 Jul 2019 10:15:52 +0100 (BST) (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <201907150915.x6F9FqES061430@donotpassgo.dyslexicfish.net> Date: Mon, 15 Jul 2019 10:15:52 +0100 Organization: Dyslexic Fish To: sparvu@kronometrix.org, freebsd-arm@freebsd.org Subject: Re: recreate FreeBSD 12 ARM image References: <23ABC4DD-840D-4C63-ACCF-4DF6BC801CF0@kronometrix.org> In-Reply-To: <23ABC4DD-840D-4C63-ACCF-4DF6BC801CF0@kronometrix.org> User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [104.207.135.49]); Mon, 15 Jul 2019 10:15:53 +0100 (BST) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2019 09:15:56 -0000 Stefan Parvu wrote: > Suppose I have installed FreeBSD 12 on a 32GB microSD under RBPI3B+ and I have > configure it as I want, add my own software and now I want to re-create the image as > small as possible say as the original. Is it possible to do something like this ? Anyone > any advices, tips how can you do this ? Do you mean make a snapshot copy of the card so you can distribute it elsewhere, but with the copy of the (largely empty) disk not using the full 32GB? I.E. Stick the card into another system, don't mount it, but do: dd if=/dev/DEVICE-NAME bs=1m | gzip -c > img.gz This will copy the disk image, and compress it with gzip before saving it to the file.