Hi, Is there an EASY method to transfer the partitions from an old hard disk to a new one? Matt Smith
On Sun, Mar 26, 2006 at 08:27:27AM -0500, Matt Smith wrote:> Hi, > Is there an EASY method to transfer the partitions from an old hard disk > to a new one?I presume you want to trasfer all the files from one (or more) partition(s) in the old hard drive to a new hard drive. If so, try the command "dd". man dd(1). There are examples at the bottom of the man page. Other commands that may be used are: tar & cpio (man tar & man cpio for more info). regards, joseph> > Matt Smith > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
Will this also transfer the filesystem structure? Matt -----Original Message----- From: Joseph Olatt [mailto:joji@eskimo.com] Sent: Sunday, March 26, 2006 8:45 AM To: Matt Smith Cc: freebsd-stable@freebsd.org Subject: Re: Data transfer from one HD to another On Sun, Mar 26, 2006 at 08:27:27AM -0500, Matt Smith wrote:> Hi, > Is there an EASY method to transfer the partitions from an old harddisk> to a new one?I presume you want to trasfer all the files from one (or more) partition(s) in the old hard drive to a new hard drive. If so, try the command "dd". man dd(1). There are examples at the bottom of the man page. Other commands that may be used are: tar & cpio (man tar & man cpio for more info). regards, joseph> > Matt Smith > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, Mar 26, 2006 at 08:27:27AM -0500, Matt Smith wrote:> Hi, > Is there an EASY method to transfer the partitions from an old hard disk > to a new one? >This one is actually in the FAQ. http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#NEW-HUGE-DISK - -- Scott Robbins PGP keyID EB3467D6 ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 ) gpg --keyserver pgp.mit.edu --recv-keys EB3467D6 Willow: Diana, Hecate, I hereby license thee to depart. Goddess of creatures great and small, I conjure thee to withdraw Amy: (squeak) Buffy: Maybe we should get her one of those wheel thingies. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFEJqV8+lTVdes0Z9YRAhG3AJ4zIJOY7Wn5eMRXtk0hcHPJGbh9awCdEO8i YDrs1hfkFPv5lvH50cS18pc=OCVS -----END PGP SIGNATURE-----
On Mar 26, Remo Lacho wrote:> dump and restore are your friends. > > Try something like this for each new slice (partition): > > Create your new slice on the new disk. > > newfs the new slice - newfs -U /dev/[new_slice] > > mount the new slices - mount /dev/[new_slice] /mnt > > dump and restore from the old slice to the new slice - > dump -L -0 -f- /[old_slice] | (cd /mnt; restore -r -v -f-)If you want to ensure that the system is quiescent before doing the copy, you should actually boot from an alternative media and do the copy using those utilities. I actually needed to do this for Windows XP and I was too cheap to pay for any of the commercial software, so I used g4u: http://www.feyrer.de/g4u It's based on NetBSD and worked great for my Windows PC. I was cloning from a smaller to larger HD, so I had to use another utility to extend the partitions without formatting. Good luck, -Clint
On Sun, 26 Mar 2006 08:27:27 -0500 "Matt Smith" <ratman6@charter.net> wrote:> Hi, > Is there an EASY method to transfer the partitions from an old hard disk > to a new one?If the new partitions are identical in size to the old ones then use dd otherwise use dump | restore. Refer to the man pages for the arguments required. -- C:>WIN | Directable Mirror Arrays The computer obeys and wins. | A better way to focus the sun You lose and Bill collects. | licences available see | http://www.sohara.org/
On Sun, Mar 26, 2006 at 09:14:04AM -0500, Matt Smith wrote:> Will this also transfer the filesystem structure?I would use /usr/sbin/sysinstall, choose "Configure", then "Fdisk" and "Label" to create the partitions and filesystems before running dd or tar or cpio. regards, joseph> > Matt > > -----Original Message----- > From: Joseph Olatt [mailto:joji@eskimo.com] > Sent: Sunday, March 26, 2006 8:45 AM > To: Matt Smith > Cc: freebsd-stable@freebsd.org > Subject: Re: Data transfer from one HD to another > > On Sun, Mar 26, 2006 at 08:27:27AM -0500, Matt Smith wrote: > > Hi, > > Is there an EASY method to transfer the partitions from an old hard > disk > > to a new one? > > I presume you want to trasfer all the files from one (or more) > partition(s) in the old hard drive to a new hard drive. If so, try the > command "dd". man dd(1). There are examples at the bottom of the man > page. > > Other commands that may be used are: tar & cpio (man tar & man cpio for > more info). > > regards, > joseph > > > > > > Matt Smith > > _______________________________________________ > > freebsd-stable@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
Quoting Matt Smith <ratman6@charter.net>:> Will this also transfer the filesystem structure?Indeed. The man pages for these commands will provide variations of their usage. So as to obtain different results. Dependant upon your needs. --Chris> > Matt > > -----Original Message----- > From: Joseph Olatt [mailto:joji@eskimo.com] > Sent: Sunday, March 26, 2006 8:45 AM > To: Matt Smith > Cc: freebsd-stable@freebsd.org > Subject: Re: Data transfer from one HD to another > > On Sun, Mar 26, 2006 at 08:27:27AM -0500, Matt Smith wrote: >> Hi, >> Is there an EASY method to transfer the partitions from an old hard > disk >> to a new one? > > I presume you want to trasfer all the files from one (or more) > partition(s) in the old hard drive to a new hard drive. If so, try the > command "dd". man dd(1). There are examples at the bottom of the man > page. > > Other commands that may be used are: tar & cpio (man tar & man cpio for > more info). > > regards, > joseph > > >> >> Matt Smith >> _______________________________________________ >> freebsd-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >-- Microsoft: Disc space -- the final frontier! ----------------------------------------------------------------- FreeBSD 5.4-RELEASE-p12 (SMP - 900x2) Tue Mar 7 19:37:23 PST 2006 /////////////////////////////////////////////////////////////////
Posted this to OP but omitted to post to the list. Here's my 2p worth Chris> Matt Smith wrote: >> Hi, >> Is there an EASY method to transfer the partitions from an old hard disk >> to a new one? >> >> Matt Smith >> _______________________________________________ >> freebsd-stable@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-stable >> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >> >> > I regularly do this cloning desktops. I am usually using the same size / > /var /tmp and swap and whatever is remaining as /usr > > Install new disk as primary master. > Boot from CD and install minimal system (you can even abort once it has > created the file system, the only purpose of this step is to create the > slices and newfs. I think this is quicker than doing it with sysinstall > or fdisk/bsdlabel. When it's me doing it it is certainly more error free.) > Next install your source disk as primary master and new disk as anything > else. (ad1 in example below) > Boot to single user. > Now do: > mount -u / > mount /dev/ad1s1a /mnt > cd /mnt > rm -rf /mnt/* /mnt/.* > dump 0afL - / | restore xf - > cd > umount /mnt > fsck -y /dev/ad1s1a > > Do the same sequence of steps for /tmp, mounting /tmp read/write and > using L switch in dump. You don't need to do the mount -u / again. > > [Can anybody tell me if it is really necessary to clone /tmp? Not that > it takes much time.] > > Do the same sequence of steps for /var and /usr but mounting them ro and > not using the L switch in dump > > My /usr takes some time like 1 - 2 hours, the rest you can do as you sit at > the machine. Sometimes the rm fails to remove a directory called empty - > you have to chflags it. > > I've done this quite a few times and had no problems. I've tried various > variations and this one is the only one that didn't come to some sort of > sticky end for me. Cleverer people would probably have found a way through. > > I did try putting my commands in a script but the result was b0rked > somehow and I never found time to investigate why. > > Chris >