[Android Software Development] ItzCrooK2UxD:
DUAL-BOOTING WINDOWS 7 & LINUX​

The following guide is to help would-be developers install Linux. If you are unsure how to partition a hard drive or run a backup, you probably should not attempt this. You've been warned, also I am not responsible for anything bad that may happen to your computer, this is simply a guide. If you have questions or run into a stumbling block, don't hesitate to ask. Lastly this guide was written for users using Windows 7, though it should work for other Windows versions I have no personal knowledge of how to accomplish this. Lastly read the guide the whole way through, there are two different methods one appears easier than the other.

METHOD 1 (TRIED AND TRUE)​

Downloads for method 1)

Ubuntu 12.04 (LTS): This is the most current Ubuntu Linux release.

PowerISO: PowerISO is a small program that allows you to mount an .iso file as a physical drive, and allows for easy CD/DVD creation.

EasyBCD: EasyBCD is an excellent way to edit MBR so that it is easy to go from one OS to the next.

Prep-Step 1) Back up your work (This should be a no-brainer but all too many times have I seen someone in a sticky spot because they didn't have a good backup). Its not unheard of for a hard drive to become corrupted after repartitioning, but I can say that its not common either.

Prep-Step 2) Make a Windows recovery disc, if you have OEM installed Windows. If you did a clean Windows install or have the Windows disc for the operating system you are running, grab it. When installing a second OS you have to mess with the Master Boot Record (MBR), and the easiest way to repair the Windows MBR is with the recovery function on the disc.

Prep-Step 3) If you are like me and insisted on clean installs on your PC (I get not doing it every time on your phone, but I don't get in the habit of installing OS' on my PC), make sure that Windows is installed first. This step will save you a potential headache, and $50 bucks when you break your keyboard for not following Pre-Steps 1 and 2. The long and short of it is that Windows when it is installed will over-write whatever is on the hard drive its being installed on, including the Linux bootloader.

Optional Prep-Step I personally have found it easiest to partition my disc from Windows, so I am including this step.

a) [CLICK] "Start" in Windows

​

b) Type "disk management" and press [ENTER]

c) Choose the drive you wish to partition, in this case we will use the C drive, in the bottom pane, then [RIGHT-CLICK] on the main partition, [CLICK] "Shrink Volume"

d) Shrink the partition by entering how many MB you want to take from that partition, keep in mind for any of you people like myself who like to see even numbers on hard drives that 1 GB = 1024 MB, not 1000. Then [CLICK] on "Shrink" Please keep in mind that

Ubuntu recommendsAT LEAST 10 GB

and requires 4.4 GB If you are planning to do ROM development you should consider shrinking by around 100 GB or more if you have it.

You will now see unallocated space on your hard drive and for now thats a good thing. I typically do the actual format of the new partition during the Ubuntu install.

Prep-Step 4) Download Ubuntu and either a) burn it to a disc using an app like PowerISO, or b) put it on a USB stick. For ROM development you need to run the 64 bit version of Ubuntu.

OTHER RELEVANT INFO: While doing more in depth research I found several posts in forums about installation errors on hard drives larger than 1TB. The work around for this seems pretty easy. BEFORE PARTITIONING run a defrag, the goal is to get the new partition as close to the beginning of the disc as possible. Once again, if you have not already done so...BACKUP your data. If you have over 500 GB used on your hard drive you will most likely have issues booting Linux on a single hard drive, but you can still dual-boot when both OS' are on different hard drives.

INSTALLATION

​

Step 1) Insert the Ubuntu CD you burned into the CD/DVD tray of your PC and reboot your computer.

Step 1.5) If your BIOS is not set to boot from the CD drive you will need to tell the BIOS to boot from the CD, by pressing either F2, F12, Escape, or Delete depending on your BIOS. BIOS option are different for most PC manufacturers so I will not include how to change your boot order in this guide.

Step 2) Continue the installation and follow the prompts until you are asked this question: "How do you want to partition the disk?".

