[vox-tech] Cloning a drive?

Paul paulb at claypits.com
Sat Jun 19 14:11:39 PDT 2004


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.
> 
snip
> 
> 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:
> 
snip
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.
> 
snip
> 
> 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
> partition>`.
> 
> 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.
> 
> -Mark
> 


More information about the vox-tech mailing list