Moving/Removing Filesystems

RW list-freebsd-2004 at morbius.sent.com
Thu Jan 27 08:03:40 PST 2005


On Thursday 27 January 2005 15:34, Nathan Kinkade wrote:
> On Wed, Jan 26, 2005 at 08:12:55PM -0500, Tom Moyer wrote:
> > I have a Windows XP installation on the first 20 GB of my harddrive
> > and I would like to remove it and expand my FreeBSD install to fill
> > the entire disk.  Is there an easy way to do that without formatting
> > the entire hard drive.  I've updated the system to 5-STABLE and have
> > installed many ports and I don't want to lose that (limited
> > bandwidth).
> >
> > Thanks,
> > Tom
>
> Poke around in the FAQs at freebsd.org.  Here is one little tutorial on
> adding a new harddisk to a system.  Your not adding a new physical disk,
> but the principles will the same.
>
> http://www.freebsd.org/doc/en_US.ISO8859-1/articles/formatting-media/index.
>html
>
> Also see this document:
>
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#ADDING-DISK

This will allow you to move your FBSD installation to the new slice.

Once you have done that (and tested it) I think you can extend the final 
partion in the lower slice over the top of the second slice using fdisk, 
bsdlabel and growfs. So if you set all the other partitions to their required 
size, you should be able to achieve any layout you like.  I've never done 
this myself, but see "man growfs" as a starting point.

If you don't fancy that, you could simply repartition the second slice and use 
it as /usr or /home.



More information about the freebsd-questions mailing list