Set Up WINDOWS 7 and Linux Mint 14 Dual Boot System

I know many like to have a Windows+Linux dual boot system on their machines. As a WSO2 Software Engineer most of the time I use linux, but there are instances you have to use Windows in order to check client environments and Windows specific problems while integrating products.
This time I am describing how to set up dual boot system with Windows 7 and Linux mint side by side. I will skip obvious details and mention some problems and concerns I have met on the way.

My machine has 500GB hard disk (yes, actually it is 480 GB).

1. Install Windows first.


When installing windows when you are at the partition table you can separate the partitions. But the problem here is Windows allows you only 3 primary partitions on the disk. So you do the following.

  • Delete all existing partitions. Now you have 480 GB.
  • Create a partition 20GB (20x1024). We will use this primary partition to put Windows files. Windows will allocate some small partitions for its work, which we can ignore.
  • Create another partition of 115GB (115x1024) and format it with NTFS. We will make this partition shared between Windows and Linux mint as Linux Mint can identify NTFS partitions.
  • We need more partitions to install Linux mint. But windows allows another only one primary partition.You cannot convert primary partitions to logical partitions. So we will let the other space to be unallocated   and continue with Windows 7 installation.

Now you have Windows 7 running on your machine. You do not need CD any more. Now we can layout the background for Linux mint installation. No. Do not worry, we are not going to install Linux mint inside Windows.

We cannot continue with linux mint installation using unallocated space as Linux Mint does not allow you to partition it, nor edit. It will be totally unusable.  

Type "Create and format hard disk partitions" in Windows search bar and go to "Disk Management" window. You will see the created primary partitions in blue and un-allocated space in black. We have to create a extended partition now, so that we can make many logical partitions inside it.

  • Extended partition cannot be made from a primary partition. That is why we let it as unallocated.
  • From Windows you cannot see any content in logical partitions after we install Linux mint to them. 
  • You can create logical partitions inside an extended partition. A hard disk can have up to four partitions, but only one can be extended partition. The other partitions, up to three of them can be primary partitions.
  • It seems that Disk Managent console doesn't allow creation of extended partition so we have to use diskpart utility.
  • Open command prompt with "Run as administrator" and type command
          diskpart

  • The typical sequence of diskpart commands is shown below. Note # comments are only comments, you actually don't type any comments in diskpart sequence of commands.
# to see a list of disks in the machine
DISKPART> list disk

#select the disk you want. I have only one so 0.
DISKPART> select disk 0
#Disk 1 is now the selected disk. We list partitions now.
DISKPART> list part
#it will list the partitions created so far. So you can verify. First we create extended partition. Extended partition is only #container for logical partitions. We select all the rest of the disk we have (345x1024).
DISKPART> create partition extended size= 353280
DiskPart succeeded in creating the specified partition.
DISKPART> list part
#look at the list and select the extended partition created above
DISKPART> select partition 3
Partition 3 is now the selected partition.
#create a partition for root (/) to install Linux mint files. I allocate 14 GB.
DISKPART> create partition logical size=14336
DiskPart succeeded in creating the specified partition.
#create a partition for your home (/home). I allocate 200 GB as it is my working ground :)
DISKPART> create partition logical size=204800
DiskPart succeeded in creating the specified partition.
#create a partition for opt. (/opt). This will work as an external partition mounted onto Linux file system. You can keep your #notes and articles here while you work on linux. Will tell you more on this later. I allocate 110GB for this.
DISKPART> create partition logical size=112640
DiskPart succeeded in creating the specified partition.
#create a partition for swap. Usually this is two times of your RAM memory. It is better to allocate it from end of the disk. As #my RAM is 8GB I am allocating 6 GB which is enough.
DISKPART> create partition logical size=6144
DiskPart succeeded in creating the specified partition.
# display all the partitions
DISKPART> select disk 0
DISKPART> list part


  • Now you can see how the partitions are nicely done with Disk management UI supplied with Windows. We will format the partitions later. You can format the NTFS partition (other primary partition other than the partition we installed Windows to), and give it a meaningful name like "Shared". Do not touch the extended partition.


  • Now restart the machine and exit from Windows.


2. Install Linux Mint 14


Download linux mint 14 and burn it to a disk. Or else you can create a "bootable  pen drive" using the software here and boot linux mint from pen drive after changing the "boot priorities" in BIOS.


  • When you have boot from linux mint and in inside Mint click install.
  • Select "do something else" when it asks to remove Windows from System.
  • When you are at the partition table, you can see logical partitions we have created taken as partitions nicely.
  • Format partitions for /home,/root,/opt with ext-4 file type and mound them in the correct way. Do it with care so that you do not mount wrong partitions. 
  • Do not mount above shared NTFS partition. You do not need to touch it.
  • Continue with the installation.
Now in grub menu you have both linux mint 14 and Windows 7. You can select and load whatever you want.



To store files in /opt you need root permissions which is a nuisance. In order to get rid of that become root, create a folder called "NEXUS" inside /opt folder, edit permissions for your account and give write access. That's it. You can use it an partition. You can also create a symbolic link to that folder and keep it in Desktop. 



ENJOY LINUX MINT 14 AND WINDOWS 7 TOGETHER. DO NOT FORGET TO GET WINDOWS ACTIVATED BEFORE IT IS TOO LATE.

I faced a serious problem during investigating on these. All my basic partitions became Dynamic partitions. To convert them back to basic I had to use Windows CD again. Will tell you my story on yet another day...


Hasitha Hiranya

6 comments:

  1. good post, helped a lot...keep it coming

    ReplyDelete
  2. Worked first time, very surprising considering Windows was involved!! Great post, well done!

    ReplyDelete
  3. Worked awesomely.....
    Great work:)

    ReplyDelete
  4. Is it possible to install both OS on same drive ?

    ReplyDelete
  5. Hi there, i really liked your article.

    I have a question though. When i start the process to install Linux Mint (i will install 16) and i select "something else" linux only sees 500Gb of free space! Doesn't see any of the partitions created. While i'm on windows everything seems perfect.

    Thanx in advance

    ReplyDelete
  6. latest edition Dual Boot Linux Mint 16 On Windows 8.1 this dual boot process also work with windows 7 and 8 as well Check out.

    ReplyDelete

Instagram