Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2000 11:26:03 +0100
From:      "Karel J. Bosschaart" <karelj@wop21.wop.wtb.tue.nl>
To:        Matt Bayliss <m.bayliss@excite.com>, freebsd-questions@freebsd.org
Subject:   Re: moving filesystem
Message-ID:  <20000124112603.A14437@wop21.wop.wtb.tue.nl>
In-Reply-To: <9226128.948704138031.JavaMail.imail@sammy>
References:  <9226128.948704138031.JavaMail.imail@sammy>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 24, 2000 at 12:55:38AM -0800, Matt Bayliss wrote:
> Hi,
> 
> ** Please reply to m.bayliss@excite.com as well as this list
> 
> How can I move the entire FreeBSD installation from one slice to another?
> 
> I had to install FreeBSD from a DOS partition (a primary one at that) and
> now
> the first 1GB of my drive is unused.
> 
> Can I mount a root partition on the first slice?  What will this do to the
> root partition on the slice I'm using now?
> 
> I considered creating duplicate subdirectories with similar names to "/",
> "var"
> and "usr" on the first slice - copying the file structure and renaming the
> mount points when I'm sure I'm done.  Will this work?
> 
> Please advise before I ruin my filesystem.
> 
> p.s. no alternative installation options work for me - otherwise yes, I
> would
> take the 'easy' way out.
>

Check out http://www.freebsddiary.org/driveswap.html#another , that
one was very useful to me when I moved my installation from an IDE
to a SCSI disk. Basically, I made up a new slice with filesystems on
the new disk using sysinstall, tarred over the filesystems /, /var 
and /usr and edited the /etc/fstab on the new disk to match the new 
slice/partitions. Worked surprisingly well. No need to say you have 
to be careful though not to newfs the wrong slice with sysinstall...

Since everything is copied into another slice, your original system
is unaffected and can still be booted, assuming you're using booteasy.

So now you're having wd0s2a, wd0s2b, wd0s2e and wd0s2f as /, swap,
/var and /usr, the new ones would be wd0s1a, wd0s1b etc. You might
need to do a MAKEDEV for a slice/partition that you created and was
previously unknown to the system before you can mount it.

Good luck!

Karel.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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