Step 3) If you followed the optional step and have room for Ubuntu then select the partition that you have already formatted select "Install Ubuntu alongside Windows 7" follow the installer through the rest of the steps. If you did not do the optional step, select "Something else" which will open up the "advanced disk partitioning tool"

Step 3.5)

Not Applicable if you did the optional step in the preinstallation.

When the Advanced disk partitioning tool opens you will see two (2) NTFS file systems (/dev/sda1, and /dev/sda2) DO NOT RESIZE /dev/sda1 unless you know what you are doing. It is ill advised to say the least and can cause boot issues. That said select /dev/sda2 (for most users this is their Windows partition) and [CLICK] "change". This will open a pop-up so that you can select how much of the Windows partition you want to use for Linux.

Step 4) In the "Installation Type" window at the bottom you should now see an area called "free space", select it, then [CLICK] "add" to add a new partition.

Step 5) The first partition we will add is the boot partition. For the partition type the default should be logical, if it is then leave it there, if not select logical. The recommended size is 500 MB. Keep the "Use as" box at its default which should be ext4, and the mount point is /boot. [CLICK] "ok"

Step 6) In the "Installation Type" window [CLICK] on "free space" and [CLICK] "add" to add a new partition, this partition will be / (root). Once again this will be a logical partition which will be used as a ext4 file system, and the mount point is /. The root partition does not need to be HUGE, 75% of the minimum 4.4 GB should be fine (Even if you are using much more than the minimum there is not much need for a / that is more than a few GB in my own experience. [CLICK] "ok" when finished.

Step 7) In the "Installation Type" window [CLICK] on "free space" and [CLICK] "add" to add a new partition, this partition will be /home. Once again this is a logical partition, using ext4 and the mount point is /home. The size of this partition is going to vary from user to user. You are only creating one more partition for Linux after this, and that partition is relatively small (1GB per 1GB RAM installed), so do not hesitate to use the majority of the space you allocated for Linux on this partition. [CLICK] "ok" when finished

Step 8) In the "Installation Type" window [CLICK] on "free space" and [CLICK] "add" to add a new partition, this last partition is for your swap. Once again this is a logical partition, but it will not be used as a ext4 file system, in the dropbox select "swap area". For the partition size I recommend using the rest of whats available for the swap, which should be 1GB per 1GB of RAM installed, for example if you have 4GB of RAM your swap should be 4GB. Once finished [CLICK] "ok".

Step 9) Once again you should be in the Advanced Disk Partition Tool ("Installation Type" screen), there you can see the partitions you have created. Because the /boot partition is logical it should be listed as /dev/sda5 (Always check...I can not express enough that anomalies happen). In the "Device for bootloader installation:" dropbox select /dev/sda5 or whatever it was labeled (EX /dev/sda#) [CLICK] "install now"

Step 10) Follow through the rest of the installation and enter your user information. After the install is completed successfully reboot your PC, it will reboot into Windows (which is 100% expected since we did not tell the MBR to look for our Linux system.

Step 11) Download and install EasyBCD from here, it is a free download.

Step 12) Open EasyBCD and [CLICK] "Add New Entry" , then [CLICK] the Linux/BSD tab. From the "Type" dropbox select "GRUB 2". I believe the name box comes filled with the OS info by default, if not in the "name" type "Ubuntu 12.04 (LTS)" and [CLICK] "add entry" (Not "Add New Entry")

Step 13) [CLICK] on "Edit Boot Menu", select your default OS and set the time out options.

Step 14) [CLICK]"Save Settings"

At this point you should have a dual-booting computer with both Windows 7 and Linux...Congrats.

MAKE WINDOWS BOOT BY DEFAULT ON PREVIOUSLY INSTALLED DUAL BOOT SYSTEM​

Step 1) Restore the MBR from your Windows installation disc

Step 2) Download EasyBCD from here its pretty easy to use. The non commercial version is free too. This program will allow you to select the boot priority.

If you require more detailed instruction please PM me and I will add to the OP
​

​