Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Okay, I have Ubuntu 12.04 64 bit installed on a laptop.

The Hard drive is Partitioned as follows:

  1. 80 Gig NTFS flagged as /Windows with nothing on it
  2. 80 Gig Ext4 flagged as /Boot with Ubuntu 12.04 64 bit installed
  3. 12 Gig Linux Swap flagged as /Swap (this partition is encrypted)
  4. Everything Else (about 800 Gig) NTFS not flagged

As soon as I figure out how to backup my Ubuntu (Since I have what I need installed on it and working I'm going to try to run deja dupe from a Live CD (it won't make a complete backup when I run it from the system)) I plan to use Hirens Boot Disc v14 to backup the MBR just in case.

So what do I need to do to get Windows 8 or 7 installed on that first partition without messing up Ubuntu too much?

Mostly I just see instructions to install linux on a system that has Windows on it (probably because it is more friendly with the Grub pointer on the MBR but I'm just guessing on that.) Since I'm doing this the other way around things are going to be different.

Please note that this is Preemptive, I have not installed Windows yet, it is more about what I need to do to protect Ubuntu from getting wiped out or damaged when I do install Windows.

Restoring my Linux from a backup is something I want to avoid if possible.

I'm thinking that if I backup the MBR before installing Windows and then restore it after installing Windows then the grub and Linux would be intact. I could then just boot to Linux and from Terminal update grub to include Windows.

Booting to a Live CD to restore Grub after the fact may also be an option if needed, but I would like to avoid that as well.

share|improve this question
@psusi: I think this question asks more than "How can I repair grub? (How to get Ubuntu back after installing Windows?)" -- note: what do I need to do to get Windows 8 or 7 installed on that first partition? – Sadi Sep 27 '13 at 16:25
I would also like to point out that this is preemptive, rather than after the fact. Backing up the MBR and then restoring it after the Windows install should prevent the need to repair grub. – Cyber_GELF Sep 27 '13 at 16:51
The best way to add additional information to your question is by editing it, with the edit button. It is better visible that way, and comments are mainly for secondary, temporary purposes. Comments are removed under a variety of circumstances. Anything important to your question should be in the question itself. – guntbert Sep 27 '13 at 17:29
@Sadi, "how do I install Windows" is overly broad and off topic. You install windows, then fix grub. – psusi Sep 27 '13 at 17:34

It's difficult to provide a step-by-step guide for Windows (7/8) installation, but I guess it should be possible to tell Windows to use only the first partition.

You will then lose the Grub menu which you can restore IMHO more easily if you use Clonezilla (e.g. in Parted Magic Live) to clone your Ubuntu partition. See also: Comparing Disk/Partition/OS Cloning Tools

In that case you'll simply need to update grub (using sudo update-grub command in Terminal) to have the newly installed Windows added to the boot menu. See also: How can I repair grub? (How to get Ubuntu back after installing Windows?)

So I suggest the following:

  1. Save your 2nd (Ubuntu) partition using Clonezilla (e.g. in Parted Magic Live CD/USB)
  2. Install Windows in your 1st partition
  3. Restore your Ubuntu partition using Clonezilla (e.g. in Parted Magic Live CD/USB)
  4. Start your computer, go to Ubuntu desktop, open Terminal, and enter sudo update-grub to add Windows to the Grub menu
share|improve this answer
Clonezilla (Parted Magic Live) seems to be more like what I was looking for to make a complete backup and is probably better than trying to use Deja Dup.) – Cyber_GELF Sep 27 '13 at 16:47
@Cyber_GELF: Actually, you might not need to restore the Ubuntu partition through Clonezilla after installing Windows. Booting your computer to an Ubuntu Live Session and then using Boot Repair tool (or merely the sudo update-grub command?) might restore the your Grub bootloader. Saving Ubuntu partition via Clonezilla might just mean "staying on the safe side" which you can use as a last resort. – Sadi Sep 28 '13 at 17:03
Okay, I backed up my Partition to an Image with Clonezilla. It took a few tries because the default settings overheated the laptop after about 1 minute and caused it to shutdown. It estimated the backup time at 4 minutes 7 seconds for a 8.36 Gig Install. I had to turn off the compression to make it work and it took 10 minutes 4 seconds. – Cyber_GELF Sep 29 '13 at 17:26

I was right, I backed up the MBR before installing Windows 8 and then restored it after installing Windows 8 then the grub and Linux were intact. I booted to Linux and from Terminal updated grub to include Windows. This was the easiest way to do this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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