Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Mar 2004 00:18:11 +0100
From:      "Brunoc@quipo.it" <brunoc@quipo.it>
To:        "Jerry McAllister" <jerrymc@clunix.cl.msu.edu>, <judmarc@fastmail.fm>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Transferral between two hard disks
Message-ID:  <001d01c411f6$48ac60a0$07035e3e@computer>
References:  <200403241429.i2OETsV23604@clunix.cl.msu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
----- 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
>> <URL:
>> =
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]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001d01c411f6$48ac60a0$07035e3e>