Migrating to a New Desktop PC

A little while ago I bought a Zoostorm PC from Ebuyer. It’s a farily basic (but powerful) i7 based system with 8GB RAM and a 1TB hard disk. This is to replace my older (but still fully working) Mesh PC. The newer one is more power efficient, quieter, a lot faster, and all Intel inside – the previous desktop was nVidia based.

I wanted to migrate from the install on my old Mesh PC to a new clean install on the Zoostorm. I could have just yanked the disk out of the Mesh and put it in the Zoostorm, but I did it slightly differently. I’m typing it up here for my own notes but also to find out how other people do it, and to get any tips.

So the goal was to have a clean install of Ubuntu Precise (which will become 12.04 LTS in April) and keep all my existing files and folders intact. I wanted to keep all my home files but didn’t want to keep the applications I had built up over several install/upgrades on that machine. Time for a fresh start.

The old Mesh has a single 120GB SSD and the Zoostorm has a 1TB Hard disk and I added a 120GB SSD to that too. My idea was to do a clean install on the Zoostorm SSD, and use the 1TB hard disk for my /home directory. That way I get the super zippy performance of an SSD for loading apps, but the slow(er) hard disk for loading my files. I’m happy with this tradeoff in speed/capacity.

Here’s the steps I went through.

  • Clean install of Ubuntu Precise on the Zoostorm with / and swap on SSD, /home on HDD. Use a hostname of ‘zoo’ so as not to conflict on the network with the hostname ‘wopr’ used by the Mesh PC
  • Boot into new installation and make sure everything works
  • Boot Mesh PC but don’t login, so none of my personal files are open/changing
  • Use rsync on the new install to copy files from Mesh to Zoostorm over the network

$ cd /home
$ rsync -avz -e ssh wopr:/home/alan .

  • Shutdown the old Mesh PC
  • Edit /etc/hosts and /etc/hostname to change host from ‘zoo’ to ‘wopr’
  • Reboot the Zoostorm PC to ‘Bring the WOPR on-line’ as they say

I think that’s about it. I now have all my personal stuff, work, config on the new computer, and can consider things to do with the old one. I think I might install GameOS on it until Valve get around to porting Steam (and all the games) to Linux. :D

Things to consider:-

  • I could probably have sped this up a bit by taking the disk out of the Mesh PC and putting it in the Zoostorm, then partition up the 1TB disk and move my /home directory over to it, edit fstab, remount /home and logout/in. That seemed like more effort in my mind, so I went for the approach above
  • I now have a whole load of packages I need to install because my Zoostorm is a clean installation. So the first thing I did was to get the basic things I need. I will apt-get any missing bits as and when I need them. I have a decent connection so it doesn’t bother me that I’m missing critical stuff at the moment.
  • Copying only /home means I may have missed out some stuff in other places like /usr/local, /root and /etc. I have full backups of my old machine, so I am not to worried about missing stuff here or there, I can get them if I really need to

Hope that’s useful to someone, and if you have any comments, do let me know.

15 thoughts on “Migrating to a New Desktop PC”

  1. It is also worthwhile running `dpkg –get-selections` on the old machine and saving the output somewhere. On the new machine you’ll eventually run into missing some program or functionality but not being able to remember the name of the program that provided it. At least this way you have a list of possible candidates. (I always forget what I use to make system emails go to my mail server – the answer is nullmailer.)

    If you use PPAs or other external repositories then y-ppa-manager is good to have as it can backup and restore them. For example I use them for Google Chrome/Earth, Medibuntu, Openshot, Shotwell & VirtualBox.

      1. For the big packages (eg a music player) making the selections again is great. But some times you really don’t care and at least being able to know what you used to use is helpful. (ie some of the time, not all of the time) It will at least also help you compose better searches. For example trying to come up a with a search for a mail server that just dumps all emails on another machine and requires no administration is quite hard to formulate. But the moment you know you used nullmailer you can easily find it and similar packages.

        Another example where it helped me out recently was that I had installed several add-on packages to emacs but couldn’t remember what they were. You get very frustrated very quickly when some editing doesn’t work.

        Something I recently used get-selections for was cleansing my laptop. It has been through many upgrade cycles (since Feisty IIRC) so I used get-selections from a fresh installed and customized Oneiric to remove/adjust packages on the laptop to match the fresh install (2,042 packages).

        The lesson is that it is very handy to have this list around. And you won’t be able to make it once you have retired your old machine.

  2. @ Roger: It is also possible to sync your package selections using Ubuntu Software Center since Oneiric (?), although it seems a little bit hidden there :)

    1. I pretty much gave up on that. It is fine for applications but useless for libraries and other “technical” packages (if I remember the term used correctly). I gave up on Ubuntu One in December as it couldn’t perform the simple task of actually doing file syncing without randomly losing the plot and it would be painful to find that it had stopped syncing on some machines, or decided to have lots of .u1conflict files lying around that never seemed to get deleted. I have never had an issue with Dropbox.

      Heck I just started software centre and have a button in the task bar for it, but nothing seems to convince it to show me an actual window. At least Synaptic actually works and has nice functionality like purging removed packages, showing me what gets installed/removed on package changes, lists installed files for a package etc.

  3. I would pit dot files in the home directory on an SSD too (I would probably have the 1 TB disk as /Desktop and have all data there or something), I think it would speed login significantly. (At least Ubuntu now logins almost instantly since I bought an SSD)

    1. Hah! Perhaps. Unfortunately I have loads of stuff with the hostname wired-in. My naming scheme is ‘computers from sci-fi’, so I’m not sure Joshua would actually fit. I know David calls the WOPR ‘Joshua’ during the film but I think that’s before he knew the real name of WOPR.

  4. I know hard drives are more expensive this year, but after a hard disk failed on me I bought 2 identical ones and set up a raid-1 / partition. Now I think my data is a bit safer.

    There’s also some faster reads, but I did not do it for performance.

    You have to use the alternative install to set up raid options, at least that was the case then.

  5. Nice desktop PC Alan, I will have to check out Zoostorm next desktop upgrade cycle.

    My question is: was your old OS also 12.04? If no, then won’t copying and starting Ubuntu with all your old dotfiles cause weirdness with the new OS? eg. .gnone2 etc.

    Where are the blog entries about your new role at Canonical? We want to heard the gossip! :-)

    1. I’ve never had a problem with dotfiles in my home directory. I rarely if ever go backwards a release, almost always forwards or same-release.

      I would blog about stuff at Canonical but some of it is a bit secret squirrely so I can’t. I am giving a talk at the next Surrey LUG meeting though, some of which will talk about stuff I’ve been doing :)

Leave a Reply

Additional comments powered by BackType