l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2004 Jun 19 18:36

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Cloning a drive?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Cloning a drive?

Here is how I clone drives -- normally I boot into linux ( on a separate system ), and then mount the original drive via external usb case, and then mount the clone drive via a second external usb case. This method should work just as well if you boot with a knoppix or other cdrom linux distro, and have both drives on the IDE bus.

1. Boot knoppix cd.

2. Mount your original drive -- mount /dev/hda1 /mnt/orig_10gig_drive

3. partition your clone drive -- cfdisk /dev/hdb (or wherever your drive need to be mounted from)
a. I have just one partition, so if you have /tmp or /home or whatever on separate partitions, then you will need to adjust these instructions accordingly, so that your new drive has a similar layout -- i.e. if your original drive has one partition for linux and a swap partition, make the clone the same adjusting the sizes to accommodate the full 20gig drive. That includes making the clone partitions in the same order on the drive.
b. don't forget to make your main/root partition "bootable" and your swap partition as a type "83"
c. you can check the partitions on the original drive with -- fdisk -l

4. format your clone drive -- mke2fs -v /dev/hdb1 ( add -j for an ext3 filesystem )

5. mount your clone drive -- mount /dev/hdb1 /mnt/clone_20gig_drive

6. copy all files from old drive to clone -- cp --preserve=all -r /mnt/orig_10gig_drive/* /mnt/clone_20gig_drive/.

7. create /mnt/clone_20gig_drive/lilo_tmp_hdb.conf with something like:

map=/mnt/clone_20gig_drive/boot/map # I don't remember...
install=/mnt/clone_20gig_drive/boot/boot.b # copy from host
#loader=/mnt/usbDrive2/boot/chain.b # -"-
append="root=/dev/hda1" # kernel options

8. Then run -- lilo -v -C /mnt/clone_20gig_drive/lilo_tmp_hdb.conf

9. Remove your original 10 gig drive, and replace with new 20 gig drive, changing the drive jumper as needed.

10. boot new system.

Good luck.


Paul wrote:

I need to move my desktop from a (full) 10G drive to a (spare) 20G drive.

The ideal results would be copy everything over, then run lilo on the new drive, then it would boot up looking just like the old one.

Some googling found me an out of date HOWTO and a few sites with instructions that were a little vague, so I thought I would ask the experts.

Has anybody done this?

Is it easy - not to hard - increadibly difficult - don't even think about it?

How do I do it - or better yet - a site with almost idiot proof instructions.

What are the things that can go wrong?

Thanks, Paul
vox-tech mailing list

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.