From owner-freebsd-questions@freebsd.org Sun Dec 6 17:57:10 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B029F9A0C33 for ; Sun, 6 Dec 2015 17:57:10 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) (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 7F5CE1CE1 for ; Sun, 6 Dec 2015 17:57:10 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id tB6HqFqv039826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 6 Dec 2015 09:52:15 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.14.2/Submit) with UUCP id tB6HqF57039825; Sun, 6 Dec 2015 09:52:15 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: from fbsd81 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA00299; Sat, 5 Dec 15 21:00:07 PST Date: Sat, 05 Dec 2015 21:00:06 -0800 From: perryh@pluto.rain.com (Perry Hutchison) To: vsasjason@gmail.com Cc: freebsd-questions@freebsd.org Subject: resizing a memstick image, on FreeBSD 8 Message-Id: <5663c0d6.8giker3InrIlK8n+%perryh@pluto.rain.com> References: <566299bf.2z11XFWfUMRFyXGs%perryh@pluto.rain.com> In-Reply-To: User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2015 17:57:10 -0000 Anton Sayetsky wrote: > 2015-12-05 10:01 GMT+02:00 Perry Hutchison : > > Having downloaded the 10.2 memstick image, I see that it is > > configured as a 657MB GPT: ... > > After I write this onto a 4GB flash drive, how would I go about > > resizing the GPT and/or protective MBR to reflect the actual size > > of the drive ... > > RTFM: https://www.freebsd.org/doc/handbook/disks-growing.html Is it possible to accomplish that on the FreeBSD 8 system that I'm using to set things up for the FreeBSD 10.2 install? While it is the FreeBSD 8 kernel that suggests "recovery": GEOM: da2: the secondary GPT table is corrupt or invalid. GEOM: da2: using the primary only -- recovery suggested. the FreeBSD 8 gpart apparently does not understand "recover": # gpart recover da2 gpart: Unknown command: recover. usage: gpart add [-b start] [-s size] -t type [-i index] [-l label] [-f flags] geom gpart bootcode [-b bootcode] [-p partcode] [-i index] [-f flags] geom gpart commit geom gpart create -s scheme [-n entries] [-f flags] provider gpart delete -i index [-f flags] geom gpart destroy [-f flags] geom gpart modify -i index [-l label] [-t type] [-f flags] geom gpart set -a attrib -i index [-f flags] geom gpart show [-lr] [geom ...] gpart undo geom gpart unset -a attrib -i index [-f flags] geom gpart help gpart list [name ...] gpart status [-s] [name ...] gpart load [-v] gpart unload [-v] I didn't find any mention of recovering from a missing or corrupted secondary GPT in either the FreeBSD 8 Handbook or the FreeBSD 8 gpart(8) manpage.