Transferring my install to new computer

William Scott Lockwood III vladinator at gmail.com
Sat Jun 23 22:05:57 UTC 2012


On Jun 23, 2012 4:09 PM, "Liam Proven" <lproven at gmail.com> wrote:
> > And to improve the compression even further you could overwrite the
> > remaining space of the disk with a big file of zeros. You could use
> > something like the command
> >
> > dd if=/dev/zero of=zero
> >
> > in a terminal. After the command exits (with an error message about no
> > space left on the device) you can delete the file "zero" (from the
> > example above) to regain the free space.
>
> That's true, but surely any vaguely smart filesystem-imaging tool will
> only copy occupied space?

Not in my experience. Here is how I have done this in the past when
migrating p2v (physical to virtual).

1. Obtain total file size on drive.
2. Create a sparse disk that is 25% larger than that on the target system.
3. Copy the drive contents from one to the other with rsync. Be sure to use
the -x flag, as this will not span file systems. Thus, things like /proc
and /sys are not copied over.
4. Mount the new disk (typically from the xen server, or whatever
technology you are using).
5. Chroot.
6. Obtain or set the disk's ID in /etc/fstab for the new disk.
. 7. Run grub.

This should get it to boot, and you can fix things like networking at that
point.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20120623/498c8657/attachment.html>


More information about the ubuntu-users mailing list