From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 28 13:09:13 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71FE11065687 for ; Sun, 28 Sep 2008 13:09:13 +0000 (UTC) (envelope-from fb-hackers@psconsult.nl) Received: from mx1.psconsult.nl (psc11.adsl.iaf.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id 04A028FC0C for ; Sun, 28 Sep 2008 13:09:12 +0000 (UTC) (envelope-from fb-hackers@psconsult.nl) Received: from mx1.psconsult.nl (localhost [80.89.238.138]) by mx1.psconsult.nl (8.14.2/8.14.2) with ESMTP id m8SCneqt011787 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 28 Sep 2008 14:49:45 +0200 (CEST) (envelope-from fb-hackers@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.2/8.14.2/Submit) id m8SCnen0011786 for freebsd-hackers@freebsd.org; Sun, 28 Sep 2008 14:49:40 +0200 (CEST) (envelope-from fb-hackers@psconsult.nl) Date: Sun, 28 Sep 2008 14:49:40 +0200 From: Paul Schenkeveld To: freebsd-hackers@freebsd.org Message-ID: <20080928124940.GA89922@psconsult.nl> Mail-Followup-To: freebsd-hackers@freebsd.org References: <48DEC02C.90302@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48DEC02C.90302@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Increasing partition size by removing partitions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2008 13:09:13 -0000 On Sat, Sep 27, 2008 at 07:22:20PM -0400, Aryeh M. Friedman wrote: > I have a disk that is laid out with partion 0 being NTFS and 1 being > FreeBSD. I want to remove the NTFS partition and grow the FreeBSD one but > all the docs I have seen only talk about how to do this if the new part of > the partition is at the end of the partition you wish to grow. How do I > go about this? For clarity, let's use the FreeBSD terminology and call these slices, one NTFS slice and one FreeBSD slice. Partitions are what go in the FreeBSD slice (your root, swap, var and usr aprtitions). Do you really need one big FreeBSD slice? You could remove the NTFS slice and create another FreeBSD slice in that place. To make things workable, be sure to have a standard FreeBSD boot manager in the MBR block by doing something like: # fdisk -B -b /boot/boot0 ad0 Then you can create a disklabel in the new slice holding one or more FreeBSD partitions. Next newfs them and add them to /etc/fstab and mount them. All these steps could be done from the Configure submenu of sysinstall if you're not familiar with the fdisk, bsdlabel and newfs commands. The very brave among us could copy the existing FreeBSD partitions from slice 2 to slice 1, enlarging them if needed and using fdisk and bsdlabel to combine the two slices into one, all depending on the size of the slices. The big issue here is to be aware not to overwrite anything before copying it into its final place. Regards, Paul Schenkeveld