[ubuntu-nz] Cloning an ubuntu install.

Bruce Kingsbury zcat at wired.net.nz
Thu Jan 24 22:39:30 GMT 2008


On Fri, 2008-01-25 at 11:07 +1300, Steve Holdoway wrote:
> 1. Boot off a live CD, with the new hard disk installed as well as the old one.
> 2. Partition up your new disk, and make the new file systems.
> 3. for each pair of partitions ( not swap ones ), mount old and new, and copy the contents:
>  cd /old
>  tar cf - . | ( cd /new ; tar xpf - )
> is a good way.
> 5. format the new swap space
>  mkswap /dev/sda5.. (or wherever)

6. swapon /dev/sda5 (so it will appear in the blkid list)

7. "sudo blkid" to find the UUID of the new root and swap filesystems.
You probably want to open a new terminal for the next step so you can
cut and paste UUIDs

8. "sudo nano /new/boot/grub/menu.list" and replace the old root UUID
with the new one. It appears in several places, change all of them.

9. "sudo nano /new/etc/fstab" and update the UUID's for / and swap

10. Repair the MBR; sudo grub-install --root-directory=/new /dev/sda






More information about the ubuntu-nz mailing list