[TriLUG] Ubuntu migration
oberry at trilug.org
Mon May 19 16:18:40 EDT 2008
Firstly, thanks for all the tips. Secondly, the migration went pretty
well. For those who are interested, here are the basic steps:
* Determine which partitions will be copied to the corresponding
* Boot both machines off a Hardy live cd.
* Connect the machines directly to each other and configure networking.
* For each partition (boot, LVM for me):
* Fire up netcat on the destination machine:
netcat -p 2222 -l | dd of=/dev/sda5 bs=16M
* Fire up netcat on the source machine:
dd if=/dev/sda5 | netcat desthost 2222
* Wait until network activity ceases.
* Kill processes.
On destination machine (still in live cd):
* Rewire networking and revert settings to get onto local network.
* Install lvm2 package and load dm_mod kernel module.
* 'vgscan' for LVM volumes
* 'vgchange -a y' to activate volumes
* Mount corresponding LVM and non-LVM volumes onto /mnt/newmachine
* 'chroot /mnt/newmachine /bin/bash'
* Update /boot/grub/menu.lst with new location of /boot partition.
* Use the grub shell to reinstall grub in the MBR.
* rm /etc/blkid.tab
* rm /etc/udev/rules.d/70-persistent-net.rules
* 'vol_id -u /dev/sda1' to get the UUID of my new swap partition.
* Update /etc/fstab with the new swap partition UUID. All others
remained the same.
* ssh in from another machine and run 'dpkg-reconfigure xserver-xorg'
to reconfigure X (I couldn't move my video card to the new machine).
* Reboot again, just to make sure it all starts cleanly.
* For the paranoid: run a sha1 checksum on each file in the
filesystem to verify them. Some files will have changed due to the
system now being in use.
So far so good, except that my sound card is no longer working, but I
think that support for it was only added in 2.6.23 ... an added
incentive to upgrade to Hardy at some stage.
On Thu, May 15, 2008 at 02:52:04PM -0400, Jim Tuttle wrote:
> No recommendations as I haven't done this in years and had poor results.
> I'd be interested to know how it went, though.
> Owen wrote:
> > I have a new desktop at work and I'm planning on cloning the old hard
> > drive (PATA) onto the new hard drive (SATA), mainly to save time on
> > reinstalling all the applications I use for work ... would take days, if
> > not longer. I'm planning on cloning the partitions using netcat over a
> > gigabit ethernet network connection, with the two computers connected
> > directly to each other. Seems like the fastest way to do it, but failing
> > that I have a USB enclosure that I'll use to host the source drive.
> > The question is: any ideas on how Ubuntu (Gutsy) will react to suddenly
> > booting into new hardware? Hard drive interface is different, screen
> > size will be different (although I will probably carry the video card
> > over), processor is still 32 bit Intel. Any recommendations?
> > Thanks,
> > Owen
More information about the TriLUG