Cory PetkovsekFri Jul 9 22:17:48 PDT 2004
On Fri, Jul 09, 2004 at 06:52:34PM -0700, Rob Hudson wrote:
> I've got a Gentoo system set up and want to move it to another drive.
> Can I do an install -- up to stage 2, say, -- then tar the contents of
> the old drive to the new drive?
>
> What would the tar command be?
The fact that it is gentoo is irrelevant. Here's how you move the system:
- partition with fdisk
# mount /dev/hdc2 /mnt/hdc2
# mkdir /mnt/hdc2/{mnt,proc}
# cp -a /[^mp]* /mnt/hdc2
- Manually cp any /m* or /p* directories other than mnt and proc.
- Correct /mnt/hdc2/etc/fstab if necessary.
- Correct /mnt/hdc2/etc/lilo.conf if necessary. Specify that the boot disk is
/dev/hdc. This will install a boot record on that drive.
# cd /mnt/hdc2
# mount -t proc proc proc
# chroot .
# lilo -v (or grub, set it up for hdc)
- Swap drives.
- Boot onto new drive.
- Edit lilo.conf again to reflect boot disk of /dev/hdc. Do the same for grub.
You can also not edit lilo/grub. Swap the disks after copying. Then boot off
a cd or floppy, mount / and chroot if necessary, then setup lilo or grub again
so it installs an MBR.
Cory
--
Cory Petkovsek Adapting Information
Adaptable IT Consulting Technology to Your
(858) 705-1655 Business
cory at AdaptableIT.com www.AdaptableIT.com