Re: [vox-tech] Cloning a drive?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vox-tech] Cloning a drive?
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.
> 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.
It depends on the partition type. As long as the HOWTO covers your
partition type (VFAT, EXT3, etc.), it should still be current.
> 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
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:
- Make sure there's a tool to make the partition you need. Some
partition making tools aren't available under Linux (like NTFS)
- If you got Windows, especially a later version of Windows, upgarding
the partition gets a little complicated, especially with NTFS. Post
again and tell us if you got Windows98SE or later.
- When you make the partitions, some installations require you to label
each partition (/, /usr, /home, /usr/local, etc.) to get the
bootloaders to recognize them magically. You should do that now if
your system requires it (You need it if you use Grub, or if your
/etc/lilo.conf and/or /etc/fstab uses labels instead of the /dev
device names.) Use `cfdisk` to see what the labels are on your
10G, and make the same labels on your 20G. Make sure you label
the partitions in the same order, so partition 1 on 10G has the
same label as partition 1 on the 20G, 2 on 10G has the same label
on 2 on 20G, etc.
3. Run `cp -a` to copy over all the files from the 10G to 20G, one
partition at a time. Notes:
- You MUST copy the corresponding partitions, so copy partition 1 on 10G
to partition 1 on 20G, partition 2 on 10G to partition 2 on 20G,
partition 3 on 10G to partition 3 on 20G, etc. So when you plan out
cfdisk in step #3, you'll need to keep that in mind.
- Don't overwrite the lost+found directory on each partition. If you
write over one, delete it, and use `mklost+found` to create a new one.
- While `cp -a * /destination` will copy over all the files in the
working directory and its subdirectories, it won't copy over the
hidden files. So copy carefully.
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.)
> 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 K. Kim
AIM: markus kimius
PGP key fingerprint: 7324 BACA 53AD E504 A76E 5167 6822 94F0 F298 5DCE
PGP key available on the homepage
vox-tech mailing list