Super User is a question and answer site for computer enthusiasts and power users. 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

I need to partition my hard drive to install Windows.

My current operating system is Ubuntu.

I google'd for "partition hard disk/drive ubuntu" - Not much luck. Anything else you suggest me to google? How to partition my hard drive in Ubuntu?

share|improve this question
up vote 0 down vote accepted

According to the Ubuntu help docs:

Installing Windows After Ubuntu
Normally when Windows is installed after Ubuntu the "Master Boot Record", MBR, will be overwritten. You can bootup off a LiveCD and repair the MBR. However, there are 2 different approaches:

Recovering GRUB after reinstalling Windows
Please refer to the Reinstalling GRUB2 guide.

Master Boot Record backup and re-replacement
Back-up the existing MBR, install Windows, replace your backup overwriting the Windows boot code:

Create an NTFS partition for windows (using fdisk, GPartEd or whatever tool you are familiar with)
Backup the MBR e.g. dd if=/dev/sda of=/mbr.bin bs=446 count=1

Install windows
Boot into a LiveCD

Mount your root partition in the LiveCD
Restore the MBR e.g. dd if=/media/sda/mbr.bin of=/dev/sda bs=446 count=1

Restart and Ubuntu will boot
Setup grub to boot windows

Also take a look at the matching AskUbuntu question and another AskUbuntu Question and this blog article.

share|improve this answer
No away around.. without messing the MBR? – user2015933 Mar 28 '13 at 2:38
Looks like you will have to do SOMETHING for the bootloader. So I don't think there is another way. – CC Inc Mar 28 '13 at 2:39
Actually it looks like you can use a LiveCD and boot-repair as seen in the other linked questions. – CC Inc Mar 28 '13 at 2:40
Yeah. that's what the blog says. I need windows for a day, VM is suggested? if yes, Virtual box? – user2015933 Mar 28 '13 at 2:41
Well, it depends. VM's have limited preformance compared to a full OS on it's own partition. If you are going to want that preformance and general ease of use you should not use a VM. – CC Inc Mar 28 '13 at 2:53

If you only need to use Windows for one day, as you suggested in your comments, then yes, it's easier to install it on a virtual machine so you don't have MBR issues. You can search for Virtual Machine on Software Center or google Virtual Machine Ubuntu and choose the one you prefer, then follow one of the many guides on how to install Windows on a VM running on Ubuntu. Be aware that, as CC Inc mentioned, running Windows on a VM will cause performance loss. Alternatively, to run Windows software on Ubuntu, you can use Wine or look for a free alternative.

If you want to dual-boot, you need to resize your Ubuntu partition using GParted Live CD or your Ubuntu Live CD (which contains GParted). Then follow one of the answers to this question or one of the many guides online to proceed with the installation process.

Resizing / partitioning with GParted is pretty intuitive, and the answers and guides linked above will guide you through the process. If you're still in doubt, here is a very complete guide on how to use GParted.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .