Copy these two links to the sources list which is located in /etc/apt/sources.list in the following manner shown in the picture, and give hashes in the starting of CD ROM reposite to bypass CD ROM read as shown.
Now, the headers are successfully installed. Its time to install the Additions file now.
As we know, the files to be installed resides in The VBOXADDITIONS CD Rom. So as said in Kali Forums, We will have to first navigate to the file and copy it to the root. Now why to copy? because we have to give it root and read/write permissions which is not possible to do from the CD Rom because its Called ROM - Read Only Memory. To copy it, we will run the command cp. So the whole command will be
- cp /media/cd-rom/VBoxLinuxAdditions.run /root/ - (Its now copied)
- chmod 755 /root/VBoxLinuxAdditions.run - (Its given Read/Write Permissions)
- cd /root - (Changed directry to to Root)
- ./VBoxLinuxAdditions.run - (Ran the file named VBoxLinuxAdditions.run)
Now You might have a question What the hell is chmod 775. Basically it has a complex permission protocol. each 7, 7, 5 here have different meanings, which I am currently studying about. You now only know that giving a file 775 or 777 permission means to make the file fully accessible to any users. If you write 777 instead of chmod 775, it will work no matter what.
Now I will post a picture where I used this and it didn't work. In my case, In place of "cd-rom" command, "cdrom0" worked.
Now give it 2 minuits and Those additions will be installed successfully. Give it a restart. I am posting the pictures. Then will discuss the may come problems.
Did as Directed
Copy Error with cd-rom
In this case, cdrom0 worked for me
This is the case I struggled the most with. There are no blogs saying this cdrom thing. I saw this in a different site where it was stated the ways to Change Directry to CD Rom. I just kept this in mind. This will help you a lot. So This worked.
After the final ./VBoxLinuxAdditions.run command, This will be the screen for 2 minuits showing successful loading. After this, Just restart. You are done.
Way 2 -> If the CD ROM thing fails with any of the described ways, or you are too lazy for terminalling or a Passionate Windows user :p , There is another way. Navigate to CD ROM by opening it from My Computer. Copy the VBoxLinuxAdditions.run file to Desktop. Right-click the file on desktop and go to properties. There you will find a permissions Tab, Where change all the Privilages to READ/WRITE/EXECUTE. And Definitely check the "run as program" tick box. If you do not check this option, This will open with a Text Editor. And if you check the tick box, It will open in terminal and install the additions same as terminal installation one. Rest the Pictures will describe.
Go to - Computers/CD ROM and do the following
Copy the file to desktop
Change the file permissions to all read/write
and check allow executing file as program
Here you did the same thing what " chmod775/777 "command does in terminal.
Now you can see OPEN which came there
for enabling run file as program.
Click here and click run or run in terminal on the dialogue box.
Same installation will successfully occur and then restart.
Restart Now. Final Image -->
Full Resolution and
All Drivers Installed.
Possible Failures and Solutions :-
Possible Failure 1 --> The most common here is the Failure during installation of the Kernal Headers. After you write
apt-get install linux-headers-$(uname -r), This will appear
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-3.7-trunk-686-pae
E: Couldn't find any package by regex 'linux-headers-3.7-trunk-686-pae'
So, what to do. Make sure you have the correct sources and repositories installed. Repeat step 2 here. If you had clicked YES for mirrors during installation, this error is unlikely to happen. But if not, check sources list for correct repositories. Add more from lots of websites available up there. check software package manager for additional options, choose updates to install. etc.etc . Then again Run apt-get update && apt-get upgrade. Then again run the Headers installation. Another thing, Make sure that you have the latest Kali Version installed because, installing the headers of old linux from New updates of the server is a bit complicated.
Possible Failure 2 --> When installing the Additions by commanding ./VBoxLinuxAdditions.run, If it is successful, It should say stuff like - building guest additions ------ done
bla bla bla ---------- done
bla bla bla ---------- done
But in case of failures, the error will be - building guest additions --------- fail . In case of this fail, means the headers are not successfully installed. Run an apt-get update again and re-install the headers.
Image samples -
This is the fail I was talking about.
I am currently working and studying on working with kali in Virtual networks : Outer LAN. Like/comment/share/follow to get more updates and ask any questions freely. Will try to answer as easy as I can.
And - Don't just scan over. Go through it thoroughly or you will fail to understand why and what is done over there.....
THANK YOU