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 14:26

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?

Details I didn't know to mention:-)

10G is Debian(unstable) on a one partition(/) reiser filesystem.
20G is empty and I would like to use EXT3 if its not too hard to do
I use lilo.
I have disk caddies for hda and hdc so swapping is easy
I'm comfortable with command line

Mark K. Kim wrote:
On Sat, 19 Jun 2004, 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.

Nah... it doesn't work like that... unfortunately.

1. Assuming you still have the 10G hard drives on your computer, put the
20G in it.  Take off a CDROM drive if you don't have a spare connection or
space -- you'll be able to put it back in later.  Boot off of the 10G as
you normally do.

2. After boot, as root, make partitions on the 20G drive using `cfdisk`.
Format each partition using the proper program (mkfs.ext3 for EXT3, mkswap
for Linux swap partitions, mkfs.vfat for VFAT partitions, etc.)  Notes:

Would it be better to Knoppix so that neither disk is in use?
3. Run `cp -a` to copy over all the files from the 10G to 20G, one
partition at a time.  Notes:
Bingo! will 'cp -a' copy "everything" keeping links, symlinks and other stuff intact? The man page didn't go into a lot of details.

4. Make a bootdisk using `mkboot` (no arguments).  Just in case, prepare a
bootable Linux CD, like Knoppix.

5. Turn off the computer.  Take the 10G out, and move to 20G to where the
10G was.  Reboot with the bootdisk or a bootable Linux CD.  If you boot
with a bootable Linux CD, after booting, run `chroot <20G's root

6. After you boot successfully, run `lilo`.  If you use Grub instead of
Lilo, run `grub-install` (I think.)

Sounds very doable

What are the things that can go wrong?

Keep your 10G hard drive and don't write over it for about a month before
you do anything.  If you discover that something didn't copy over, you can
copy it over from the 10G drive.


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:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.