From owner-freebsd-questions@FreeBSD.ORG Wed Mar 24 15:18:19 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC1FC16A4CE for ; Wed, 24 Mar 2004 15:18:19 -0800 (PST) Received: from quipo.it (mx.quipo.it [212.43.108.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 032A843D48 for ; Wed, 24 Mar 2004 15:18:19 -0800 (PST) (envelope-from brunoc@quipo.it) Received: from computer [62.94.3.7] by quipo.it with ESMTP (SMTPD32-7.15) id A736EFD000A4; Thu, 25 Mar 2004 00:18:14 +0100 Message-ID: <001d01c411f6$48ac60a0$07035e3e@computer> From: "Brunoc@quipo.it" To: "Jerry McAllister" , References: <200403241429.i2OETsV23604@clunix.cl.msu.edu> Date: Thu, 25 Mar 2004 00:18:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Declude-Sender: brunoc@quipo.it [62.94.3.7] X-Declude-Spoolname: D1736efd000a48b3b.SMD cc: freebsd-questions@freebsd.org Subject: Re: Transferral between two hard disks X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2004 23:18:20 -0000 ----- Original Message -----=20 >=20 > Hi community, >=20 > I would like to transfer the contents of an hard disk > partition,in which is installed FreeBSD (in another partition > is installed NetBSD and another one is unused),to another hard disk. > The recipient hard disk will have only FreeBSD,and is capable to get=20 > all the data from the original. > I guess I would perform such operation in a way like > disk image software for Windows (System Commander, > Norton Ghost) does.I've seen on previous postings the use > of command like 'dd' or 'ioctl',but I don't know if they > are appropriate or not. > In a few words,my goal is to have a bootable hard disk=20 > with my FreeBSD and data,like the original one,original one that=20 > I'm going to use for other purposes. >=20 > FreeBSD seekingjob.singles.it 4.9-RC FreeBSD 4.9-RC #0: Wed Oct 15 = 00:12:26 CEST 2003 = root@:/usr/obj/usr/src/sys/CURRENT_WITH_WINE_OPTIONS i386 > ------------------------------------------------------------- > For complete information,even in the case you don't need it, > I include the disklabel command output of my original=20 > FreeBSD disk: >=20 > 8 partitions: > # size offset fstype [fsize = bsize bps/cpg] > a: 163840 0 4.2BSD 1024 8192 16 # = (Cyl. 0 - 10*) > b: 532480 163840 swap # (Cyl. 10*- 46*) > c: 61432497 0 unused 0 0 # (Cyl. = 0 - 4062*) > e: 60736177 696320 4.2BSD 1024 8192 16 # (Cyl. 46*- = 4062*) >=20 > /dev/ad2s1e: > type: ESDI > disk: ad2s1 > label:=20 > flags: > bytes/sector: 512 > sectors/track: 63 > tracks/cylinder: 240 > sectors/cylinder: 15120 > cylinders: 4062 > sectors/unit: 61432497 > rpm: 3600 > interleave: 1 > trackskew: 0 > cylinderskew: 0 > headswitch: 0 # milliseconds > track-to-track seek: 0 # milliseconds > drivedata: 0=20 > ------------------------------------------- > Thank you > Bruno >=20 > Does the NetBSD also need to be bootable? > You really need to include the fdisk information too so we can see > what the slices actually are - note you have a FreeBSD 'slice' > not partition, in the FreeBSD world, and within that FreeBSD slice you = > have three partitions - a, b and e. You say you also have a NetBSD = slice > and an unused slice, but don't show anything. The fdisk output would > at least show that. do: > fdisk -v da0 > fdisk.out or fdisk -v ad0 > fdisk.out > Then include the contents of fdisk.out in the message. > Unless the new disk is identical in every way to the old one, you = don't > want to bother with dd or any of the other so-called imaging = utilities. =20 > Even if they are identical, they represent the less reliable way. >=20 > In general, I would recommend doing a fdisk on the new disk to make = the > slices and then disklabel the FreeBSD slice and newfs the newly = created > partitions. When you do the fdisk, make the FreeBSD slice bootable = and=20 > put an MBR on it and in disklabel put a standard boot block in the = slice. =20 >=20 > Then use dump(8) and restore(8) to copy the contents of each separate > filesystem in the FreeBSD slice to the new filesystems on the new = disk. > You do not need to use tape for the dump. Just mount the new file = system, > to some alternate mount point such as /newroot. cd in to it and then > pipe a dump of the old file system to a full restore in the new one. > There used to be an example of this in the dump and restore man pages > but I don't see it now. Maybe it was in man pages on another OS. > You only need to do this for the root (a) and other big file system = (e) (is=20 > it mounted as /usr?) Don't try to copy the swap partition. > This is the most reliable way. >=20 > Presuming that your e partition mounts as /usr > and you did the fdisk, disklabel and newfs of the new disk OK. > Also, presuming it is SCSI disk. =20 > If it is IDE, then da1s1a becomes ad1s1a, etc. >=20 > recommend doing this in single user mode > So, after rebooting in to single user. >=20 > mount -a >=20 > mkdir /newroot > mount /dev/da1s1a /newroot > cd /newroot > dump 0af - / | restore -rf - > mkdir /newusr > mount /dev/da1s1e /newusr > cd /newusr > dump 0af - /usr | restore -rf - >=20 > Since you don't show anything about the NetBSD slice, it is hard to = know > what to do with it. You might actually be able to use the = dump/restore > for it too if you can mount it in a running FreeBSD. Of course, = there > is no point in trying to copy the unused slice. >=20 > ////jerry >=20 >> > = http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#NEW-HUGE-= DISK> >> >> HTH, >>=20 >> Jud Thank you very much for your valuable information. The NetBSD slice does not need to be bootable, I was playing with it and I have no significant data, so I will eventually reinstall NetBSD or OpenBSD=20 from scratch on the first hard drive (the recipient). Yes,my e partition mounts as /usr. I'm going to include the fdisk information as soon as I can boot again on my second hard disk (is an IDE one), from which the FreeBSD slice is to be tranferred to the first drive (another IDE). Bruno --- [Quipo ISP - Questa E-mail e' stata controllata dal programma Declude Virus] [Quipo ISP - This E-mail was scanned for viruses by Declude Virus]