Re: copy hard drive

From: Bob Tennent (BobT_at_cs.queensu.ca)
Date: 09/01/03


Date: 1 Sep 2003 12:22:34 GMT

On Mon, 01 Sep 2003 02:57:04 GMT, Rob wrote:

> I have a old 6 gig H/D that is about to give up the ghost. I have Mandrake
> 9.1 on it. I bought a new 40 gig and would like to copy over the 6 gig
> COMPLETELY, system files, lilo, everything. Then I could remove the 6 and
> boot up off the 40 just like I do now. Is this posible? If so, how? I know
> how to set them up hardware wise it's just the copy that I don't know.

You first have to partition the new drive and set up file systems on
those partitions. The best tool for this is parted. Remember to create a
swap partition as well.

Then mkdir /new and mount the root partition of the new drive there.
Create sub-directories as necessary for the other non-swap partitions,
such as

/new/boot
/new/home

etc., and mount those as well.

Then copy your existing file systems (not including /new!) to /new using
cp -a. Don't copy /proc but remember to mkdir /new/proc. You'll probably
want to edit /new/etc/fstab and /new/etc/lilo.conf.

You can then do

chroot /new

run lilo and re-boot, but first make sure you have a working boot floppy
or CD to handle a possible kernel panic or lilo failure :+)

Bob T.



Relevant Pages

  • Re: asrock, problem with nic after windows-boot - Mount Issues [Resolved]
    ... Like an idiot, I mounted hda1, when I needed to mount the whole hda ... mkdir /p1 ... I think I'm wrong about KDE being the umount culprit though; ... This hda4 is a copy (and a Primary partition, as most know) of a win98 ...
    (comp.os.linux.networking)
  • Re: Moving whole partitions
    ... First question: Can I copy a whole partition, and if yes, how. ... First Create/format target partition(s), mount and tar partition accross. ... mkdir /old ...
    (comp.os.linux.misc)
  • Re: unable to mount a drive imaged using dd
    ... mkdir /mnt/hdd1 ... mount: special device /dev/hdd1 does not exist ... Stefan - I'm trying to access a partition, ...
    (comp.os.linux.hardware)
  • Re: Mount USB HDD to a certain /media/folder after boot
    ... $ mkdir /media/LD142ntfs ... the same spot each boot then you have to use the UUIDs in your fstab file. ... The unit is used as external backup for all our systems and the idea is: ... LD142ntfs = NTFS partition and within the partition ...
    (Ubuntu)
  • Re: formatting hardrive
    ... > partition a second hardrive so I could dump/restore the content of my first ... Now mount partition a on /mnt so you can make the mount points for ... by doing mkdir /dmp, then replace /mnt with /dmp in all these commands) ... Don't try to dump to the mounted directory. ...
    (freebsd-questions)