Guide to install a dual boot Windows 7 - Linux (any recent linux) on a new machine having a UEFI Bios. Basic configuration without RAID and without the need of encryption of the disk and installations on a disk equals or smaller than 1Tb. Good for SSD and HDD.
This guide is valid until: DEC 2012. To be refreshed after this date!
1/ Disable UEFI in the BIOS, and enable AHCI SATA.
2/ Install Windows 7 in MBR mode.
1.Boot from your Windows 7 installation media.
2.After booting you see the Install Windows 7 screen, press Shift + F10 to open a command prompt.
3.At the command prompt, type Diskpart, press Enter.
4.Type List Disk, press Enter.
5.Type Select Disk # (where # is the number your drive shows up as), press Enter.
6.Type Clean, press Enter.
7.Type Convert MBR, press Enter.
8.Type Create Partition Primary Align=4096 Size=50000, press Enter. (This example is good for 50Gb for windows, please adust to what you want).
9.Type Format Quick FS=NTFS, press Enter.
10.Type Exit, press Enter.
11.Close the Command Prompt window.
12.Click the "Next" button.
13.Click the "Install now" button.
14.Accept the terms and click the "Next" button.
15.Choose "Custom: Install Windows only (advanced)."
16.Click the partition.
17.Click the "Next" button.
18.From then on follow the on screen instructions till you get to the desktop.
3/ Install Linux next to Windows, with whatever partitionning you want. Basic is Swap=the size of your DDR memory - EXT4 for "/" is some space like 6Gb.
4/ A the next reboot without any installation media, you should see the Grub or LILO menu showing up.
5/ If not, if Windows is directly starting, then follow those steps:
Once you finished installed Win7 on an MBR HDD, and installed Linux after that, the Grub menu will not show up until you set your BIOS to Legacy mode and then you must reinstall Grub using the following:
1. 1st thing you want to do is boot into your LiveCD. (best to use the same version as the one you are running on your computer) Once everything is loaded and your at the desktop. Open the Menu and type "Gparted" into the filter text box. When it loads you should see all the partitons that are on the hard drive. Linux partitions will be EXT4 and the windows partitions will be NTFS.
2. Look at the list of partitons and see what one is the Linux partiton.You can tell this by looking at the Mount Points of the partitons. You should see one with a "/" under Mount Point and its File system will be EXT4. When you have located this partition look to the left and see what it is called. For example mine is called dev/sda5 (yours may be something different like dev/sda1 etc) Now that you know what partition is the Linux Mint partition. Now open up a Terminal by clicking the menu then clicking "Terminal" under System.
Now we need to mount the Linux partition so that we are able to use it (access it) . To do this copy and paste this code into the terminal sudo mount /dev/sdXY /mnt
You will need to change the XY part of the code to match the name of your Linux partition. For example my linux partition is dev/sda6 so i would change the code to - sudo mount /dev/sda6 /mnt
Now that you edited the line of code to match your partiton, go ahead and press Enter on your keyboard then type in your password if your asked for it then press Enter again.(When your entering in your password you will not see any characters, letters numbers etc). It may look as if nothing has happened, but your Linux partition will now be mounted. The terminal will display nothing after the $ sign like it did when you 1st open it.
3. Now we need to tell the computer to reinstall grub2 to the Linux partition we just mounted. To do this copy and paste this line of code into the terminal sudo grub-install --root-directory=/mnt/ /dev/sdX
Again you will need to change this line of code to match your Linux partition. Change the "X" at the end to match your partiton. My partition is dev/sda5 so i will change the the line of code to - sudo grub-install --root-directory=/mnt/ /dev/sda
It is IMPORTANT that you do not enter any number just the letters of the partitions.
When you have edited the line of code press Enter on your keyboard. You should then see a message saying Grub installer finished or something like that. Now close the terminal and gparted and reboot your pc/laptop without the livecd in the disc drive. To restart click the menu then click "Quit" then "Reboot".
*Note after you reboot you should see the grub2 menu you had before you installed/repaired windows. You may need to refresh (update) this menu so that it detects the new windows partition.
This can easily be done by logging into your Linux, opening a Terminal then copying and pasting sudo update-grub then press Enter then enter your password then hit Enter again. You will then see it detecting all the bootable partitons on the Hard drive. When you it displays 'Done', reboot again and you should be able to boot into windows again.
This can also be applied if you are booting your real Linux install. Just no need to mount the partition.
My config : SSD 64Go Vertex4 on Asus A45VM. Windows 7 64bit 50Go - Linux Mint 13 Mate 64bit 10Go.
Thank you.
V.
This guide is valid until: DEC 2012. To be refreshed after this date!
1/ Disable UEFI in the BIOS, and enable AHCI SATA.
2/ Install Windows 7 in MBR mode.
1.Boot from your Windows 7 installation media.
2.After booting you see the Install Windows 7 screen, press Shift + F10 to open a command prompt.
3.At the command prompt, type Diskpart, press Enter.
4.Type List Disk, press Enter.
5.Type Select Disk # (where # is the number your drive shows up as), press Enter.
6.Type Clean, press Enter.
7.Type Convert MBR, press Enter.
8.Type Create Partition Primary Align=4096 Size=50000, press Enter. (This example is good for 50Gb for windows, please adust to what you want).
9.Type Format Quick FS=NTFS, press Enter.
10.Type Exit, press Enter.
11.Close the Command Prompt window.
12.Click the "Next" button.
13.Click the "Install now" button.
14.Accept the terms and click the "Next" button.
15.Choose "Custom: Install Windows only (advanced)."
16.Click the partition.
17.Click the "Next" button.
18.From then on follow the on screen instructions till you get to the desktop.
3/ Install Linux next to Windows, with whatever partitionning you want. Basic is Swap=the size of your DDR memory - EXT4 for "/" is some space like 6Gb.
4/ A the next reboot without any installation media, you should see the Grub or LILO menu showing up.
5/ If not, if Windows is directly starting, then follow those steps:
Once you finished installed Win7 on an MBR HDD, and installed Linux after that, the Grub menu will not show up until you set your BIOS to Legacy mode and then you must reinstall Grub using the following:
1. 1st thing you want to do is boot into your LiveCD. (best to use the same version as the one you are running on your computer) Once everything is loaded and your at the desktop. Open the Menu and type "Gparted" into the filter text box. When it loads you should see all the partitons that are on the hard drive. Linux partitions will be EXT4 and the windows partitions will be NTFS.
2. Look at the list of partitons and see what one is the Linux partiton.You can tell this by looking at the Mount Points of the partitons. You should see one with a "/" under Mount Point and its File system will be EXT4. When you have located this partition look to the left and see what it is called. For example mine is called dev/sda5 (yours may be something different like dev/sda1 etc) Now that you know what partition is the Linux Mint partition. Now open up a Terminal by clicking the menu then clicking "Terminal" under System.
Now we need to mount the Linux partition so that we are able to use it (access it) . To do this copy and paste this code into the terminal sudo mount /dev/sdXY /mnt
You will need to change the XY part of the code to match the name of your Linux partition. For example my linux partition is dev/sda6 so i would change the code to - sudo mount /dev/sda6 /mnt
Now that you edited the line of code to match your partiton, go ahead and press Enter on your keyboard then type in your password if your asked for it then press Enter again.(When your entering in your password you will not see any characters, letters numbers etc). It may look as if nothing has happened, but your Linux partition will now be mounted. The terminal will display nothing after the $ sign like it did when you 1st open it.
3. Now we need to tell the computer to reinstall grub2 to the Linux partition we just mounted. To do this copy and paste this line of code into the terminal sudo grub-install --root-directory=/mnt/ /dev/sdX
Again you will need to change this line of code to match your Linux partition. Change the "X" at the end to match your partiton. My partition is dev/sda5 so i will change the the line of code to - sudo grub-install --root-directory=/mnt/ /dev/sda
It is IMPORTANT that you do not enter any number just the letters of the partitions.
When you have edited the line of code press Enter on your keyboard. You should then see a message saying Grub installer finished or something like that. Now close the terminal and gparted and reboot your pc/laptop without the livecd in the disc drive. To restart click the menu then click "Quit" then "Reboot".
*Note after you reboot you should see the grub2 menu you had before you installed/repaired windows. You may need to refresh (update) this menu so that it detects the new windows partition.
This can easily be done by logging into your Linux, opening a Terminal then copying and pasting sudo update-grub then press Enter then enter your password then hit Enter again. You will then see it detecting all the bootable partitons on the Hard drive. When you it displays 'Done', reboot again and you should be able to boot into windows again.
This can also be applied if you are booting your real Linux install. Just no need to mount the partition.
My config : SSD 64Go Vertex4 on Asus A45VM. Windows 7 64bit 50Go - Linux Mint 13 Mate 64bit 10Go.
Thank you.
V.