Saturday 4 March 2017

How to install Linux via VirtualBox on windows..!


You might have seen my previous posts on What are the methods available to install Linux on windows and Why is VirtualBox the best option to install Linux. So, in this article I am going to explain you how to use virtualbox and install Linux OS on it. Let's Start..

First of all, we need to install VirtualBox on windows. For that, you can search Google for "VirtuaBox for Windows download" or else follow the below steps :
  • Visit : Official VirtualBox Website
  • In this page, you will find : VirtualBox x.x.xx platform packages (where x.x.xx says the latest version of virtual box that you are going to download)
  • Under this text, you will be provided with 4 labels namely; Windows hosts, OS X hosts, Linux Distributions and Solaris hosts.
  • As we are going to install it on windows, we click on the first link (first label).
  • Download will start automatically.

Click to see full size image

Now that the download is complete, install VirtualBox in you PC. I don't think that you need any help for this. But still if there is any problem, ask for solutions in the comment box provided below.

After installation of VirtualBox gets completed, follow these steps to start installing Linux system. Note that before you move forward, you will need a Linux system iso file. Also it depends on the distribution you want to install. I am going to install Ubuntu on my virtualbox, so I am having Ubuntu iso with me. You can easily download iso from the official sites. If you are confused with which distribution to install, visit this article.

Now, the installation is divided into two parts. One includes creating a new virtual drive on your HDD using virtualbox and the second part includes installing linux system on that virtual drive. If you know who to install a Linux system, the second part can be neglected. Also I am telling you clearly that the second part is dependent on the Linux Distro you are going to install. Here, I am going to install Ubuntu, so the second part will constitute the topic : How to install Ubuntu linux. If you want to install any other linux distro, just search Google for How to install xyz linux.

A complete information about the prerequisites is made above. Now let us start with installation. (I think you all are ready with you VirtualBox installed and a linux iso downloaded.)

Part-1 : Creating a new virtual drive using virtualbox

Step 1 : Open VirtualBox. On the toolbar, click on New.

Click to view full size image

Step 2 : A new window will pop-up. In that fill in the name you want to give to this virtual drive and select the OS that you are going to install on that drive. Generally, virtualbox is smart enough to decide the OS based on its name but the version part needs to be modified manually. As in my case, I am going to install 64-bit OS but virtualbox takes the 32-bit version by default. So set the values manually as per my preference. After setting values, click on Next.

Click to view full size image

Step 3 : Here, you will be asked to select an amount of RAM you want to allocate to this virtual OS. Make sure that you allocate enough RAM for virtual OS to run but also note that there is enough RAM left for our host OS (here Windows) to run. If you want to use Linux for general purpose, 512MB of RAM will work. But if you have 8GB of total RAM, I recommend you to provide this system atleast 1GB for better performance. After allocating proper amount of RAM, click Next.

Click to view full size image

Step 4 : Here, you will be provided with options to create a new virtual drive or use an existing virtual drive. If you have used virtualbox and created a virtual drive before, you can select that option to use an existing virtual drive. But as we are new, we will create a new virtual drive for this process. Select "Create a virtual hard drive now" and click on Create button.

Click to view full size image

Step 5 : Now, you will be asked to select a file type for this newly created virtual hard disk. I recommend you to select "VDI (VirtualBox Disk Image)" in this step. (Don't try to mess with partitions unless you are an expert.) Select the type and click Next.

Click to view full size image

Step 6 : Now you will be asked to select type of storage on your physical hard drive. Static will allow you to give a fixed memory location to your virtual drive. While dynamic will allow machine to dynamically allocate storage when necessary. Generally, we must allow the virtual machine to allocate storage location. So, select "Dynamic" in this window and click Next.

Click to view full size image


Step 7 : In the last step, you gave type of location to the virtual drive while here you will be providing a name and the size of that virtual drive. (If you are familiar with dynamic memory allocation in C language, this step would be easily understandable by you. Its similar creating a pointer variable and allocating it memory dynamically.) Also, note that the size that should be allocated depends on the type and version of OS you want to install. As I am going to install Ubuntu Linux, I am allocating it 8GB of size because the developers of Ubuntu say that 6.6GB is enough for the OS to give its best performance. After allocating size, click Create.

Click to view full size image

Step 8 : Wait for a sec and then you will see that the virtual drive is created.

Click to view full size image

You can see the newly created drive on the left side of the window. You can select it and modify its settings and much more. But it is not a part of this tutorial. Now, let us see how to install Ubuntu on this drive.

Part-2 : Installing Ubuntu on newly created virtual drive

Step 1 : Double click on the newly created virtual drive to open it. Or else select the drive and click on Start button in the toolbar. Now, you will be asked to select an iso to boot the drive with. If you are asked to select an iso file, goto step 3 and then jump to step 5. But if you are not asked to select a file or you messed up with this selection, just close the virtual drive and restart it. You will see something like this. (Note that steps 2 and 4 are only used when you messed up with file selection in starting.)

Click to view full size image

Step 2 : Now, click on Devices tab in the menu bar and the click on CD/DVD Devices. Then select "Choose a virtual CD/DVD disk file..".

Click to view full size image

Step 3 : Now, a file-explorer window will pop-up. Select the iso file from the particular location and click Open.

Click to view full size image

Step 4 : Now, after selecting the disk, restart the virtual drive and press F12 repeatdly as soon as it starts to open the Boot Manager. Now, select option "CD-ROM" from the list provided. Here, I am pressing "c" to select that option.

Click to view full size image

Step 5 : Now, wait for some time for disk to load. Then in the window shown, select "Install Ubuntu".

Click to view full size image

Step 6 : Click "Continue" in the next window shown.

Click to view full size image

Step 7 : In the next step, select "Erase disk and install Ubuntu" and press the Install now button.

Click to view full size image

Step 8 : Here, you will be displayed with a warning message "Write changes to the disks?". Just click on Continue.

Click to view full size image

Step 9 : Type the country you are in and click Continue.

Click to view full size image

Step 10 : Select the keyboard layout you are using. By default, we all are using English(US). Select it and click on Continue.

Click to view full size image

Step 11 : Now, set a username and password for your virtual-PC. And click on Continue.

Click to view full size image

Step 12 : Wait for about 10-15 minutes and then you will be prompted that the installation is complete. Also you will be asked to restart the virtual-PC but do not restart it. Just close the dialogue box and select shut down. Then restart. If you clicked on "restart now", do not worry about the errors it shows, just close the virtual-PC and restart it as mentioned above.

Click to view full size image

Step 13 : After restarting, you will be asked for password to login the user account you created. And then, the Ubuntu starts...Enjoy.

Click to view full size image

If you still have any queries, post it in the comment box provided below..

0 comments:

Post a Comment

Thanks for reading this article.
Please comment your reviews..This will help us improve.

Popular Posts