Installation of Kali Linux in Oracle Virtual box

I am completely new to the world of Linux and this in my first installation of a linux OS in Virtualbox.I have learned the installation procedure from here .

Below is the step to step tutorial made while installing Kali Linux in Oracle Virtual box
You can download Oracle virtual box from here and Kali Linux from here .Download ISO file
To create a new Virtual machine,Open Virtualbox and go to “Machine” and click on New. The below window will pop up. Choose the name for your virtual machine. I named it Kali Linux. Choose the OS type as “Linux” and version as “Debian(32 bit)” ( since I am installing 32bit version.). Click on Next.

 Allot the memory of  atleast 512MB. Click on Next.
kali9.2
Select the option “Create a virtual hard drive now”. Click on “Create“.
kali9.3
If you want to use your virtual machine  image with other virtualization software like Vmware in future, select vmdk image otherwise select vdi image. Click on “Next
kali9.4
Select the option “Dynamically allocated”. This selection allots the memory according to the requirement. Click on “Next”.
kali9.5
Allocate  at-least 15GB of hard disk to the virtual machine. Click on “Create“.
kali9.6
The virtual machine is created. It’s time to boot into our operating system. Before booting into Kali Linux we need to make  a few changes. Right click on the virtual machine and select “Settings”.Then you will get a pop window. On that window choose System>Processor tab and enable the option “Enable PAE/NX” and click on OK. 
v8a
 Start the virtual machine and browse to the location of the iso file of Kali Linux and click on “Start 
kali9.8
Select the option “Install”. Hit “Enter
kali9.9
 Choose the language as “English” or as applicable and select the location of your choice. I chose “India.”
Kali9.9a
Choose your keyboard.
Kali10
 The system will load some additional components and then prompt you for the hostname. Enter hostname[I gave as Sysnet Linux] and Activate the “Continue” button. 
You can choose the domain name if you want. However it is optional. Activate “Continue
Kali13
The system will prompt you to set the root password. Enter the root password and click on “Continue.”
Kali14
Re-enter the password to confirm. Click on “Continue.” 
Kali15
 The system will prompt you to partition disks. choose “Guide-use entire disk.” option. 
Kali16
Confirm the disk partitioning.
Kali17
Select the partitioning scheme of your choice. As am new to Linux I choose the recommended for new user as mentioned 
Kali18
Then you will be given an overview of current settings. Choose the option “Finish partitioning and write changes to disk.”
kali19
Select the option “Yes” to write the changes to disk.
kali20
The installation of the system will start as shown below.
kali21
In the middle of the process, you will be prompted if you want to use a network mirror. select “No”.
Kali22
In the midst of the process, you will get a blue screen as shown below for a rather long time. Don’t panic and have patience. The process will continue again by itself.
kali23
Then system will ask you whether to install the grub loader to MBR. Click “Yes”  and the installation will continue.
kali24
When the installation is completed, the system will ask you to reboot into the system. click on “Continue”.
kali25
The system will reboot into the operating system as shown below. Enter the username as “root” and the password as configured previously.
Below is the home screen we get after Login using root credentials 
kali28
Install guest additions by going to “Devices>install guest additions” at the top menu tab. A cd image will appear on the Kali desktop. Double click on the cd image. A message will be displayed as below. Click on “Run”.
kali29
Most probably you will get an error message as shown below.
kali30
Before we do anything, let’s alter the sources.list file. For those who don’t know, sources.list file is a file where system  has list of repositories where the OS  should be checking for updates or installing new programs. Open a terminal. Type the command locate sources.list to search for sources file. We are interested in the one located in the “apt” directory. We will open this file using vi editor. Type command vi /etc/apt/sources.list as shown below. 
The Vi editor will open the file as shown below. 
kali32
Type i once to get into insert mode, then add the following three lines given.
deb http://http.kali.org/kali kali main non-free contrib
deb-src http://http.kali.org/ kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
as shown below. Once you are finished, tap the esc key to get out of insert mode,then type :wq to save and exit the file. What we have just done is instructed the system to look for headers in the right place while installing guest additions. 
kali34
Once you came out of the vi editor, type the command apt-get update && apt-get install -y linux-headers-$(uname -r)  to install the headers.
kali35
You will see the below processes taking place. 
kali36
Once it is finished, open a terminal. Type the command “pwd” to see the current directory.  Navigate to the “media” directory where our virtualbox guest additions CD is mounted by typing commands “cd/” and then “cd media”. Type “ls” to see where our guest additions  is mounted. It’s mounted at directory “cdrom”. Navigate to that directory by typing command “cd cdrom“.  Type the command “ls” once again to see the contents of the directory. [Refer the screenshot if you have doubt]
kali37
 We are interested in the file “VBoxLinuxAdditions.run”. Check the permissions of this program by typing command “ls -l VBoxLinuxAdditions.run”. We can see that the root user doesn’t have “execute” permissions on this file. First copy this file to the root directory by typing command  cp VBoxLinuxAdditions.run /root. Now go to root directory by typing command cd /root. Change the permissions of this file by typing  command chmod 755 VBoxLinuxAdditions.run. Now let’s check if the permissions have been changed. Type command ls -l  VBoxLinuxAdditions.run. We can see below that now we have execute permissions over this file. 
kali38
 You can select and copy the name if you want
kali39
Now let’s run this program. Type command ./VBoxLinuxAdditions.run. Guest additions would be successfully installed as shown below. Now restart the system by typing command “shutdown -r now“. 
kali42
Done! So I have successfully installed the first linux OS in virtual box :) 

Note : Still I am not familiar with the commands used during the installation.I just followed the commands as instructed in the tutorial.

0 comments:

Post a Comment