PDA

View Full Version : instalation of new hard drive



dennisofnewport
01-01-2010, 01:42 AM
I would like to move my entire source drive to a new drive on the same computer. The destination drive is twice as large as the source drive. I do not run windows on either drive. What would be the cleanest way do this. I would remover the source drive after the migration. (noisy) I am using Scott Grannerman's “KOPPNIX” The destination drive has not been partitioned.

thanks

dennis

rusty
01-01-2010, 04:38 PM
I would take a look a clonezilla or parted magic live cd's. Alternately if the distro you are usiong has partimage, you could try that.

http://clonezilla.org/
http://partedmagic.com/
http://www.partimage.org/Main_Page

Basically the idea is to clone the existing drive to the new one, then resize the partitions to fit using gparted or whatever.

OErjan
01-02-2010, 04:11 PM
if you use Linux or Unix on both drives simply run the modified command below in a console, it is explained how you modifie it below

cp -dprx /media/file-system-to-be-copied/ /media/file-system-to-copy-to
here is what the different letters mean


cp is copy
-d same as --no-dereference --preserve=links
-p same as --preserve=mode,ownership,timestamps
-r, --recursive copy directories recursively /everything under that directory only a few . files may get lost
-x, --one-file-system stay on this file system

replace the paths to suit your needs
./media/file-system-to-be-copied/ and /media/file-system-to-copy-to are what I call the "paths" to the filesystems you want to copy, for you likely something like /media/sda1 and /media/sdb1
the drive is called (if scsi or sata) sda, sdb, sdc, sdd... or (If ATA IDE) hda, hdb, hdc...
the number is simply the partition number on that drive
you can see a list of the different drives and partitions by typing

fdisk -l
in a console, that letter after fdisk - is lowercase, "L" by the way, not a capital "i".
when you know what they are called you can mount those drives (so you can copy or just list the files) by typing

sudo mount /media/sdXY
where X and Y is what you need to mount.

as it is two disks it should work flawlessly BUT! knoppix unionfs may make things complicated, I have had the command break things on two occasions when using knoppix, so I use a Debian install disk for this now.

the CP command will copy everything but some .files/directories (hidden files like configurations) if they are directly in the first directory, but those you can copy separately if needed by typing

cp -dprx /first/file-system/.* /second/file-system

hope I was of help, if not keep asking