Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 2008 14:49:40 +0200
From:      Paul Schenkeveld <fb-hackers@psconsult.nl>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Increasing partition size by removing partitions
Message-ID:  <20080928124940.GA89922@psconsult.nl>
In-Reply-To: <48DEC02C.90302@gmail.com>
References:  <48DEC02C.90302@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080928124940.GA89922>