From owner-freebsd-questions@FreeBSD.ORG Sat Nov 8 10:58:32 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39C0AAA6 for ; Sat, 8 Nov 2014 10:58:32 +0000 (UTC) Received: from mail.vlymskerp.net (mail.vlymskerp.net [197.189.214.107]) by mx1.freebsd.org (Postfix) with ESMTP id CA4F1B5 for ; Sat, 8 Nov 2014 10:58:31 +0000 (UTC) Received: from mail.vlymskerp.net (localhost [127.0.0.1]) by mail.vlymskerp.net (Postfix) with ESMTP id 496BD5F8A6 for ; Sat, 8 Nov 2014 12:58:22 +0200 (SAST) Received: by mail.vlymskerp.net (Postfix, from userid 5001) id 329535F8C1; Sat, 8 Nov 2014 12:58:22 +0200 (SAST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on vps1.vlymskerp.net X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=ham version=3.3.1 Received: from penguin.localnet (8ta-228-22-24.telkomadsl.co.za [197.228.22.24]) by mail.vlymskerp.net (Postfix) with ESMTPSA id 7057F5F8A6 for ; Sat, 8 Nov 2014 12:58:17 +0200 (SAST) From: Coert To: freeBSD Subject: shrinking of FreeBSD root partition on GPT Date: Sat, 08 Nov 2014 12:58:12 +0200 Message-ID: <1478337.iqUxg28tON@penguin> User-Agent: KMail/4.13.2 (Linux/3.13.0-24-generic; KDE/4.13.2; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Nov 2014 10:58:32 -0000 Hello all! Just installed FreeBSD on my home server, (used to be linux) When I did the installation, I used the installer defaults, and it gave me the following: gpart show ada0 => 34 488397101 ada0 GPT (233G) 34 128 1 freebsd-boot (64K) 162 480247680 2 freebsd-ufs (229G) 480247842 8149292 3 freebsd-swap (3.9G) 488397134 1 - free - (512B) I would like to shrink my root partition, (GPT partition 2). After reading through the handbook, I can adapt to shrinking instead of growing, What I am going to try is: 1. Boot from LiveCD 2. do a dump -0 of the current root partition 3. delete the root GPT partition, and create a new smaller GPT partition. 4.do a newfs on the new slice, and restore the dump. Do I need to restore any bootcode after this? I read about bsdlabel, but that seems to be only for MBR scheme? Will this work? or did i miss a step? When that is done, I will create a freebsd-zfs partition in the freed space on the disk. (Will rather still keep freebsd root on UFS) Kind regards, Coert