Ok, currently got set up:

  • Puny little old 40GB hard drive
  • AMD Athlon II X2 245
  • 4GB DDR3 RAM

Planning to upgrade to:

  • 120GB SSD hard drive (40GB is getting a little tight for me, but 120GB is plenty for my purposes and the speed boost would be nice)
  • AMD Athlon II X2 245
  • 4GB DDR3 RAM
  • Radeon HD7770 1GB DDR5 (going to start doing a bit of light gaming, is the only reason I use Windows at all!)

My question is how can I install Windows7 then Ubuntu on my new SSD and still preserve my settings/data I've currently got in Ubuntu? Such as the applications I've got installed already, files, passwords & bookmarks saved in various browsers, settings, etc (I don't care in the slightest however about what is currently on my Windows XP installation!)

I forgot to mention an important point that I would have to reinstalled Ubuntu as originally I just installed it using a random Ubuntu Live CD 10.04 32-bit that I had at hand (and since upgraded to 12.04 32-bit via the automatic update), but I would like to change to 12.04 64-bit instead (just downloaded it last night, and I'll burn it to a DVD this evening).

  • 1
    This seems like it will cover just about all you need: askubuntu.com/questions/9135/… – Nate Sep 19 '12 at 18:05
  • 1
    @Nate: He is switching hard drives, not transferring settings to another existing install. So I suggest copying the whole partition to the new drive, and fixing grub boot. Much easier approach – MestreLion Sep 19 '12 at 18:20

Are you able to physically connect both hard drives in the same machine? If so, great, the steps are easy. I'll outline each one, and you may ask for details for each if you are unsure about them.

1 - Connect the new drive, disconnect the old one. Install Windows from DVD as you would in a clean, fresh machine.

2 - Once Windows is installed and working fine, power off and connect the old hard drive.

3 - Boot using Ubuntu Live CD

4 - Start gparted, shrink the Windows partition to make room for Ubuntu. I suggest shrinking to the minimum size plus approx 15/20GB. Create an extended partition to take up the all the remaining space

5 - Copy the Ubuntu partition from the old to the new drive, inside the extended partition. Copy the swap partition too, if you have one. Yes, gparted can copy and paste partitions from one drive to the other ;)

6 - You may resize the Ubuntu partition a few gigs, but I suggest leaving room for a brand new NTFS "data" partition, which in the future can be used by both systems to store your music, videos, documents, downloads, etc.

6.5 - Also, if you don't have a swap partition yet, create or leave room for one. Size should be at least equal to your RAM, to enable hibernation.

7 - You now should have these partitions: 2 primary ones created by Windows (a 100MB one and the shrank one, ~30GB), an extended partition taking the rest of the disk, the Ubuntu logical partition inside it (~30GB too), the swap, and a lot of free space (or your newly-created NTFS "data" partition). Label those partitions accordingly, so it's easy to tell them apart.

8 - Power off, disconnect the old hard drive, boot again using the Ubuntu Live CD

9 - Follow these instructions to reinstall grub and make Ubuntu boot again

10 - Done! :-)

A few remarks, taken from comments so they don't look like a chat window:

If instead of keeping the same install you want to change from 32 to 64 bits, within the same Ubuntu release, you may simply install the 64 Ubuntu on top of the 32 (just select the same partition), and the install will keep your /home, settings and packages. And you don't even need to backup: you already have your old drive as one ;)

If upgrading version, I would consider formatting the partition and forget about restoring settings and apps. Because settings from an older app may not apply to a newer version of the same app. Even software selection is fuzzy: some packages are deprecated / renamed / not necessary in newer releases, so not worth the trouble. Just open Software Center and manually install the apps you want.

In this case, it really pays off to keep your "OS-independent" data files (Music, Videos, Documents, etc) in a separate partition, so "your stuff" is always available regardless of Windows or Ubuntu version installed.

| improve this answer | |
  • Thanks! As I phrased my question originally this does seem like a much better way than Nate's! However... I accidentally left off an important point that I'm using 32 bit now when it really should be 64 bit (I've edited my original post), thus moving about the partition won't be enough as I assume I'll need to do a fresh install. Thus I suppose Nate's suggestion is the way to go? – Matthew Galloway Sep 20 '12 at 1:01
  • Ahh.... so as I'm already using 12.04 32 bit then I should follow your steps 1-9 then for step 10 pop back in the Ubuntu 12.04 64 bit disk that I'm going to burn and just follow the instructions to install Ubuntu over on top of the existing Ubuntu? btw, I already keep my "OS-independent" files in a "separate partition" of sorts ;-) As I stick all my MP3s/videos/whatever on a USB2.0 500gig 2.5" external harddrive (oh, & just to double check about step 4... is it ok to shrink the Windows partition so small when I'll need 30gigs or so for windows games, as they can go on a separate partition?) – Matthew Galloway Sep 20 '12 at 4:42
  • Correct, just install Ubuntu 12.04 64 as step 10. AS for windows size, if you have a fresh install (that takes ~10GB), I would leave another 15-20GB free for installing apps and still have decent free space. Huge apps like games can be installed to your data partition. Ok, they're not "OS-independent", but doing so will make your windows partition small, constant and predictable. – MestreLion Sep 20 '12 at 11:39
  • OMG... i just forgot about the swap partition! Take a look in my edited answer! – MestreLion Sep 20 '12 at 11:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.