[lug] linux system cloning

D. Stimits stimits at attbi.com
Sat Mar 15 16:14:35 MST 2003

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

More information about the LUG mailing list