[lug] linux system cloning
stimits at attbi.com
Sat Mar 15 19:46:07 MST 2003
D. Stimits wrote:
> Ferdinand Schmid wrote:
> > HI,
> > I would like to "clone" an installed Linux system from a small disk to
> > a larger disk. Ghost can't do this with reiserfs and mondo is
> > currently not a good choice with their complaints about glibc library
> > problems...
> > If the disks were identical in size I would use dd but my disk size
> > increase appears to prevent this solution.
> > I don't see why I couldn't manually partition my new disk, copy all of
> > its contents, and then fix the boot sector. My initial attempts
> > failed however - grub only shows part of its greeting. I suspect that
> > the bootsector (first 512 bytes) is correct but my relocation of /boot
> > through the different disk geometry may be spoiling this idea.
> > Any advice would be appreciated...
> The latter approach will work, but you might have to uninstall and
> reinstall grub (or lilo). You might have to dd the kernel and any
> initial ramdisk files in /boot/, but reinstalling the boot loader itself
> should regenerate any files sensitive to the boot process that are not
> part of the kernel itself. Do your recursive copy, e.g. cp -adpR, then
> mount on a rescue disk, cd to the mount point, chroot to there,
> uninstall grub (or lilo), then install grub (or lilo) from scratch (of
> course you'll have to update the grub.conf or lilo.conf).
> D. Stimits, stimits AT attbi DOT com
I forgot to mention, I experimented with this after windows blew away a
/boot/ partition on a test machine. The reason I did a full reinstall of
all of grub (not just running grub-install to put in a boot sector) is
because all of the binary files in the /boot/ were gone, and I installed
a custom kernel on a new partition.
Also, the XFS filesystem, as root, is not directly supported by Redhat
installers. What you describe above is one of the common ways to install
XFS as a root filesystem. You might look at this for XFS, the idea is
the same as what you are interested in:
D. Stimits, stimits AT attbi DOT com
More information about the LUG