*BSD News Article 62037


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!gatech!news.mathworks.com!fu-berlin.de!zib-berlin.de!news.tu-chemnitz.de!irz401!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: [HELP] Change root partition
Date: 14 Feb 1996 08:22:57 GMT
Organization: Private BSD site, Dresden
Lines: 27
Message-ID: <4fs651$hcg@uriah.heep.sax.de>
References: <4fmsqt$foi@sand.cis.ufl.edu>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.3

sycheng@cis.ufl.edu (Hsiao-Yang Cheng) writes:

>    I am transfering my FreeBSD system into a new HD. The major problem I
>   have is how to move the root partition to the new one. If you have
>   good way, please teach me. I would appreciate it.

disklabel and newfs your new drive and its partitions.  Then, for each
partition (assuming your new disk is sd1, and the old one is sd0, and
you've got partitions a and e):

for part in a e
do
	mount /dev/sd1${part} /mnt
	dump 0f - /dev/rsd0${part} | (cd /mnt; restore rvf -)
	rm /mnt/restoresymtable
	umount /mnt
done

Naturally, this is best done in single-user mode, to guarantee that
both copies are identical.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)