Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Nov 2004 16:24:44 +0100
From:      Dennis Koegel <amf@hobbit.neveragain.de>
To:        CHris Rich <freebsdnews@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Transferring system to a new hard drive
Message-ID:  <20041105152444.GH21279@neveragain.de>
In-Reply-To: <8292450b0411050713536e2e0e@mail.gmail.com>
References:  <8292450b0411050713536e2e0e@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 05, 2004 at 09:13:25AM -0600, CHris Rich wrote:
> My original install of FreeBSD is on a 30 gig hard drive, I want to
> move it to an 80 gig I now have, but i don't want to have to reinstall
> everything since I've spent hours waiting for some ports to install.
> [...]
> If I do move it over will I have ot make new slices to take advantage
> of the bigger hard drive?

What I usually do is:
- install the new hd as second drive in the running system
- partition/slice it as you like
- newfs the new partitions
- mount the whole structure somewhere, like
  * mount /dev/ad1s1a /mnt
  * mount /dev/ad1s1e /mnt/usr
  * mount /dev/ad1s1f /mnt/var
  etc.
- go single user
- cd / && find <all dirs except mnt, proc, tmp> | cpio -padmuv /mnt
- check /mnt/etc/fstab
- write boot sector to ad1
- shutdown, replace old drive with new drive
- done

The find|cpio combination will copy your entire system 1:1 to the
new hard disk and it's slice structure below /mnt.

HTH,
- D.



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